Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT sources DOT redhat DOT com Delivered-To: mailing list cygwin AT sources DOT redhat DOT com Date: Mon, 15 Jan 2001 18:25:33 +0300 From: Egor Duda X-Mailer: The Bat! (v1.45) Personal Reply-To: Egor Duda Organization: DEO X-Priority: 3 (Normal) Message-ID: <17031737926.20010115182533@logos-m.ru> To: "Trevor Forbes" CC: cygwin AT cygwin DOT com Subject: Re: Debugging cygwin1.dll In-reply-To: <001301c07d3f$34d79850$0200a8c0@voyager> References: <001301c07d3f$34d79850$0200a8c0 AT voyager> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Hi! Saturday, 13 January, 2001 Trevor Forbes trevorforbes AT ozemail DOT com DOT au wrote: TF> I have tried to debug cygwin1.dll with limited success. I am able to trace TF> the source through the cygwin1.dll until "gdb itself" just stacks dumps with TF> an access violation which then just reloads gdb (error_start). TF> I have gdb and a debug cygwin1.dll in the same directory but not in my path. TF> I run GDB from cmd.exe and then load the program under test and set the TF> breakpoints as usual. you can use strace utility, which doesn't depend on cygwin1.dll, and put appropriate debug_printf()'s to the code in question. if you want to use gdb, you can perform a following trick: put stable version of cygwin1.dll and stable version of gdb.exe somewhere out of your path, say to c:\cygdeb\ then, create c:\cygdeb\run_debugger.cmd ============= run_debugger.cmd ============= rem this set instructs cygwin1.dll to use separate shared memory area rem and thus not interfere with "main" instance if cygwin1.dll rem see winsup/shared.cc for details set CYGWIN_TESTING=1 c: cd \cygdeb gdb.exe %1 %2 ============================================ then set CYGWIN=%CYGWIN% error_start=c:\cygdeb\runb_debugger.cmd TF> Is there a more reliable method of debugging the cygwin1.dll? TF> Would I be better to remotely debug cygwin from my Linux box? Is there any TF> gdb stub to achieve this? hmm, i suppose it's possible to port gdbserver to mingw, though i can't say whether it would be hard or not. alternatively, you can link gdb/i386-stub.o in your application, supply exceptionHandler(), putDebugChar() and getDegugChar() functions to communicate to remote gdb. Egor. mailto:deo AT logos-m DOT ru ICQ 5165414 FidoNet 2:5020/496.19 -- Want to unsubscribe from this list? Check out: http://cygwin.com/ml/#unsubscribe-simple