From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8524 invoked by alias); 27 Oct 2008 13:58:10 -0000 Received: (qmail 8515 invoked by uid 22791); 27 Oct 2008 13:58:09 -0000 X-Spam-Check-By: sourceware.org Received: from main.gmane.org (HELO ciao.gmane.org) (80.91.229.2) by sourceware.org (qpsmtpd/0.31) with ESMTP; Mon, 27 Oct 2008 13:57:15 +0000 Received: from list by ciao.gmane.org with local (Exim 4.43) id 1KuSaf-0007JF-KI for gdb-patches@sources.redhat.com; Mon, 27 Oct 2008 13:57:05 +0000 Received: from mobius.qnx.com ([209.226.137.108]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 27 Oct 2008 13:57:05 +0000 Received: from aristovski by mobius.qnx.com with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 27 Oct 2008 13:57:05 +0000 To: gdb-patches@sources.redhat.com From: Aleksandar Ristovski Subject: Re: catch load/unload not implemented on any target (remove?) Date: Mon, 27 Oct 2008 14:19:00 -0000 Message-ID: <4905C8A9.3060209@qnx.com> References: <20081027004044.GA3907@adacore.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: gdb-patches@sourceware.org User-Agent: Thunderbird 2.0.0.17 (Windows/20080914) In-Reply-To: <20081027004044.GA3907@adacore.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: 2008-10/txt/msg00660.txt.bz2 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. > > The "protocol" between the breakpoint solib layers is based on > some macros being defined: > > SOLIB_LOADED_LIBRARY_PATHNAME(pid) > LIB_UNLOADED_LIBRARY_PATHNAME(pid) > SOLIB_CREATE_CATCH_LOAD_HOOK(pid,tempflag,filename,cond_string) > SOLIB_CREATE_CATCH_UNLOAD_HOOK(pid, tempflag, filename, cond_string) > > These macros used to be defined in the various target-dependent solib > files. For instance, in gdb-5.3, it was defined in: coff-solib.h, > pa64solib.h, solib.h, and somsolib.h. > > I think that the mechanism of using macros is definitely OBE now, and > one should use "methods" in the target_so_ops structure. I agree. > > I am conflicted as to what to do in the meantime: Leave the code as is, > and update the documentation that this feature is currently implemented > on no platform. Or remove the code entirely. > > I am leaning towards removing the code entirely, for several reasons: > - Documentating a feature as unimplemented seems silly; I agree. > - I don't think there is much in the current code that once can > reuse in order to implement this feature properly > - When someone is ready to implement this feature again for his platform, > there shouldn't be much to do in terms of infrastructure work to do at > the breakpoint module level. So it shouldn't be very difficult to > implement. There might be one little difficulty based on the fact > that some architectures will implement this feature using a phyical > breakpoint (eg: svr4) whereas others won't (eg: Windows), but that > shouldn't be very difficult to handle by using the right bp_kind. > Well, I had to implement catch load/unload; their appearance in the list of catchpoints set some expectations which evolved into requirements. I used the above mentioned macros. Thanks, Aleksandar From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7951 invoked by alias); 27 Oct 2008 13:57:44 -0000 Received: (qmail 7940 invoked by uid 22791); 27 Oct 2008 13:57:43 -0000 X-Spam-Check-By: sourceware.org Received: from qnxmail.qnx.com (HELO qnxmail.qnx.com) (209.226.137.76) by sourceware.org (qpsmtpd/0.31) with ESMTP; Mon, 27 Oct 2008 13:57:07 +0000 Received: from Nebula.ott.qnx.com (nebula.ott.qnx.com [10.42.3.30]) by hub.ott.qnx.com (8.9.3/8.9.3) with ESMTP id JAA26762; Mon, 27 Oct 2008 09:56:55 -0400 Received: from [10.42.100.129] ([10.42.100.129]) by Nebula.ott.qnx.com with Microsoft SMTPSVC(6.0.3790.3959); Mon, 27 Oct 2008 10:12:15 -0400 Message-ID: <4905C8A9.3060209@qnx.com> Date: Mon, 27 Oct 2008 13:57:00 -0000 From: Aleksandar Ristovski User-Agent: Thunderbird 2.0.0.17 (Windows/20080914) MIME-Version: 1.0 Newsgroups: gmane.comp.gdb.patches To: Joel Brobecker CC: gdb-patches@sourceware.org Subject: Re: catch load/unload not implemented on any target (remove?) References: <20081027004044.GA3907@adacore.com> In-Reply-To: <20081027004044.GA3907@adacore.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit 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/msg00659.txt.bz2 Message-ID: <20081027135700.ACgL1Zdxi4SrQWPwuerRSkJcB9Cu7p7-oBs-MGrFap8@z> 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. > > The "protocol" between the breakpoint solib layers is based on > some macros being defined: > > SOLIB_LOADED_LIBRARY_PATHNAME(pid) > LIB_UNLOADED_LIBRARY_PATHNAME(pid) > SOLIB_CREATE_CATCH_LOAD_HOOK(pid,tempflag,filename,cond_string) > SOLIB_CREATE_CATCH_UNLOAD_HOOK(pid, tempflag, filename, cond_string) > > These macros used to be defined in the various target-dependent solib > files. For instance, in gdb-5.3, it was defined in: coff-solib.h, > pa64solib.h, solib.h, and somsolib.h. > > I think that the mechanism of using macros is definitely OBE now, and > one should use "methods" in the target_so_ops structure. I agree. > > I am conflicted as to what to do in the meantime: Leave the code as is, > and update the documentation that this feature is currently implemented > on no platform. Or remove the code entirely. > > I am leaning towards removing the code entirely, for several reasons: > - Documentating a feature as unimplemented seems silly; I agree. > - I don't think there is much in the current code that once can > reuse in order to implement this feature properly > - When someone is ready to implement this feature again for his platform, > there shouldn't be much to do in terms of infrastructure work to do at > the breakpoint module level. So it shouldn't be very difficult to > implement. There might be one little difficulty based on the fact > that some architectures will implement this feature using a phyical > breakpoint (eg: svr4) whereas others won't (eg: Windows), but that > shouldn't be very difficult to handle by using the right bp_kind. > Well, I had to implement catch load/unload; their appearance in the list of catchpoints set some expectations which evolved into requirements. I used the above mentioned macros. Thanks, Aleksandar