delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2006/02/27/05:10:49

X-Spam-Check-By: sourceware.org
To: cygwin AT cygwin DOT com
From: Ed Randall <ed_randall AT yahoo DOT com>
Subject: Re: win32 error 6
Date: Tue, 21 Feb 2006 12:06:45 +0000 (UTC)
Lines: 30
Message-ID: <loom.20060221T125848-498@post.gmane.org>
References: <5 DOT 1 DOT 0 DOT 14 DOT 2 DOT 20050226182934 DOT 00c20f70 AT mail DOT hiwaay DOT net>
Mime-Version: 1.0
User-Agent: Loom/3.14 (http://gmane.org/)
X-IsSubscribed: yes
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/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

I had a similar thing trying to debug jikes.exe using gdb on cygwin.

Jikes would run normally on its own, but a SEGV occurred before "main" when
running it inside gdb.  My workaround was to make jikes.exe pause at the start
of "main" by adding a call to "getline();" as the first line of the program,
then in another window get the process ID of my jikes.exe process using

$ ps -ef | grep jikes
Ed.Randa    4036     692   2  10:26:35 /cygdrive/c/jikes-1.22/src/jikes

then start gdb in another window, telling it to attach to the already-running
process id, ie

$ gdb 
...
(gdb) attach 4036
Attaching to process 204
Reading symbols from /cygdrive/c/wss/java/jikes/jikes-1.22/src/jikes.exe...done.
[Switching to thread 204.0xa14]
(gdb) cont
Continuing.

Finally, go back to my jikes.exe window, hit <return> and the program under test
will run on under control of the debugger.

Regards

Ed




--
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