www.delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2003/12/28/04:14:17

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
X-Authentication-Warning: slinky.cs.nyu.edu: pechtcha owned process doing -bs
Date: Sun, 28 Dec 2003 04:13:52 -0500 (EST)
From: Igor Pechtchanski <pechtcha AT cs DOT nyu DOT edu>
Reply-To: cygwin AT cygwin DOT com
To: =?ISO-8859-1?Q?Fr=E9d=E9ric_L=2E_W=2E_Meunier?= <1 AT pervalidus DOT net>
cc: cygwin AT cygwin DOT com
Subject: Re: How to get it working with gdb ?
In-Reply-To: <Pine.CYG.4.58.0312280002440.184@pervalidus>
Message-ID: <Pine.GSO.4.56.0312280402530.18706@slinky.cs.nyu.edu>
References: <Pine DOT CYG DOT 4 DOT 58 DOT 0312271935260 DOT 916 AT pervalidus> <20031228000052 DOT GA32301 AT redhat DOT com> <Pine DOT CYG DOT 4 DOT 58 DOT 0312280002440 DOT 184 AT pervalidus>
MIME-Version: 1.0

On Sun, 28 Dec 2003, Frédéric L. W. Meunier wrote:

> On Sat, 27 Dec 2003, Christopher Faylor wrote:
>
> > On Sat, Dec 27, 2003 at 07:42:18PM -0200, Frédéric L. W. Meunier wrote:
> > >I did the following:
> > >
> > >Start the application in a terminal.
> > >Use ps in another terminal.
> > >Use gdb -p from that terminal.
> > >
> > >Then:
> > >
> > >(gdb) c
> > >Continuing.
> > >
> > >Do something with the application.
> > >
> > >Then I tried ^C in gdb and it didn't work, but it works on
> > >Linux.
> > >
> > >Sorry, I'm not used to debug things, but I'd like to know why
> > >the above doesn't work.
> > >
> > >I'm trying to investigate the ELinks problem with compressed
> > >files, but it turns out to be a PITA. I can't reproduce it on
> > >Linux, but I guess it'd have worked since ^C does.
> >
> > Type ^C on the console that is running ELinks.
>
> Thanks, I at least got back the gdb prompt, but it always
> returns the same things with a bt, also with other
> applications:
>
> (gdb) c
> Continuing.
>
> Program received signal SIGINT, Interrupt.
> [Switching to thread 1452.0x788]
> 0x77ea31c7 in KERNEL32!GetAtomNameA () from /c/WINDOWS/system32/kernel32.dll
> (gdb) bt
> #0  0x77ea31c7 in KERNEL32!GetAtomNameA ()
>    from /c/WINDOWS/system32/kernel32.dll
> #1  0x77f57d70 in ntdll!RtlAppendStringToString ()
>    from /c/WINDOWS/System32/ntdll.dll
> #2  0x77f58a3a in ntdll!RtlAppendStringToString ()
>    from /c/WINDOWS/System32/ntdll.dll
>
> I compiled ELinks with --enable-debug, which adds -g. Doing the
> same on Linux (c, bt, ^C) always returns lines from the ELinks
> sources.
>
> Well, I uploaded a new trace in case it helps -
> http://www.pervalidus.net/tmp/elinks.txt.gz. It's much smaller.
> I used the latest cygwin1.dll and strace snapshots, strace -p
> -t, and only started it at the time I connected to the URL.

This may be way off-topic (this list is not intended to provide gdb help),
but it looks like a lot of debugging with Cygwin goes beyond rudimentary
gdb capabilities, since, AFAIU, *any* Cygwin program is multi-threaded (in
the Windows sense).  For more information on the gdb thread commands,
visit "info -f gdb.info-12 -n 'GDB/MI Thread Commands'".  A short summary
is below.

To get the list of threads, use the 'info threads' gdb command, and then
use 'thread NUM' to switch to thread number NUM.  Once you're in the right
thread, you can get a meaningful backtrace.
	Igor
-- 
				http://cs.nyu.edu/~pechtcha/
      |\      _,,,---,,_		pechtcha AT cs DOT nyu DOT edu
ZZZzz /,`.-'`'    -.  ;-;;,_		igor AT watson DOT ibm DOT com
     |,4-  ) )-,_. ,\ (  `'-'		Igor Pechtchanski, Ph.D.
    '---''(_/--'  `-'\_) fL	a.k.a JaguaR-R-R-r-r-r-.-.-.  Meow!

"I have since come to realize that being between your mentor and his route
to the bathroom is a major career booster."  -- Patrick Naughton

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

- Raw text -


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