From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16532 invoked by alias); 27 Oct 2008 14:19:56 -0000 Received: (qmail 16524 invoked by uid 22791); 27 Oct 2008 14:19:55 -0000 X-Spam-Check-By: sourceware.org Received: from NaN.false.org (HELO nan.false.org) (208.75.86.248) by sourceware.org (qpsmtpd/0.31) with ESMTP; Mon, 27 Oct 2008 14:19:09 +0000 Received: from nan.false.org (localhost [127.0.0.1]) by nan.false.org (Postfix) with ESMTP id 4A6F910B00; Mon, 27 Oct 2008 14:19:07 +0000 (GMT) Received: from caradoc.them.org (209.195.188.212.nauticom.net [209.195.188.212]) by nan.false.org (Postfix) with ESMTP id 1AE47104BC; Mon, 27 Oct 2008 14:19:06 +0000 (GMT) Received: from drow by caradoc.them.org with local (Exim 4.69) (envelope-from ) id 1KuSvy-0001Nm-Gu; Mon, 27 Oct 2008 10:19:06 -0400 Date: Mon, 27 Oct 2008 15:43:00 -0000 From: Daniel Jacobowitz To: Joel Brobecker Cc: gdb-patches@sourceware.org Subject: Re: catch load/unload not implemented on any target (remove?) Message-ID: <20081027141906.GA5009@caradoc.them.org> Mail-Followup-To: Joel Brobecker , gdb-patches@sourceware.org References: <20081027004044.GA3907@adacore.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20081027004044.GA3907@adacore.com> User-Agent: Mutt/1.5.17 (2008-05-11) 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: 2008-10/txt/msg00662.txt.bz2 On Sun, Oct 26, 2008 at 05:40:44PM -0700, Joel Brobecker wrote: > Hello, > > I was looking at converting the catch load/unload implementation > to using the bp_catchpoint kind. But looking at the implementation, > I realized there isn't any platform where this feature is implemented. > The documentation says HP/UX, but this isn't correct either, AFAICT. It used to be, IIRC. > I think that the mechanism of using macros is definitely OBE now, and > one should use "methods" in the target_so_ops structure. I think it should be even higher level than that. The core solib machinery knows how to stop on load/unload (set stop-on-solib-events). And it knows how to update the list of loaded libraries based on current_sos. All that's missing is a 'diff' operation: report which libraries have been added or removed, so that the common code can report them sensibly to the user. I'd love if I could replace "set stop-on-solib-events 1" with "catch load" and have GDB say "Stopped at load of libfoo.so.1" or "Stopped at load of 6 libraries". The latter is not as important, since (on svr4 targets) it happens only during program startup, when the dynamic loader initializes. IOW I don't think we need any new breakpoint that we don't already have. -- Daniel Jacobowitz CodeSourcery