From: Simon Marchi via Gdb-patches <gdb-patches@sourceware.org>
To: Wei-min Pan <weimin.pan@oracle.com>, gdb-patches@sourceware.org
Subject: Re: [PATCH 1/3] gdb/ctf: don't create a buildsym_compunit when building partial symbols
Date: Thu, 31 Mar 2022 20:14:48 -0400 [thread overview]
Message-ID: <6c5620d6-c076-33b0-d8d1-11701a53afd8@polymtl.ca> (raw)
In-Reply-To: <90ec7aeb-6e9d-bd6c-236e-d74c2c6bf2a6@oracle.com>
[-- Attachment #1: Type: text/plain, Size: 1484 bytes --]
> A CTF archive contains conflicting type info and is treated as a CU.
> Since one can't switch scope among CUs in CTF, not reading archives
> might not be a problem. Please go ahead and make the change. It can
> be revisited when we come up a test case that shows otherwise.
>
> Thanks.
Hi Wei-Min,
I'm not sure we are on the same page. I don't know much about CTF, so
let's make sure I understand things right. I am not sure how CTF debug
info is organized, and in particular what an "archive" is. If you can
explain this or give a reference, that would be useful.
I'll attach the output of "readelf --ctf=.ctf" for the file I am working
with.
My understanding from the readelf output is that there is some debug
info (function, types, etc) described at the top-level. It doesn't seem
associated to a source file, and it seems to contain things that are
global.
Then there is one "archive" for each compiled .c file, such as:
CTF archive member: /home/simark/src/babeltrace/src/lib/current-thread.c:
Each archive contains very little data, my guess is that it only
contains what is not already described at the top-level?
Right now, in GDB, we create one CU (partial_symtab, and then
compunit_symtab after expansion) for the top-level, and the one CU for
each archive. My patch does not change that. It only removes a
"new buildsym_compunit" call that just seems useless / to do nothing.
In other words, no user-visible changes are expected from this patch.
Simon
[-- Attachment #2: readelf-output.txt.gz --]
[-- Type: application/gzip, Size: 73551 bytes --]
next prev parent reply other threads:[~2022-04-01 0:15 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-03-31 21:20 Simon Marchi via Gdb-patches
2022-03-31 21:20 ` [PATCH 2/3] gdb: print compunit_symtab name in "maint info symtabs" Simon Marchi via Gdb-patches
2022-03-31 21:20 ` [PATCH 3/3] gdb/ctf: pass partial symtab's filename to buildsym_compunit Simon Marchi via Gdb-patches
2022-04-01 0:07 ` Wei-min Pan via Gdb-patches
2022-03-31 23:56 ` [PATCH 1/3] gdb/ctf: don't create a buildsym_compunit when building partial symbols Wei-min Pan via Gdb-patches
2022-04-01 0:14 ` Simon Marchi via Gdb-patches [this message]
2022-04-01 0:57 ` Wei-min Pan via Gdb-patches
2022-04-01 1:32 ` Simon Marchi via Gdb-patches
2022-04-04 17:08 ` Tom Tromey
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=6c5620d6-c076-33b0-d8d1-11701a53afd8@polymtl.ca \
--to=gdb-patches@sourceware.org \
--cc=simon.marchi@polymtl.ca \
--cc=weimin.pan@oracle.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