From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29137 invoked by alias); 11 Apr 2010 01:27:45 -0000 Received: (qmail 29129 invoked by uid 22791); 11 Apr 2010 01:27:44 -0000 X-SWARE-Spam-Status: No, hits=-1.8 required=5.0 tests=BAYES_00,TW_BJ,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mail.codesourcery.com (HELO mail.codesourcery.com) (38.113.113.100) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sun, 11 Apr 2010 01:27:40 +0000 Received: (qmail 7800 invoked from network); 11 Apr 2010 01:27:38 -0000 Received: from unknown (HELO orlando.localnet) (pedro@127.0.0.2) by mail.codesourcery.com with ESMTPA; 11 Apr 2010 01:27:38 -0000 From: Pedro Alves To: Jan Kratochvil Subject: Re: [patch] Fix dangling displays in separate debug Date: Sun, 11 Apr 2010 01:27:00 -0000 User-Agent: KMail/1.12.2 (Linux/2.6.31-20-generic; KDE/4.3.2; x86_64; ; ) Cc: gdb-patches@sourceware.org, Tom Tromey References: <20100403095558.GA22520@host0.dyn.jankratochvil.net> <201004091747.50536.pedro@codesourcery.com> <20100409200046.GA22709@host0.dyn.jankratochvil.net> In-Reply-To: <20100409200046.GA22709@host0.dyn.jankratochvil.net> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201004110227.35104.pedro@codesourcery.com> X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2010-04/txt/msg00318.txt.bz2 On Friday 09 April 2010 21:00:46, Jan Kratochvil wrote: > On Fri, 09 Apr 2010 18:47:50 +0200, Pedro Alves wrote: > > and `solib->objfile' > > (because GDB didn't find any symbols for the shared library) be NULL, > > I was convinced due to some invalid reasons solib->objfile cannot be NULL. There's an easy way to see that state: (gdb) nosharedlibrary (gdb) info sharedlibrary This will not reload symbol info, thus you'll have a bunch of solibs with objfile set to NULL. [do `(gdb) sharedlibrary' to reload debug info]. > gdb/ > 2010-04-09 Jan Kratochvil > Tom Tromey > Pedro Alves > > * printcmd.c (display_uses_solib_p): Check also > SEPARATE_DEBUG_OBJFILE_BACKLINK. New variable symbol_objfile. > * solist.h (struct so_list) : New comment. > * symtab.h (struct general_symbol_info) : Extend the > comment. This part is OK. Thanks for the new comments. > > gdb/testsuite/ > 2010-04-09 Jan Kratochvil > > * gdb.base/solib-display.exp (split solib): New. Doesn't this make it so that only the separate debug info case is exercised, and, it stops exercising the non-separate debug info case? I think we should instead be running the relevant parts the test twice instead? > --- 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 Not all systems support this, so this should be `unsupported' instead. When you make the tests run twice, this would skip the rest of the rerunning. > +} else { > + pass $test > +} > + > gdb_exit > gdb_start > gdb_reinitialize_dir $srcdir/$subdir -- Pedro Alves