Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: tromey@redhat.com
Cc: gdb-patches@sourceware.org
Subject: Re: GDB 7.7 crashes on LTO-built executable
Date: Sat, 15 Feb 2014 16:58:00 -0000	[thread overview]
Message-ID: <83a9dsb9eq.fsf@gnu.org> (raw)
In-Reply-To: <83d2isrt08.fsf@gnu.org>

> Date: Wed, 12 Feb 2014 22:11:19 +0200
> From: Eli Zaretskii <eliz@gnu.org>
> Cc: gdb-patches@sourceware.org
> 
> Yes, the DWARF 2 debuginfo _is_ recorded, but for a file name that has
> nothing to do with the name of the source file from which the program
> was compiled.

This happens in read_file_scope, which is called from process_die.
read_file_scope calls find_file_and_directory, which uses DW_AT_name
attribute to get the file name.  And that file name turns out to be
$TMPDIR/ccN8FPgQ.ltrans0.o instead of the expected foo.c, which is the
source file I compiled.  So the DWARF 2 debug info is set for that
temporary file name, instead of the source file.

The call to process_die happens as part of set_initial_language, which
looks for a symbol "main".

The name of the source file is available in the psymtab that is
accessible from the die (via the objfile struct).  the question is
what should be the conditions under which we need to look there.
E.g., can the fact that DW_AT_name returns a name of an object file be
that condition?


  reply	other threads:[~2014-02-15 16:58 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-02-12 17:37 Eli Zaretskii
2014-02-12 17:47 ` Eli Zaretskii
2014-02-12 19:22   ` Tom Tromey
2014-02-12 19:43     ` Eli Zaretskii
2014-02-12 20:05       ` Tom Tromey
2014-02-12 20:11         ` Eli Zaretskii
2014-02-15 16:58           ` Eli Zaretskii [this message]
2014-02-12 20:08       ` Eli Zaretskii

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=83a9dsb9eq.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=gdb-patches@sourceware.org \
    --cc=tromey@redhat.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