Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Tom Tromey <tom@tromey.com>
To: Jan Vrany <jan.vrany@labware.com>
Cc: gdb-patches@sourceware.org,  vries@gcc.gnu.org,
	 tromey@sourceware.org, thiago.bauermann@linaro.org,
	 simon.marchi@efficios.com
Subject: Re: [PATCH] Revert "gdb: change blockvector::contains() to handle blockvectors with "holes""
Date: Mon, 15 Dec 2025 07:49:49 -0700	[thread overview]
Message-ID: <87y0n3zto2.fsf@tromey.com> (raw)
In-Reply-To: <20251208180717.176567-1-jan.vrany@labware.com> (Jan Vrany's message of "Mon, 8 Dec 2025 18:07:17 +0000")

>>>>> "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.

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.

Tom

  parent reply	other threads:[~2025-12-15 14:52 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 [this message]
2025-12-16 14:24   ` Jan Vraný
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=87y0n3zto2.fsf@tromey.com \
    --to=tom@tromey.com \
    --cc=gdb-patches@sourceware.org \
    --cc=jan.vrany@labware.com \
    --cc=simon.marchi@efficios.com \
    --cc=thiago.bauermann@linaro.org \
    --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