From: Jan Kratochvil <jan.kratochvil@redhat.com>
To: Tom Tromey <tromey@redhat.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [patch] Fix dangling displays in separate debug
Date: Fri, 09 Apr 2010 15:30:00 -0000 [thread overview]
Message-ID: <20100409153014.GA10379@host0.dyn.jankratochvil.net> (raw)
In-Reply-To: <m339z7vzeh.fsf@fleche.redhat.com>
On Wed, 07 Apr 2010 21:24:54 +0200, Tom Tromey wrote:
> >>>>> "Jan" == Jan Kratochvil <jan.kratochvil@redhat.com> writes:
> Jan> - if (SYMBOL_SYMTAB (symbol)->objfile == solib->objfile)
> Jan> + if (SYMBOL_SYMTAB (symbol)->objfile == solib->objfile
> Jan> + || SYMBOL_SYMTAB (symbol)->objfile
> Jan> + == solib->objfile->separate_debug_objfile)
>
> An objfile can now have multiple separate debuginfo objfiles, linked
> using separate_debug_objfile_link.
Yes, I agree, forgot...
> So, I think this test should actually be:
>
> if (SYMBOL_SYMTAB (symbol)->objfile == solib->objfile
> || SYMBOL_SYMTAB (symbol)->objfile->separate_debug_objfile_backlink
> == solib->objfile)
>
> What do you think?
Unaware how to improve it more.
No regressions on {x86_64,x86_64-m32,i686}-fedora12-linux-gnu.
OK to check-in?
Thanks,
Jan
gdb/
2010-04-03 Jan Kratochvil <jan.kratochvil@redhat.com>
Tom Tromey <tromey@redhat.com>
* printcmd.c (display_uses_solib_p): Check also
SEPARATE_DEBUG_OBJFILE_BACKLINK. New variable symbol_objfile.
gdb/testsuite/
2010-04-03 Jan Kratochvil <jan.kratochvil@redhat.com>
* gdb.base/solib-display.exp (split solib): New.
--- a/gdb/printcmd.c
+++ b/gdb/printcmd.c
@@ -1888,6 +1888,7 @@ display_uses_solib_p (const struct display *d,
{
const struct block *const block = elts[i + 1].block;
const struct symbol *const symbol = elts[i + 2].symbol;
+ struct objfile *symbol_objfile;
if (block != NULL
&& solib_contains_address_p (solib,
@@ -1895,7 +1896,10 @@ display_uses_solib_p (const struct display *d,
return 1;
/* SYMBOL_OBJ_SECTION (symbol) may be NULL. */
- if (SYMBOL_SYMTAB (symbol)->objfile == solib->objfile)
+ symbol_objfile = SYMBOL_SYMTAB (symbol)->objfile;
+ if (symbol_objfile == solib->objfile
+ || symbol_objfile->separate_debug_objfile_backlink
+ == solib->objfile)
return 1;
}
endpos -= oplen;
--- a/gdb/testsuite/gdb.base/solib-display.exp
+++ b/gdb/testsuite/gdb.base/solib-display.exp
@@ -53,6 +53,13 @@ if { [gdb_compile_shlib ${srcfile_lib} ${binfile_lib} $lib_flags] != ""
return -1
}
+set test "split solib"
+if {[gdb_gnu_strip_debug $binfile_lib] != 0} {
+ fail $test
+} else {
+ pass $test
+}
+
gdb_exit
gdb_start
gdb_reinitialize_dir $srcdir/$subdir
next prev parent reply other threads:[~2010-04-09 15:30 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-04-03 9:56 Jan Kratochvil
2010-04-07 19:25 ` Tom Tromey
2010-04-09 15:30 ` Jan Kratochvil [this message]
2010-04-09 15:34 ` Pedro Alves
2010-04-09 15:53 ` Jan Kratochvil
2010-04-09 16:48 ` Pedro Alves
2010-04-09 20:01 ` Jan Kratochvil
2010-04-11 1:27 ` Pedro Alves
2010-04-19 14:25 ` Jan Kratochvil
2010-04-20 11:05 ` Pedro Alves
2010-04-22 22:30 ` Jan Kratochvil
2010-04-22 22:52 ` Pedro Alves
2010-04-22 23:17 ` Jan Kratochvil
2010-04-09 17:17 ` Tom Tromey
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=20100409153014.GA10379@host0.dyn.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