public inbox for gdb@sourceware.org
 help / color / mirror / Atom feed
From: Mark Wielaard <mark@klomp.org>
To: gdb@sourceware.org
Subject: DWARF5 and .gdb_index/.debug_names
Date: Sun, 30 Aug 2020 19:18:51 +0200	[thread overview]
Message-ID: <e56fb5e13a0e04a40fc1c88205d3c0eaaa71919a.camel@klomp.org> (raw)

Hi,

Last week we had a DWARF BoF at the virtual GNU tools cauldron.
Notes have been posted to the gcc wiki:
https://gcc.gnu.org/wiki/LPC2020NotesDWARF

I would like to try to make DWARF5 the default for GCC11 and have been
trying to fix any issues I could find. Testing gdb went pretty well.
There is one issue that I originally filed against gdb:
https://sourceware.org/bugzilla/show_bug.cgi?id=26525
But that is most likely a bug in gcc. Jakub has a patch that fixes the
issue for gcc, but there is some debate whether that is the correct
approach or not:
https://gcc.gnu.org/pipermail/gcc-patches/2020-August/552535.html

Note that I haven't really looked for issues in languages other than C
or C++, so someone might want to double check whether other languages
supported by gcc are also ready to switch to DWARF5 by default.

During the BoF Pedro mentioned that the GDB DWARF5 .debug_names support
is incomplete/wrong. I was wondering whether there was a good
description of the issue and/or a bug report for it. When using the
contrib/gdb-add-index.sh it does add a .gdb_index for objects
containing DWARF5 and the results seem correct, gdb also seems to be
able to use it. When adding -dwarf-5 it seems to output a .debug_names
section which can be read by binutils readelf (elfutils doesn't yet
support .debug_names). I couldn't immediately see in what way it was
wrong/incomplete.

dwz does support .gdb_index rewriting, but doesn't know about
.debug_names yet. So could we as a first step, when switching the
DWARF5 keep using .gdb_index? At least till any issues with gdb
.debug_names are resolved and dwz supports it?

Thanks,

Mark

             reply	other threads:[~2020-08-30 17:18 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-30 17:18 Mark Wielaard [this message]
2020-08-31  7:21 ` Tom de Vries
2020-08-31  8:28 ` Jan Kratochvil
2020-09-01  3:07   ` David Blaikie
2020-09-01 18:38 ` Tom Tromey
2020-09-01 18:53   ` David Blaikie
2020-09-01 19:16 ` Pedro Alves
2020-09-01 22:00   ` Eric Christopher
2020-09-14 15:23 ` Gaius Mulley

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=e56fb5e13a0e04a40fc1c88205d3c0eaaa71919a.camel@klomp.org \
    --to=mark@klomp.org \
    --cc=gdb@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).