Need tips debugging a crash porting an app to cygwin caused by sth overwriting a function

Dalibor Topic robilad@kaffe.org
Thu Dec 18 02:08:00 GMT 2003


Hi Christopher,

Christopher Faylor wrote:
> On Wed, Dec 17, 2003 at 11:40:39PM +0100, Dalibor Topic wrote:
> 
>>I was thinking about defining a gdb command along the lines of
>>
>>define my-stepi-watch
>>while (*(long *) findJarFiles == original_value)
>>stepi
>>end
>>
>>though I've never done that before, so I'm not sure if that would work ;)
> 
> 
> It might work but I think you'd probably end up tracking the heat death
> of the universe before you'd see a result.  :-)

Then you better prepare to die. ;)

Actually, I've seen a result as soon as I let the macro lose. It turns 
out that someverhere between

(1) (gdb) p *(long*) findJarFiles
$1=something
(gdb) b main
(gdb) run
break point in main reached
(2)(gdb) p *(long *) findJarFiles
$2=somethingElse

(1) and (2) the object code of findJarFiles is changed, i.e. even before 
the program starts at all. *Now* I'm really puzzled.

Any idea how to debug that? What could it be that's invoked before main 
that modifies object code?

cheers,
dalibor topic


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



More information about the Cygwin mailing list