From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13264 invoked by alias); 9 Apr 2010 16:48:01 -0000 Received: (qmail 13242 invoked by uid 22791); 9 Apr 2010 16:47:59 -0000 X-SWARE-Spam-Status: No, hits=-0.3 required=5.0 tests=BAYES_00,KAM_STOCKGEN,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; Fri, 09 Apr 2010 16:47:54 +0000 Received: (qmail 16564 invoked from network); 9 Apr 2010 16:47:53 -0000 Received: from unknown (HELO orlando.localnet) (pedro@127.0.0.2) by mail.codesourcery.com with ESMTPA; 9 Apr 2010 16:47:53 -0000 From: Pedro Alves To: Jan Kratochvil Subject: Re: [patch] Fix dangling displays in separate debug Date: Fri, 09 Apr 2010 16:48: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> <201004091634.01221.pedro@codesourcery.com> <20100409155249.GA11583@host0.dyn.jankratochvil.net> In-Reply-To: <20100409155249.GA11583@host0.dyn.jankratochvil.net> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201004091747.50536.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/msg00261.txt.bz2 On Friday 09 April 2010 16:52:49, Jan Kratochvil wrote: > > Would using objfile_separate_debug_iterate be better? > > In this case we are examining `struct expression *'. > EXP contains `struct symbol *'. > SYMBOL points to `struct objfile *' of the separate debug info file. > > If SYMBOL points to `struct objfile *' of the main binary, it is equal to > SOLIB->OBJFILE and it has been already checked before. > > The main binary -> separate debug info direction provided by the iterating > functionality of objfile_separate_debug_iterate is not useful in this case. Thanks for explaining. I should have read the patch properly. Just one more question: > - 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; Can't both `symbol_objfile->separate_debug_objfile_backlink' (because symbol_objfile is the main objfile already) and `solib->objfile' (because GDB didn't find any symbols for the shared library) be NULL, and hence this returns false positives? -- Pedro Alves