From: Jan Kratochvil <jan.kratochvil@redhat.com>
To: gdb-patches@sourceware.org
Cc: Tom Tromey <tromey@redhat.com>
Subject: Re: [patch] Fix assert crashes with minidebuginfo
Date: Fri, 01 Feb 2013 19:06:00 -0000 [thread overview]
Message-ID: <20130201190637.GA15886@host2.jankratochvil.net> (raw)
In-Reply-To: <20130201182134.GA14273@host2.jankratochvil.net>
On Fri, 01 Feb 2013 19:21:34 +0100, Jan Kratochvil wrote:
> diff --git a/gdb/symfile.c b/gdb/symfile.c
> index 63bf329..6f968b7 100644
> --- a/gdb/symfile.c
> +++ b/gdb/symfile.c
> @@ -823,7 +823,12 @@ static void
> read_symbols (struct objfile *objfile, int add_flags)
> {
> (*objfile->sf->sym_read) (objfile, add_flags);
> - if (!objfile_has_partial_symbols (objfile))
> +
> + /* find_separate_debug_file_in_section should be called only if there is
> + single binary with no existing separate debug info file. */
> + if (!objfile_has_partial_symbols (objfile)
> + && objfile->separate_debug_objfile == NULL
> + && objfile->separate_debug_objfile_backlink == NULL)
> {
> bfd *abfd = find_separate_debug_file_in_section (objfile);
> struct cleanup *cleanup = make_cleanup_bfd_unref (abfd);
As discussed with Tom off-list:
first entry:
* SYM_READ reads separate .debug file.
second entry, called for the .debug file:
* nothing interesting as objfile_has_partial_symbols (objfile).
first entry continues:
* But the primary file still !objfile_has_partial_symbols (objfile),
therefore minidebuginfo is read as a secondary debug info file
(those are supported for MacOSX).
third entry, called for the minidebuginfo
* SYM_READ starts to search for separate debug info (via its PT_NOTE
build-id) file for the minidebuginfo file.
=> crash
Regards,
Jan
next prev parent reply other threads:[~2013-02-01 19:06 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 [this message]
2013-02-01 19:39 ` Tom Tromey
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=20130201190637.GA15886@host2.jankratochvil.net \
--to=jan.kratochvil@redhat.com \
--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