Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Simon Marchi <simon.marchi@efficios.com>
To: gdb-patches@sourceware.org, binutils@sourceware.org
Cc: Simon Marchi <simon.marchi@efficios.com>
Subject: [PATCH v2 0/4] Fix reading DW_FORM_addrx with address size of 2
Date: Mon, 21 Sep 2026 13:39:40 -0400	[thread overview]
Message-ID: <20260921173951.688121-1-simon.marchi@efficios.com> (raw)

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


             reply	other threads:[~2026-09-21 17:41 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-21 17:39 Simon Marchi [this message]
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

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=20260921173951.688121-1-simon.marchi@efficios.com \
    --to=simon.marchi@efficios.com \
    --cc=binutils@sourceware.org \
    --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