Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* [PATCH v2 0/4] Fix reading DW_FORM_addrx with address size of 2
@ 2026-09-21 17:39 Simon Marchi
  2026-09-21 17:39 ` [PATCH v2 1/4] gdb/testsuite: add support for DWARF 5 .debug_addr sections to DWARF assembler Simon Marchi
                   ` (4 more replies)
  0 siblings, 5 replies; 8+ messages in thread
From: Simon Marchi @ 2026-09-21 17:39 UTC (permalink / raw)
  To: gdb-patches, binutils; +Cc: Simon Marchi

This is version 2 of this patch:

  https://inbox.sourceware.org/gdb-patches/af0e0cb7-b012-4e78-b567-c232eca8222d@polymtl.ca/T/#mb7baec6653460d149a84aa538dc6faa64c28d65b

I split out the DWARF assembler changes in its own patch, since it's now
a bit more substantial (patch 1).

I added a patch that validates the address sizes read from DWARF against
a set of known values (patch 2).

I added a patch that removes an unnecessary segment_collector_size
field (patch 3)..

Finally, patch 4 is the actual new version of the original patch.  The
main change is the way to computation is done, to try to be more robust
against various cases of overflow.

Simon Marchi (4):
  gdb/testsuite: add support for DWARF 5 .debug_addr sections to DWARF
    assembler
  gdb/dwarf: validate address sizes when reading DWARF headers
  gdb/dwarf: don't store segment_collector_size (sic)
  gdb/dwarf: fix reading DW_FORM_addrx with address size of 2

 gdb/dwarf2/aranges.c                         |   4 +-
 gdb/dwarf2/frame.c                           |  13 +-
 gdb/dwarf2/read.c                            |  54 +++++----
 gdb/dwarf2/read.h                            |   4 +
 gdb/dwarf2/types.h                           |   8 ++
 gdb/dwarf2/unit-head.c                       |   7 ++
 gdb/dwarf2/unit-head.h                       |   5 +
 gdb/testsuite/gdb.dwarf2/dw2-addr-size-2.c   |  22 ++++
 gdb/testsuite/gdb.dwarf2/dw2-addr-size-2.exp |  75 ++++++++++++
 gdb/testsuite/lib/dwarf.exp                  | 118 +++++++++++++++++--
 10 files changed, 274 insertions(+), 36 deletions(-)
 create mode 100644 gdb/testsuite/gdb.dwarf2/dw2-addr-size-2.c
 create mode 100644 gdb/testsuite/gdb.dwarf2/dw2-addr-size-2.exp


base-commit: 3e5100fe3b15e2b3ece60f57b4c1ecc0c50cae53
-- 
2.55.0


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

end of thread, other threads:[~2026-09-24 16:00 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-09-21 17:39 [PATCH v2 0/4] Fix reading DW_FORM_addrx with address size of 2 Simon Marchi
2026-09-21 17:39 ` [PATCH v2 1/4] gdb/testsuite: add support for DWARF 5 .debug_addr sections to DWARF assembler Simon Marchi
2026-09-21 17:39 ` [PATCH v2 2/4] gdb/dwarf: validate address sizes when reading DWARF headers Simon Marchi
2026-09-21 17:39 ` [PATCH v2 3/4] gdb/dwarf: don't store segment_collector_size (sic) Simon Marchi
2026-09-21 17:39 ` [PATCH v2 4/4] gdb/dwarf: fix reading DW_FORM_addrx with address size of 2 Simon Marchi
2026-09-23 15:13   ` Tom Tromey
2026-09-24 15:59     ` Simon Marchi
2026-09-23 15:49 ` [PATCH v2 0/4] Fix " Tom Tromey

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