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 3/4] gdb/dwarf: don't store segment_collector_size (sic)
Date: Mon, 21 Sep 2026 13:39:43 -0400 [thread overview]
Message-ID: <20260921173951.688121-4-simon.marchi@efficios.com> (raw)
In-Reply-To: <20260921173951.688121-1-simon.marchi@efficios.com>
I noticed that structure loclists_rnglists_header stored the segment
selector size (which seems to be misspelled as "collector"). Nothing
uses that, and it has even been removed from the DWARF 6 draft (it stays
as a "reserved" field). Remove the structure field and simply skip it.
There are other functions (read_addrmap_from_aranges and
dwarf_decode_line_header) that do read it, only to validate that it's 0,
but it didn't seem useful to me to add such a check here (we could even
remove these other ones).
Change-Id: If73f510398bef2cb1215ce7ec2e4e083d5a50697
---
gdb/dwarf2/read.c | 6 +-----
1 file changed, 1 insertion(+), 5 deletions(-)
diff --git a/gdb/dwarf2/read.c b/gdb/dwarf2/read.c
index c1454a664bef..2f38dfdaf970 100644
--- a/gdb/dwarf2/read.c
+++ b/gdb/dwarf2/read.c
@@ -238,10 +238,6 @@ struct loclists_rnglists_header
the target system. */
unsigned char addr_size;
- /* A 1-byte unsigned integer containing the size in bytes of a segment selector
- on the target system. */
- unsigned char segment_collector_size;
-
/* A 4-byte count of the number of offsets that follow the header. */
unsigned int offset_entry_count;
};
@@ -14098,7 +14094,7 @@ read_loclists_rnglists_header (struct loclists_rnglists_header *header,
section->get_name (), header->addr_size,
section->get_file_name ());
- header->segment_collector_size = read_1_byte (abfd, info_ptr);
+ /* Skip segment_selector_size. */
info_ptr += 1;
header->offset_entry_count = read_4_bytes (abfd, info_ptr);
--
2.55.0
next prev parent reply other threads:[~2026-09-21 17:42 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
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 ` Simon Marchi [this message]
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-4-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