From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28216 invoked by alias); 27 Oct 2008 00:41:25 -0000 Received: (qmail 28207 invoked by uid 22791); 27 Oct 2008 00:41:24 -0000 X-Spam-Check-By: sourceware.org Received: from rock.gnat.com (HELO rock.gnat.com) (205.232.38.15) by sourceware.org (qpsmtpd/0.31) with ESMTP; Mon, 27 Oct 2008 00:40:49 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by filtered-rock.gnat.com (Postfix) with ESMTP id F1E262A9662 for ; Sun, 26 Oct 2008 20:40:46 -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 OVJbjeyaJ-Ak for ; Sun, 26 Oct 2008 20:40:46 -0400 (EDT) Received: from joel.gnat.com (localhost.localdomain [127.0.0.1]) by rock.gnat.com (Postfix) with ESMTP id BCF9A2A961D for ; Sun, 26 Oct 2008 20:40:46 -0400 (EDT) Received: by joel.gnat.com (Postfix, from userid 1000) id 952F8E7ACD; Sun, 26 Oct 2008 17:40:44 -0700 (PDT) Date: Mon, 27 Oct 2008 00:41:00 -0000 From: Joel Brobecker To: gdb-patches@sourceware.org Subject: catch load/unload not implemented on any target (remove?) Message-ID: <20081027004044.GA3907@adacore.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline 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 X-SW-Source: 2008-10/txt/msg00650.txt.bz2 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 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 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. Thoughts? -- Joel