From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18695 invoked by alias); 18 Feb 2008 05:08:19 -0000 Received: (qmail 18685 invoked by uid 22791); 18 Feb 2008 05:08:18 -0000 X-Spam-Check-By: sourceware.org Received: from pool-72-74-94-250.bstnma.fios.verizon.net (HELO ednor.cgf.cx) (72.74.94.250) by sourceware.org (qpsmtpd/0.31) with ESMTP; Mon, 18 Feb 2008 05:08:00 +0000 Received: by ednor.cgf.cx (Postfix, from userid 201) id 39205672A20; Mon, 18 Feb 2008 00:07:59 -0500 (EST) Date: Mon, 18 Feb 2008 06:06:00 -0000 From: Christopher Faylor To: sroberts82 , gdb@sourceware.org Subject: Re: GDB debugging dll loaded by exe - failing Message-ID: <20080218050759.GA29214@ednor.casa.cgf.cx> Mail-Followup-To: sroberts82 , gdb@sourceware.org References: <15532302.post@talk.nabble.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <15532302.post@talk.nabble.com> User-Agent: Mutt/1.5.16 (2007-06-09) 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/msg00122.txt.bz2 On Sun, Feb 17, 2008 at 11:41:01AM -0800, sroberts82 wrote: >Hi, >I'm trying to use GDB (Cygwin) within Eclipse. I am trying to debug >process.exe whose source I do not have but it loads my dll, stephen.dll >which I want to debug. Initially, when I attach to the process it appears to >suspend it succesfully. However, I get these messages: > >Cannot access memory at address 0x2ae0000 >Previous frame inner to this frame (corrupt stack?) >Previous frame inner to this frame (corrupt stack?) >Cannot access memory at address 0x2ae0000 >Cannot access memory at address 0x2ae0000 > >I don't know about windows security model for preventing me debugging things >I shouldn't but whatever it is I'm presuming it's being enforced here as >this is not my exe. > >However, when I try to view the disassembly, I can't see anything. > >So, I resume the process. This itself if quite sporadic as to whether or not >it is succesful. Quite often (as in 60% plus), gdb crashes. When it does >work, I carry on and load my dll and get the following messages: > >Error: dll starting at 0x2141000 not found. > >Error: dll starting at 0x661c1000 not found. > >Error: dll starting at 0x685b1000 not found. > >Error: dll starting at 0x72801000 not found. > >When I try to set a breakpoint in my dll code, it seems to get set fine. But >when I do whatever I do to get that code to run, gdb just crashes, always. What version of gdb are you using? If you are using the one from the Cygwin release you might try building a gdb from CVS to see if that works better. It's possible that your problems are due to dll relocation and the gdb in CVS works better in that scenario. cgf