public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
* [PATCH 0/4] Dynamic properties of pointers
@ 2022-09-20  7:26 Nils-Christian Kempke
  2022-09-20  7:26 ` [PATCH 1/4] gdb, testsuite: handle icc and icpc deprecated remarks Nils-Christian Kempke
                   ` (3 more replies)
  0 siblings, 4 replies; 15+ messages in thread
From: Nils-Christian Kempke @ 2022-09-20  7:26 UTC (permalink / raw)
  To: gdb-patches; +Cc: tom, Nils-Christian Kempke

Hi,

this series was partly posted to the mailing list before here:

https://sourceware.org/pipermail/gdb-patches/2022-January/185233.html

The original posting contained a different (probably much worse) version
of patch 2 and 3 of this series:

	gdb, typeprint: fix pointer/reference typeprint for icc/ifort
	gdb/types: Resolve pointer types dynamically 

Back then it seems now that I had not fully understood what happened -
thanks to Tom for his insightful review and comments!

The originally posted series attempted to allow pointer types to be
considered as dynamic types within GDB and tried to then resolve dynamic
properties of pointers when e.g. printing them.

This series, or rather patch 2 does mainly the same.  It enables GDB to
mark pointers that point to dynamic types (such as arrays) as dynamic
types similar as it is already done for references.

We tried to also have this new 'feature' for icc/icpc/ifort and ran into
some problems, which caused the addition of Patch 1 and Patch 3.  Patch
1 was added as the newer versions of icc emit a deprecated warning which
is unexpected within the testsuite.  Patch 3 was added because of the
way icc/icpc/ifort emit references and pointers.  Patch 3 was partly
also visible in the original series - but it was poorly done there and
not separated properly leading to much confusion.
Patch 3 still seems a bit like a hack to me - but is also seemed
reasonable to do it like this.  If anyone has a better idea on patch 3 -
I am happy to change it.  I expect this part to be the most
controversial.

Patch 4 is just a small addition from the Fortran side, which also
originally motivated this series.  Fortran pointers can have the dynamic
property DW_AT_associated - telling dynamically whether a pointer is
associated or not.  As we are now able to resolve dynamic properties we
could also fix the sizeof intrinsic operator (Fortran allows for
printing the size of a pointer-to-array) since we dynamically resolve
array sizes of pointer-to-arrays.

Any feedback is welcome!

Cheers!
Nils

Bernhard Heckel (1):
  gdb/types: Resolve pointer types dynamically

Nils-Christian Kempke (3):
  gdb, testsuite: handle icc and icpc deprecated remarks
  gdb, typeprint: fix pointer/reference typeprint for icc/ifort
  gdb/fortran: Fix sizeof intrinsic for Fortran

 gdb/eval.c                                    |   3 +
 gdb/gdbtypes.c                                |  77 +++++++-
 gdb/testsuite/gdb.cp/vla-cxx.cc               |   4 +
 gdb/testsuite/gdb.cp/vla-cxx.exp              |  33 ++++
 gdb/testsuite/gdb.dwarf2/dynarr-ptr.exp       |  16 +-
 .../gdb.fortran/pointer-to-pointer.exp        |   2 +-
 gdb/testsuite/gdb.fortran/pointers.exp        | 178 ++++++++++++++++++
 gdb/testsuite/gdb.fortran/pointers.f90        |  29 +++
 gdb/testsuite/gdb.fortran/sizeof.exp          | 110 +++++++++++
 gdb/testsuite/gdb.fortran/sizeof.f90          | 108 +++++++++++
 gdb/testsuite/lib/gdb.exp                     |  18 ++
 gdb/valprint.c                                |  24 ++-
 12 files changed, 582 insertions(+), 20 deletions(-)
 create mode 100644 gdb/testsuite/gdb.fortran/pointers.exp
 create mode 100644 gdb/testsuite/gdb.fortran/sizeof.exp
 create mode 100644 gdb/testsuite/gdb.fortran/sizeof.f90

-- 
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


^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2022-09-29 12:39 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-09-20  7:26 [PATCH 0/4] Dynamic properties of pointers Nils-Christian Kempke
2022-09-20  7:26 ` [PATCH 1/4] gdb, testsuite: handle icc and icpc deprecated remarks Nils-Christian Kempke
2022-09-26 14:32   ` Simon Marchi
2022-09-20  7:26 ` [PATCH 2/4] gdb/types: Resolve pointer types dynamically Nils-Christian Kempke
2022-09-26 15:33   ` Simon Marchi
2022-09-29 12:39     ` Kempke, Nils-Christian
2022-09-20  7:26 ` [PATCH 3/4] gdb, typeprint: fix pointer/reference typeprint for icc/ifort Nils-Christian Kempke
2022-09-26 16:02   ` Simon Marchi
2022-09-26 17:18     ` Kempke, Nils-Christian
2022-09-27  9:14       ` Zaric, Zoran (Zare)
2022-09-27 12:48         ` Simon Marchi
2022-09-20  7:26 ` [PATCH 4/4] gdb/fortran: Fix sizeof intrinsic for Fortran Nils-Christian Kempke
2022-09-26 17:06   ` Simon Marchi
2022-09-26 17:22     ` Kempke, Nils-Christian
2022-09-26 17:24     ` Kempke, Nils-Christian

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).