From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18763 invoked by alias); 11 Jan 2010 15:21:18 -0000 Received: (qmail 18738 invoked by uid 22791); 11 Jan 2010 15:21:17 -0000 X-SWARE-Spam-Status: No, hits=-2.4 required=5.0 tests=AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from mel.act-europe.fr (HELO mel.act-europe.fr) (212.99.106.210) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 11 Jan 2010 15:21:13 +0000 Received: from localhost (localhost [127.0.0.1]) by filtered-smtp.eu.adacore.com (Postfix) with ESMTP id 44618CB01DE; Mon, 11 Jan 2010 16:21:11 +0100 (CET) Received: from mel.act-europe.fr ([127.0.0.1]) by localhost (smtp.eu.adacore.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id SHTGYL-INBdk; Mon, 11 Jan 2010 16:21:11 +0100 (CET) Received: from ulanbator.act-europe.fr (ulanbator.act-europe.fr [10.10.1.67]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by mel.act-europe.fr (Postfix) with ESMTP id 31A63CB01D4; Mon, 11 Jan 2010 16:21:11 +0100 (CET) Subject: Re: [patch] Fix false warning: Shared library is missing debugging information. Mime-Version: 1.0 (Apple Message framework v1077) Content-Type: text/plain; charset=us-ascii From: Tristan Gingold In-Reply-To: <20100111151258.GA9354@host0.dyn.jankratochvil.net> Date: Mon, 11 Jan 2010 15:21:00 -0000 Cc: gdb-patches@sourceware.org Content-Transfer-Encoding: quoted-printable Message-Id: <006D59C6-DF98-4113-96E2-3F6374528EF3@adacore.com> References: <20100111151258.GA9354@host0.dyn.jankratochvil.net> To: Jan Kratochvil 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-01/txt/msg00249.txt.bz2 On Jan 11, 2010, at 4:12 PM, Jan Kratochvil wrote: > Hi, [...] > despite the system has full separate debug info files installed. >=20 > This "Shared library is missing debugging information." message was a res= ponse [...] > --- a/gdb/solib.c > +++ b/gdb/solib.c > @@ -842,6 +842,7 @@ info_sharedlibrary_command (char *pattern, int from_t= ty) > for (so =3D so_list_head; so; so =3D so->next) > { > struct cleanup *lib_cleanup; > + struct objfile *objfile; >=20 > if (! so->so_name[0]) > continue; > @@ -861,10 +862,16 @@ info_sharedlibrary_command (char *pattern, int from= _tty) > ui_out_field_skip (uiout, "to"); > } >=20 > + /* We just check the state of any single separate debug info file,= if > + such one exists. */ > + objfile =3D so->objfile; > + if (objfile->separate_debug_objfile) > + objfile =3D objfile->separate_debug_objfile; > + > if (! ui_out_is_mi_like_p (interp_ui_out (top_level_interpreter ())) > && so->symbols_loaded > - && !objfile_has_partial_symbols (so->objfile) > - && !objfile_has_full_symbols (so->objfile)) > + && !objfile_has_partial_symbols (objfile) > + && !objfile_has_full_symbols (objfile)) > { > so_missing_debug_info =3D 1; > ui_out_field_string (uiout, "syms-read", "Yes (*)"); I think you should use !objfile_has_symbols (so->objfile) instead. It is somewhat wrong to check objfile->separate_debug_objfile without check= ing the whole chain, because the chain has no particular order. (Of course, this only concerns Darwin but who knows in the future :-) Thank you for improving the user experience, Tristan.