delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2001/01/15/10:27:43

Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT sources DOT redhat DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT sources DOT redhat DOT com>
List-Help: <mailto:cygwin-help AT sources DOT redhat DOT com>, <http://sources.redhat.com/ml/#faqs>
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 <deo AT logos-m DOT ru>
X-Mailer: The Bat! (v1.45) Personal
Reply-To: Egor Duda <cygwin AT cygwin DOT com>
Organization: DEO
X-Priority: 3 (Normal)
Message-ID: <17031737926.20010115182533@logos-m.ru>
To: "Trevor Forbes" <trevorforbes AT ozemail DOT com DOT au>
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

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

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019