delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2005/12/04/17:47:47

X-Spam-Check-By: sourceware.org
Message-ID: <439371FE.3070107@hampshire.edu>
Date: Sun, 04 Dec 2005 17:47:26 -0500
From: Robert Anderson <rfa03 AT hampshire DOT edu>
User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923)
MIME-Version: 1.0
To: cygwin AT cygwin DOT com
Subject: gdb Not reporting line where crash occurred during segfault crash on XP machine
X-HC-MailScanner: Found to be clean
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

Hi,
I'm running a Win XP machine with Cygwin 1.5.18-1.  I run gdb as follows 
(either from the command line in a standard terminal or the xterm, or in 
emacs-X11):
gdb segfaulting-app.exe
run app-args

gdb returns:
Program recieved signal SIGSEGV, Segmentation fault.
0x004c4dcb in ?? ()

Now here's the even stranger (to me, anyway) part- if I then run the gdb 
command 'where' I get
#0 0x004c4dcb in ?? ()
#1 0x0022ed88 in ?? ()
#2 0x00402aa2 in appFunction (virtualAddress=something, accessType = 
604276992) at sourceCodeFileA.c:427
#3 0x....  in ?? ()
#4 0x... in ?? () etc.

In other words in sourceCodeFileA.c at line 427, I call functioun that 
calls a long series of functions in sourceCodeFileB.c, but cygwin only 
reports the line of the higher level function call (the one in File A), 
not the specific function where the crash occurss in File B.
 I looked back over the mailing list, and saw that in the past (~5 years 
ago) there was a lot of discussion about gdb problems, and even a year 
before that  there was some mention of a similar problem to mine: that 
gdb doesn't report the line where the crash actually occurred.  But I 
haven't seen recent mention of these problems, or a mention on 
cygwin.com of this as a known flaw, so I'm hoping/assuming gdb works for 
some people.

If this tells anyone anything, the 'step' function still works if I 
insert an appropriate breakpoint, but there's still >100 steps to step 
through with each crash to try to track where the segfault occurrs in 
different situations.

Thanks for any (polite) suggestions,
Rob Anderson
rfa03 at hampshire.edu

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