From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28566 invoked by alias); 20 Mar 2009 19:54:21 -0000 Received: (qmail 28558 invoked by uid 22791); 20 Mar 2009 19:54:21 -0000 X-SWARE-Spam-Status: No, hits=-2.4 required=5.0 tests=AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from rock.gnat.com (HELO rock.gnat.com) (205.232.38.15) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 20 Mar 2009 19:54:15 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by filtered-rock.gnat.com (Postfix) with ESMTP id 755FF2BAC36; Fri, 20 Mar 2009 15:54:13 -0400 (EDT) Received: from rock.gnat.com ([127.0.0.1]) by localhost (rock.gnat.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id ZjWY4C+ZVM5u; Fri, 20 Mar 2009 15:54:13 -0400 (EDT) Received: from joel.gnat.com (localhost.localdomain [127.0.0.1]) by rock.gnat.com (Postfix) with ESMTP id 4E2392BAC35; Fri, 20 Mar 2009 15:54:13 -0400 (EDT) Received: by joel.gnat.com (Postfix, from userid 1000) id 7A38CF5CFA; Fri, 20 Mar 2009 15:54:12 -0400 (EDT) Date: Fri, 20 Mar 2009 20:32:00 -0000 From: Joel Brobecker To: Paul Pluzhnikov Cc: tromey@redhat.com, Pedro Alves , gdb-patches@sourceware.org Subject: Re: [patch] Fix a crash when displaying variables from shared library. Message-ID: <20090320195412.GF12530@adacore.com> References: <8ac60eac0903041124s1aafb562u225f268c4d1511dd@mail.gmail.com> <20090305200415.GC3744@adacore.com> <8ac60eac0903051546r1eaffc89tf1f35b21e6dc1b40@mail.gmail.com> <8ac60eac0903051906r5d41990bwcaccdfb4accef562@mail.gmail.com> <20090306174822.GJ3744@adacore.com> <8ac60eac0903061406t610ba1a1y1c62e5ee30332c7c@mail.gmail.com> <20090309183316.GA4561@adacore.com> <8ac60eac0903091624w6ec724e7s14fbfd9febc7e9c3@mail.gmail.com> <20090310133745.GA4891@caradoc.them.org> <8ac60eac0903111811n4369527et4cdeea4b09f4601f@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <8ac60eac0903111811n4369527et4cdeea4b09f4601f@mail.gmail.com> User-Agent: Mutt/1.5.18 (2008-05-17) 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: 2009-03/txt/msg00415.txt.bz2 > 2009-03-11 Paul Pluzhnikov > > * breakpoint.c (disable_breakpoints_in_shlibs): Use > solib_contains_address_p instead of searching. Unfortunately, we can't apply this patch just yet, because of: > -#ifdef PC_SOLIB > - char *so_name = PC_SOLIB (loc->address); > -#else There is still one architecture that uses PC_SOLIB (ppc-aix) :-(. I wonder if I might be able to work on this sometime soon. There are a whole bunch of macros that we could get rid of on AIX. Also, I have a couple of questions: > - && !loc->shlib_disabled > + && !loc->shlib_disabled I can't figure out what the change was in this case. The lines look completely identical. I suspect a change in white-spaces, but I couldn't see any. > - && !loc->shlib_disabled) > + && !loc->shlib_disabled > + && (b->type == bp_breakpoint || b->type == bp_hardware_breakpoint) > + && solib_contains_address_p (solib, loc->address)) I am wondering why you are checking the breakpoint type in addition to the location type. In particular, I'm trying to figure out whether it's possible to have a b->type that's not a breakpoint if loc->type is a breakpoint. Also, we weren't making that check before, so what did you see that made it you do it now? -- Joel