From: Sterling Augustine via Gdb <gdb@sourceware.org>
To: Alexander Yermolovich <ayermolo@fb.com>
Cc: "gdb@sourceware.org" <gdb@sourceware.org>
Subject: Re: GDB and debug fission
Date: Thu, 7 Jan 2021 17:48:03 -0800 [thread overview]
Message-ID: <CAEG7qUxwiBotg-ev57m8g=LT6iicoMZs0nTbQhCvspui=KrPAA@mail.gmail.com> (raw)
In-Reply-To: <BN7PR15MB2466A73E710FFE9A98FE3394BFAE0@BN7PR15MB2466.namprd15.prod.outlook.com>
On Thu, Jan 7, 2021 at 5:25 PM Alexander Yermolovich via Gdb
<gdb@sourceware.org> wrote:
>
> Hello.
>
> For latest gdb to work with -gsplit-dwarf debug information generated by clang, either in split or single mode does it need gdb_index or pubnames?
> In normal case where debug information is part of executable gdb_index is nice to speed up startup time, and I think I read pubnames is not used, but with debug fission are either gdb_index or pubnames necessary?
For gdb to work with split-dwarf debug info, it needs a gdb_index.
That can be generated in several ways. Gdb can build one itself--there
is a script somewhere to add a gdb index.
But it is somewhat easier to have the linker you use generate
gdb_index for you (both gnu-ld and llvm's lld can do this). They do
this by reading the .gnu_pubnames section, so in some way, you need
both pubnames *and* an index.
So you would ordinarily use the following commands:
$(CC) $(normal_arguments) -ggnu-pubnames
$(LD) $(normal_arguments) -Wl,--gdb-index
next prev parent reply other threads:[~2021-01-08 1:48 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-01-08 1:25 Alexander Yermolovich via Gdb
2021-01-08 1:48 ` Sterling Augustine via Gdb [this message]
2021-01-08 2:12 ` Alexander Yermolovich via Gdb
2021-01-08 3:16 ` David Blaikie via Gdb
2021-01-08 18:52 ` Alexander Yermolovich via Gdb
2021-01-08 19:01 ` David Blaikie via Gdb
2021-01-29 20:34 ` David Blaikie via Gdb
2021-01-30 0:42 ` Alexander Yermolovich via Gdb
2021-01-30 1:06 ` David Blaikie via Gdb
2021-02-01 20:07 ` Alexander Yermolovich via Gdb
2021-02-01 20:14 ` David Blaikie via Gdb
2021-01-08 2:17 ` David Blaikie 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='CAEG7qUxwiBotg-ev57m8g=LT6iicoMZs0nTbQhCvspui=KrPAA@mail.gmail.com' \
--to=gdb@sourceware.org \
--cc=ayermolo@fb.com \
--cc=saugustine@google.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