From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19032 invoked by alias); 14 Feb 2008 17:41:45 -0000 Received: (qmail 19024 invoked by uid 22791); 14 Feb 2008 17:41:45 -0000 X-Spam-Check-By: sourceware.org Received: from sca-es-mail-2.Sun.COM (HELO sca-es-mail-2.sun.com) (192.18.43.133) by sourceware.org (qpsmtpd/0.31) with ESMTP; Thu, 14 Feb 2008 17:41:24 +0000 Received: from fe-sfbay-10.sun.com ([192.18.43.129]) by sca-es-mail-2.sun.com (8.13.7+Sun/8.12.9) with ESMTP id m1EHfM6Y029030 for ; Thu, 14 Feb 2008 09:41:22 -0800 (PST) Received: from conversion-daemon.fe-sfbay-10.sun.com by fe-sfbay-10.sun.com (Sun Java System Messaging Server 6.2-8.04 (built Feb 28 2007)) id <0JW800601OLL7X00@fe-sfbay-10.sun.com> (original mail from Gordon.Prieur@Sun.COM) for gdb@sourceware.org; Thu, 14 Feb 2008 09:41:22 -0800 (PST) Received: from [129.146.82.55] by fe-sfbay-10.sun.com (Sun Java System Messaging Server 6.2-8.04 (built Feb 28 2007)) with ESMTPSA id <0JW800DYBP4XNDB0@fe-sfbay-10.sun.com> for gdb@sourceware.org; Thu, 14 Feb 2008 09:41:22 -0800 (PST) Date: Thu, 14 Feb 2008 17:41:00 -0000 From: Gordon Prieur Subject: Re: stop-on-solib-events and Cygwin (or MinGW) In-reply-to: <20080214170852.GA3552@caradoc.them.org> To: gdb@sourceware.org Message-id: <47B47D3B.8050708@sun.com> MIME-version: 1.0 Content-type: text/plain; format=flowed; charset=ISO-8859-1 Content-transfer-encoding: 7BIT References: <47B473F8.5050401@sun.com> <20080214170852.GA3552@caradoc.them.org> User-Agent: Thunderbird 1.5 (X11/20060113) X-IsSubscribed: yes Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2008-02/txt/msg00101.txt.bz2 Daniel Jacobowitz wrote: > On Thu, Feb 14, 2008 at 09:01:44AM -0800, Gordon Prieur wrote: > >> Hi, >> >> I've just added support to the NetBeans gdb module for breakpoints >> set in shared libraries explicity dlopened (as apposed to shared libraries >> linked at link time). I'm using stop-on-solib-events to do this, and it >> works >> fine on both Solaris and Linux. >> > > Why do you need to do this? i.e. what are you doing with breakpoints > that current versions of GDB don't handle for you? (There may be a > good reason, I'm just curious what it is.) > Its customer driven. In NetBeans, breakpoints persist outside of a gdb session. The simplified scenario I'm using in my test cases contains 2 files, main.c and shared.c (shared.c builds into a dll). If I link main.c with the shared library then when I start debugging main, all breakpoints in shared.c are active. If I don't link the dll into main but explicitly dlopen it, the breakpoints aren't active unless I set them after the dlopen. >> However, if I set this property on Windows I don't get stopped after >> my dlopen/dlclose calls. Is there any way (on Windows) to make this >> feature work? The alternative is to provide a complete 2nd implementation >> for Windows (based on stopping in dlopen, calling "finish", and comparing >> info share from before and after). Since stack information isn't always >> reliable on Windows, I'm concerned this method won't be very reliable. >> >> Are there technical reasons why stop-on-solib-events doesn't work on >> Windows? Or is it just unimplemented on that platform? Would I see the >> same behavior on Vista? >> > > It's just unimplemented. However, you might want to try a current CVS > snapshot. I think it should work now that Pedro switched win32 over > to XML-based libraries. > Will this be part of gbd 6.8? From my point of view, its only fixed when I can recommend a specific version of Cygwin and/or MinGW to my customers. Even then, I'll need to support legacy versions without this feature. So even if its fixed, I think I'll need to maintain my alternate Windows implementation for a while. Thanks, Gordon