From: "Six, Lancelot" <Lancelot.Six@amd.com>
To: Tom Tromey <tom@tromey.com>
Cc: "gdb-patches@sourceware.org" <gdb-patches@sourceware.org>
Subject: RE: [PATCH] gdb: ensure has dwarf info before reading DWZ file
Date: Tue, 2 Apr 2024 08:40:25 +0000 [thread overview]
Message-ID: <CH3PR12MB90797A801CB17D2695CCAD09833E2@CH3PR12MB9079.namprd12.prod.outlook.com> (raw)
In-Reply-To: <87y19x9i9c.fsf@tromey.com>
[AMD Official Use Only - General]
> Lancelot> A consequence of this change is that the per_bfd->dwz_file
> optional
> Lancelot> object can now remain empty (instead of containing a nullptr), so
> also
> Lancelot> this patch also adjusts dwarf2_get_dwz_file to account for this
> Lancelot> possibility. This effectively reverts the changes to
> Lancelot> dwarf2_get_dwz_file done by e9b738dfbdc.
>
> I'm curious about the motivation for this change.
> Can dwarf2_get_dwz_file be called when dwarf2_has_info returns false?
>
> Tom
It can be called when doing "save gdb-index" (dwarf2/index-write.c: save_gdb_index_command). This case is exercised by "gdb.dwarf2/gdb-index-nodebug.exp".
Maybe a better approach could be to modify save_gdb_index_command to check if there is any debug info before calling write_dwarf_index, but the current try/catch approach is the construct currently taking core of that. Having dwarf2_get_dwz_file return nullptr in that case does made sense to me, but I can also go another direction.
Best,
Lancelot.
next prev parent reply other threads:[~2024-04-02 8:40 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-03-30 11:01 Lancelot SIX
2024-04-01 16:09 ` Tom Tromey
2024-04-02 8:40 ` Six, Lancelot [this message]
2024-04-02 13:16 ` Tom Tromey
2024-04-03 12:55 ` Lancelot SIX
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=CH3PR12MB90797A801CB17D2695CCAD09833E2@CH3PR12MB9079.namprd12.prod.outlook.com \
--to=lancelot.six@amd.com \
--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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).