From: "Jan Vraný" <Jan.Vrany@labware.com>
To: "tom@tromey.com" <tom@tromey.com>
Cc: "gdb-patches@sourceware.org" <gdb-patches@sourceware.org>,
"vries@gcc.gnu.org" <vries@gcc.gnu.org>,
"tromey@sourceware.org" <tromey@sourceware.org>,
"thiago.bauermann@linaro.org" <thiago.bauermann@linaro.org>,
"simon.marchi@efficios.com" <simon.marchi@efficios.com>
Subject: Re: [PATCH] Revert "gdb: change blockvector::contains() to handle blockvectors with "holes""
Date: Tue, 16 Dec 2025 14:24:09 +0000 [thread overview]
Message-ID: <d0dd1ab17627cf9a625a8109b6337ee6719d12cb.camel@labware.com> (raw)
In-Reply-To: <87y0n3zto2.fsf@tromey.com>
On Mon, 2025-12-15 at 07:49 -0700, Tom Tromey wrote:
> > > > > > "Jan" == Jan Vrany <jan.vrany@labware.com> writes:
>
> Jan> This reverts commit cc1fc6af4150b19f9c4c70d0463ff498703fb637, since it
> Jan> causes a number of regressions that seem not to be easily fixable.
>
> I hate to revert this since I think it's a better direction for gdb.
Yeah, me too.
>
> I guess I think the 'lookup' and 'contains' methods should be
> equivalent, and neither should ever return the global or static block --
> only real code blocks.
>
> Jan> The problem lies in existence of "freestanding" code, a code that is
> Jan> part of a CU but does not have any block associated with it. Consider
> Jan> following program:
> ...
> Jan> When compiled, the foo function has no block of itself:
>
> FWIW this is what I would expect. It's just like any other case where a
> function does not have debug info: no debug info mean no block.
>
> Jan> Thiago suggested to use minsymbols to tell whether or a CU contains
> Jan> given address. I do not think this would work reliably as minsymbols do
> Jan> no know to which CU they belong. In slightly more complicated case of
> Jan> interleaved CUs it does not seem to be possible to tell for sure to which
> Jan> one a given minsymbol belongs.
>
> The don't know the CU but at you should still be able to set a
> breakpoint on them.
>
> Anyway, I'd be willing to approve the backout on the basis that it
> causes some regression. But still I question whether it really makes
> sense, and if it would be better instead to change the test.
We can change tests but I think GDB would still be broken - the problem is that
this change confuses unwinder in a way I do not really understand yet. So it seems to
me that if we keep this, we need "fix" some other part of GDB too. I spent some time
debugging this and tried again yesterday but so far the more I debug the less
I understand :-(
I do not know what's the policy regarding regressions. If everyone can tolerate
these regressions for longer, I can try to do some more debugging and see.
Jan
>
> Tom
next prev parent reply other threads:[~2025-12-16 14:24 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-12-08 18:07 Jan Vrany
2025-12-15 12:08 ` [PING] " Jan Vraný
2025-12-15 14:49 ` Tom Tromey
2025-12-16 14:24 ` Jan Vraný [this message]
2025-12-18 18:55 ` Tom Tromey
2025-12-18 20:45 ` Jan Vraný
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=d0dd1ab17627cf9a625a8109b6337ee6719d12cb.camel@labware.com \
--to=jan.vrany@labware.com \
--cc=gdb-patches@sourceware.org \
--cc=simon.marchi@efficios.com \
--cc=thiago.bauermann@linaro.org \
--cc=tom@tromey.com \
--cc=tromey@sourceware.org \
--cc=vries@gcc.gnu.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