From: Simon Marchi via Gdb <gdb@sourceware.org>
To: Jan Vrany <jan@vrany.io>, GDB mailing list <gdb@sourceware.org>
Subject: Re: Question re symbols, symtabs and blocks
Date: Thu, 29 Aug 2024 10:41:07 -0400 [thread overview]
Message-ID: <fe9958d1-7c44-403f-b3bc-851552a0526e@simark.ca> (raw)
In-Reply-To: <c7d48d4e925ce4b030c61f80ee43e441fd522d79.camel@vrany.io>
On 2024-08-28 06:08, Jan Vrany via Gdb wrote:
> Hi,
>
> in GDB, are there any constraints for blocks belonging to
> to particular symtab? Like: must each blocks' start and end address
> be within its superblocks' start and end address?
This is how my mental model works, that children blocks must be entirely
within their parents (even considering that blocks may be
non-contiguous), but I don't have proof of that. It's just what would
make sense to me.
> Also, must blocks of different symtabs be always disjunct
> (meaning, their start-end ranges must not overlap)?
What kind of symtab are you talking about? "struct symtab" or "struct
compunit_symtab"? I don't think that blocks care about "struct symtab".
However, blocks are part of a blockvector, and each compunit_symtab has
its own blockvector. So my intuition is that blocks belonging to
different compunit_symtabs should be disjoint, as compilation unit
address ranges are typically disjoints. But then I don't know if there
are weird cases, for instance I don't know how LTO affects this, if
compilation units start sharing some code.
Simon
next prev parent reply other threads:[~2024-08-29 14:41 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-08-28 10:08 Jan Vrany via Gdb
2024-08-29 14:41 ` Simon Marchi via Gdb [this message]
2024-09-03 12:38 ` Jan Vrany via Gdb
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=fe9958d1-7c44-403f-b3bc-851552a0526e@simark.ca \
--to=gdb@sourceware.org \
--cc=jan@vrany.io \
--cc=simark@simark.ca \
/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