Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* [PATCH v4 0/1] gdb: resolve dynamic types of DWARF stack and implicit values
@ 2026-11-11 12:27 Stephan Rohr
  2026-11-11 12:27 ` [PATCH v4 1/1] " Stephan Rohr
  2026-11-25 13:54 ` [PING][PATCH v4 0/1] " Rohr, Stephan
  0 siblings, 2 replies; 3+ messages in thread
From: Stephan Rohr @ 2026-11-11 12:27 UTC (permalink / raw)
  To: gdb-patches; +Cc: tom

From: "Rohr, Stephan" <stephan.rohr@intel.com>

Hi Tom, all,

thanks for the feedback on v3.  Sorry for the delay, this somewhat got
lost.

v3 was posted here:
https://sourceware.org/pipermail/gdb-patches/2024-March/207603.html

Tom provided feedback:
https://sourceware.org/pipermail/gdb-patches/2024-April/208168.html

This version addresses the concerns raised by Tom: the bug is not in
"value::primitive_field".  GDB doesn't resolve the dynamic type for
a DW_OP_stack_value or DW_OP_implicit_value.  It is properly resolved
for values in memory.

This patch addresses this by resolving the dynamic type in these two
cases instead of turning the assertion into an error.

Changes since v3:

* Keep the assert in "value::primitive_field".
* Resolve the dynamic type in "dwarf_expr_context::fetch_result" for
  DW_OP_stack_value and DW_OP_implicit_value.
* Mark DW_OP_stack_value and DW_OP_implicit_value arrays whose bounds
  resolve to optimized out as optimized out, as for values in memory.
* Adjust the testcase to cover both cases.

Tested with the unix, native-gdbserver and native-extended-gdbserver
board files; there are no regressions.

I appreciate your feedback.

Thanks
Stephan

Rohr, Stephan (1):
  gdb: resolve dynamic types of DWARF stack and implicit values

 gdb/dwarf2/expr.c                             |  14 +-
 .../locexpr-data-member-dynamic-location.exp  | 147 ++++++++++++++++++
 gdb/value.c                                   |  30 ++++
 gdb/value.h                                   |  16 ++
 4 files changed, 200 insertions(+), 7 deletions(-)
 create mode 100644 gdb/testsuite/gdb.dwarf2/locexpr-data-member-dynamic-location.exp

-- 
2.43.0

________________________________________
Intel Deutschland GmbH 

Registered Address: Dornacher Strasse 1, 85622 Feldkirchen, Germany 

Tel: +49 (89) 99143-0 

www.intel.de 

Managing Directors: Candice Moore, Jeffrey Schneiderman, Ramachandran Sitaraman

Chairperson of the Supervisory Board: Sonja Pierer

Registered Seat: Munich Commercial Register B: Amtsgericht Munich HRB 186928

This e-mail and any attachments may contain confidential material for
the sole use of the intended recipient(s). Any review or distribution
by others is strictly prohibited. If you are not the intended
recipient, please contact the sender and delete all copies.


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

end of thread, other threads:[~2026-11-25 13:56 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-11 12:27 [PATCH v4 0/1] gdb: resolve dynamic types of DWARF stack and implicit values Stephan Rohr
2026-11-11 12:27 ` [PATCH v4 1/1] " Stephan Rohr
2026-11-25 13:54 ` [PING][PATCH v4 0/1] " Rohr, Stephan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox