From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12971 invoked by alias); 6 Mar 2009 17:48:32 -0000 Received: (qmail 12872 invoked by uid 22791); 6 Mar 2009 17:48:31 -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, 06 Mar 2009 17:48:26 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by filtered-rock.gnat.com (Postfix) with ESMTP id 850A12BAB85; Fri, 6 Mar 2009 12:48:28 -0500 (EST) 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 aSHqWy59fde7; Fri, 6 Mar 2009 12:48:28 -0500 (EST) Received: from joel.gnat.com (localhost.localdomain [127.0.0.1]) by rock.gnat.com (Postfix) with ESMTP id 443472BABEA; Fri, 6 Mar 2009 12:48:28 -0500 (EST) Received: by joel.gnat.com (Postfix, from userid 1000) id DC3C8E7ACD; Fri, 6 Mar 2009 09:48:22 -0800 (PST) Date: Fri, 06 Mar 2009 17:48: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: <20090306174822.GJ3744@adacore.com> References: <8ac60eac0902181458g39dfbce9k63c3329528b0aad5@mail.gmail.com> <20090223010759.GA30997@adacore.com> <8ac60eac0902231012lb42bcb1q8b8cf19ad2ac192@mail.gmail.com> <8ac60eac0903021830w363783ear7d4c8fc1177d6448@mail.gmail.com> <8ac60eac0903041124s1aafb562u225f268c4d1511dd@mail.gmail.com> <20090305200415.GC3744@adacore.com> <8ac60eac0903051546r1eaffc89tf1f35b21e6dc1b40@mail.gmail.com> <8ac60eac0903051906r5d41990bwcaccdfb4accef562@mail.gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <8ac60eac0903051906r5d41990bwcaccdfb4accef562@mail.gmail.com> User-Agent: Mutt/1.4.2.2i 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 Mail-Followup-To: gdb-patches@sourceware.org X-SW-Source: 2009-03/txt/msg00082.txt.bz2 > A) bp_shlib_event type breakpoints should also be shlib_disable'd, or For this option, I'm not sure off the top of my head. I think it would require careful analysis. If we were going this route, I would definitely not approve the change just on my own (I'd ask for confirmation from my fellow maintainers). Let put this aside for now... > C) the call to "solib_address (block->startaddr)" should be replaced with > something like "solib_contains_p (solib, block->startaddr)" (which would > then work independently of the so_list_head). Duh! Yes - this sounds like a pretty simple way to do this. We know which solib we're trying to match our expression against, why are we iterating over all SOs again? I like your suggestion. The body of solib_contains_p (can we rename it to "solib_contains_address" or "solib_has_address") can be extracted from solib_address. (On a side note - I think that "solib_address" is a bad name. Independently of this change, we should think about changing it to "solib_name_from_address" one of these days). -- Joel