From: Simon Marchi <simark@simark.ca>
To: Tom Tromey <tom@tromey.com>, gdb-patches@sourceware.org
Subject: Re: [PATCH 2/3] Handle DWARF 5 separate debug sections
Date: Mon, 24 Mar 2025 16:52:59 -0400 [thread overview]
Message-ID: <4301b473-7127-4c95-9f7a-d938f1bdb868@simark.ca> (raw)
In-Reply-To: <20250323-dwz-dwarf-5-v2-v1-2-3c0775ca5514@tromey.com>
On 2025-03-23 15:20, Tom Tromey wrote:
> DWARF 5 standardized the .gnu_debugaltlink section that dwz emits in
> multi-file mode. This is handled via some new forms, and a new
> .debug_sup section.
>
> This patch adds support for this to gdb. It is largely
> straightforward, I think, though one oddity is that I chose not to
> have this code search the system build-id directories for the
> supplementary file. My feeling was that, while it makes sense for a
> distro to unify the build-id concept with the hash stored in the
> .debug_sup section, there's no intrinsic need to do so.
>
> This in turn means that a few tests -- for example those that test the
> index cache -- will not work in this mode.
>
> Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=32808
I just had a few minutes to spare, so I just scanned the patch, I'm
happy with it. More support for standard DWARF is nice.
Acked-By: Simon Marchi <simon.marchi@efficios.com>
Some random comments:
> @@ -87,6 +88,139 @@ locate_dwz_sections (struct objfile *objfile, bfd *abfd, asection *sectp,
> }
> }
>
> +/* Helper that throws an exception when reading the .debug_sup
> + section. */
> +
> +static void
> +debug_sup_failure (const char *text, bfd *abfd)
> +{
> + error (_("%s [in modules %s]"), text, bfd_get_filename (abfd));
modules -> module?
> + if (*buildid_len != 0)
> + buildid->reset ((bfd_byte *) xmemdup (contents, *buildid_len,
> + *buildid_len));
Could we return a view inside the section, instead of copying the bytes?
It seems like we are just copying the bytes as is.
Simon
next prev parent reply other threads:[~2025-03-24 20:58 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-03-23 19:19 [PATCH 0/3] Support DWARF 5 .debug_sup section Tom Tromey
2025-03-23 19:20 ` [PATCH 1/3] Remove 'read' call from dwz_file::read_string Tom Tromey
2025-03-24 14:25 ` Alexandra Petlanova Hajkova
2025-03-24 20:30 ` Simon Marchi
2025-03-24 20:52 ` Tom Tromey
2025-03-23 19:20 ` [PATCH 2/3] Handle DWARF 5 separate debug sections Tom Tromey
2025-03-24 15:45 ` Alexandra Petlanova Hajkova
2025-03-24 17:16 ` Tom Tromey
2025-04-03 14:39 ` Tom Tromey
2025-04-22 14:55 ` Tom Tromey
2025-04-22 15:10 ` Simon Marchi
2025-04-28 11:35 ` Tom de Vries
2025-03-24 20:52 ` Simon Marchi [this message]
2025-03-25 13:37 ` Tom Tromey
2025-03-23 19:20 ` [PATCH 3/3] Add "-5" flag to cc-with-tweaks 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=4301b473-7127-4c95-9f7a-d938f1bdb868@simark.ca \
--to=simark@simark.ca \
--cc=gdb-patches@sourceware.org \
--cc=tom@tromey.com \
/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