This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [patch] Fix assert crashes with minidebuginfo
>>>>> "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