Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Tom Tromey <tromey@redhat.com>
To: Jan Kratochvil <jan.kratochvil@redhat.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [patch] Fix assert crashes with minidebuginfo
Date: Fri, 01 Feb 2013 19:39:00 -0000	[thread overview]
Message-ID: <87pq0j4zl8.fsf@fleche.redhat.com> (raw)
In-Reply-To: <20130201190637.GA15886@host2.jankratochvil.net> (Jan	Kratochvil's message of "Fri, 1 Feb 2013 20:06:37 +0100")

>>>>> "Jan" == Jan Kratochvil <jan.kratochvil@redhat.com> writes:

Jan> first entry continues:
Jan>  * But the primary file still !objfile_has_partial_symbols (objfile),
Jan>    therefore minidebuginfo is read as a secondary debug info file
Jan>    (those are supported for MacOSX).

It seems to me that symfile.c:read_symbols should check for a separate
debug file.  IIUC the intent of the code originally was to skip
minidebuginfo entirely if the separate debuginfo was available -- since
the separate debuginfo is always more complete anyhow.

I wonder if this works.

diff --git a/gdb/symfile.c b/gdb/symfile.c
index 63bf329..0823f16 100644
--- a/gdb/symfile.c
+++ b/gdb/symfile.c
@@ -823,7 +823,8 @@ static void
 read_symbols (struct objfile *objfile, int add_flags)
 {
   (*objfile->sf->sym_read) (objfile, add_flags);
-  if (!objfile_has_partial_symbols (objfile))
+  if (!objfile_has_partial_symbols (objfile)
+      && objfile->separate_debug_objfile == NULL)
     {
       bfd *abfd = find_separate_debug_file_in_section (objfile);
       struct cleanup *cleanup = make_cleanup_bfd_unref (abfd);


Tom


  reply	other threads:[~2013-02-01 19:39 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-02-01 18:21 Jan Kratochvil
2013-02-01 19:06 ` Jan Kratochvil
2013-02-01 19:39   ` Tom Tromey [this message]
2013-02-01 19:17     ` Jan Kratochvil
2013-02-01 21:53 ` Tom Tromey
2013-02-01 20:16   ` [commit] " Jan Kratochvil

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=87pq0j4zl8.fsf@fleche.redhat.com \
    --to=tromey@redhat.com \
    --cc=gdb-patches@sourceware.org \
    --cc=jan.kratochvil@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