From: Tom Tromey <tom@tromey.com>
To: Weimin Pan via Gdb-patches <gdb-patches@sourceware.org>
Subject: Re: [PATCH,V3 3/3] CTF: multi-CU and archive support
Date: Thu, 01 Apr 2021 11:30:30 -0600 [thread overview]
Message-ID: <87wntlq5e1.fsf@tromey.com> (raw)
In-Reply-To: <1617237594-24175-4-git-send-email-weimin.pan@oracle.com> (Weimin Pan via Gdb-patches's message of "Wed, 31 Mar 2021 20:39:54 -0400")
>>>>> Weimin Pan via Gdb-patches <gdb-patches@sourceware.org> writes:
> Now gdb is capable of debugging executable, which consists of multiple
> compilation units, with CTF. An executable could potentially have one
> or more archives, which, in CTF context, contain conflicting types.
Thank you for the patch. I can't really comment on most of it, since I
don't know much about CTF and I've never managed to even run one of the
CTF tests. However, I did have a question.
> + dp = (ctf_psymtab *)pst->dependencies[i];
gdb style is a space after the cast.
> + if (isparent)
> + pcu->parent_psymtab = pst;
> + else
> + pcu->imported_symtabs.push_back (pst);
The imported symtabs logic for partial symbol tables is to support a way
to "paste together" certain symtabs.
The idea in gdb is that when searching a psymtab for a symbol, all its
included psymtabs are also searched -- the tree of inclusions form a
kind of "virtual psymtab".
This is either used to represent header files (if user==nullptr) or the
DWARF "partial unit" feature (if user!=nullptr).
In the bit of your introduction quoted above, though, it sounds like
this is probably not what you intend? At least, I don't see how to
reconcile this with the "conflicting types" text.
Also I notice that the dependency tree isn't really represented in the
resulting symtabs, or at least it didn't seem that way to me. I don't
know if this is invalid or not (there's probably no real rule), but it
at least seems a bit questionable.
If a CTF archive represents multiple compilation units, the more
ordinary thing to do would be to create one psymtab per each unit, and
just let them be separate.
I wonder if psymtabs are even needed or useful for CTF. Depending on
how libctf works it might be preferable to get rid of them entirely and
just write a new implementation of quick_symbol_functions.
Anyway, if you did intend things to work this way, then it's fine by me.
thanks,
Tom
next prev parent reply other threads:[~2021-04-01 17:30 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-04-01 0:39 [PING][PATCH,V3 0/3] CTF: bug fixes and new features Weimin Pan
2021-04-01 0:39 ` [PATCH,V3 1/3] CTF: fix incorrect function return type Weimin Pan
2021-04-01 0:39 ` [PATCH,V3 2/3] CTF: handle forward reference type Weimin Pan
2021-04-01 0:39 ` [PATCH,V3 3/3] CTF: multi-CU and archive support Weimin Pan
2021-04-01 17:30 ` Tom Tromey [this message]
2021-04-01 16:56 ` [PATCH,V3 2/3] CTF: handle forward reference type Tom Tromey
2021-04-08 1:09 ` Weimin Pan
2021-04-01 16:54 ` [PATCH,V3 1/3] CTF: fix incorrect function return type Tom Tromey
2021-04-01 19:00 ` Wei-min Pan
-- strict thread matches above, loose matches on Subject: below --
2021-03-20 0:44 [PATCH,V3 0/3] CTF: bug fixes and new features Weimin Pan
2021-03-20 0:44 ` [PATCH,V3 1/3] CTF: fix incorrect function return type Weimin Pan
2021-03-20 0:44 ` [PATCH,V3 2/3] CTF: handle forward reference type Weimin Pan
2021-03-20 0:44 ` [PATCH,V3 3/3] CTF: multi-CU and archive support Weimin Pan
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=87wntlq5e1.fsf@tromey.com \
--to=tom@tromey.com \
--cc=gdb-patches@sourceware.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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).