public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Nils-Christian Kempke <nils-christian.kempke@intel.com>
To: gdb-patches@sourceware.org
Subject: [PATCH 0/2] Resolve dynamic types for pointers
Date: Tue, 18 Jan 2022 14:26:24 +0100	[thread overview]
Message-ID: <20220118132626.3786176-1-nils-christian.kempke@intel.com> (raw)

Hi,

please find attached two patches aming at improving usability,
especially but not limited to Fortran and C/Cpp.

The following two patches attempt to resolve dynamic properties for
pointers when printing/accessing them.  When printing/dereferencing 
pointers with dynamic target types we resolve the target type first.
This enables GDB to print additional information about the type of the 
pointer/underlying object.

For example, in C this enables the printing of the dimension of a
dynamic array pointed to by an array pointer.

Any comments are much appreciated!

Cheers,

Nils


Bernhard Heckel (2):
  gdb/types: Resolve dynamic properties of pointer types.
  gdb: Resolve dynamic target types of pointers.

 gdb/c-valprint.c                              |  19 +-
 gdb/gdbtypes.c                                |  29 ++-
 gdb/testsuite/gdb.cp/vla-cxx.cc               |   4 +
 gdb/testsuite/gdb.cp/vla-cxx.exp              |  33 ++++
 gdb/testsuite/gdb.dwarf2/dynarr-ptr.exp       |   4 +-
 .../gdb.fortran/pointer-to-pointer.exp        |   2 +-
 gdb/testsuite/gdb.fortran/pointers.exp        | 181 ++++++++++++++++++
 gdb/testsuite/gdb.fortran/pointers.f90        |  29 +++
 gdb/typeprint.c                               |  17 ++
 gdb/valops.c                                  |  11 ++
 gdb/valprint.c                                |   6 -
 11 files changed, 323 insertions(+), 12 deletions(-)
 create mode 100644 gdb/testsuite/gdb.fortran/pointers.exp

-- 
2.25.1

Intel Deutschland GmbH
Registered Address: Am Campeon 10, 85579 Neubiberg, Germany
Tel: +49 89 99 8853-0, www.intel.de <http://www.intel.de>
Managing Directors: Christin Eisenschmid, Sharon Heck, Tiffany Doon Silva  
Chairperson of the Supervisory Board: Nicole Lau
Registered Office: Munich
Commercial Register: Amtsgericht Muenchen HRB 186928


             reply	other threads:[~2022-01-18 13:26 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-18 13:26 Nils-Christian Kempke [this message]
2022-01-18 13:26 ` [PATCH 1/2] gdb/types: Resolve dynamic properties of pointer types Nils-Christian Kempke
2022-01-28 18:30   ` Tom Tromey
2022-01-31  8:15     ` Kempke, Nils-Christian
2022-01-18 13:26 ` [PATCH 2/2] gdb: Resolve dynamic target types of pointers Nils-Christian Kempke
2022-02-10 19:47   ` Tom Tromey
2022-04-14 10:22     ` Kempke, Nils-Christian
2022-04-15 16:14       ` Tom Tromey
2022-04-19  6:59         ` Kempke, Nils-Christian
2022-05-13 14:45           ` Kempke, Nils-Christian

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220118132626.3786176-1-nils-christian.kempke@intel.com \
    --to=nils-christian.kempke@intel.com \
    --cc=gdb-patches@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).