Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Tom Tromey <tromey@redhat.com>
To: Eli Zaretskii <eliz@gnu.org>
Cc: gdb-patches@sourceware.org
Subject: Re: GDB 7.7 crashes on LTO-built executable
Date: Wed, 12 Feb 2014 19:22:00 -0000	[thread overview]
Message-ID: <87ob2ct9ua.fsf@fleche.redhat.com> (raw)
In-Reply-To: <83ioskrznz.fsf@gnu.org> (Eli Zaretskii's message of "Wed, 12 Feb	2014 19:47:28 +0200")

>> Is there a better way than saying "unknown" when s->debugformat is
>> NULL?

Eli> A better way to fix the crash, I mean.

I looked a tiny bit.

I don't know what code path hits this, but basically something is not
calling record_debugformat when it ought to.  So one way to fix the bug
would be to track down what this is.  I would probably start by finding
where the symtab in question was allocated.

The current design seems fragile in that it requires sprinkling these
calls to record_debugformat all around.

I did find this comment in buildsym.c:

	  /* Save the debug format string (if any) in the symtab.  */
	  symtab->debugformat = subfile->debugformat;

And it does seem that nothing tries to ensure that a subfile's
debugformat is set.  So perhaps fixing it at the printf site is fine; or
alternatively changing the field's initialization in start_subfile.
Though it seems better to try to fix the value properly; since "unknown"
can't ever really be correct -- it it's unknown one wonders how gdb
could have read it :)

Tom


  reply	other threads:[~2014-02-12 19:22 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 [this message]
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
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=87ob2ct9ua.fsf@fleche.redhat.com \
    --to=tromey@redhat.com \
    --cc=eliz@gnu.org \
    --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