List Info

Thread: stack trace and breaking before crash




stack trace and breaking before crash
user name
2008-03-10 10:24:12
Hi everyone,

I have two questions:

1) A program that crashes is writing a stack trace. However,
the stack
trace is in heaxadecimal. Is there anyway of replacing the
hexadecimal
numbers with symbols?

2) Is it possible to get gdb to break before the program
crashes? In
VS 2003, the program breaks execution before the crash
allowing
inspection of the stack/variables/etc. The exception I'm
getting is:
Exception: STATUS_ACCESS_VIOLATION at eip=610AE0E9. I've
tried typing
in bt after the crash occurs but the output doesn't seem to
be a stack
trace of the running program.

I'm running gdb on cygwin.

Thanks

Taras

Re: stack trace and breaking before crash
country flaguser name
Germany
2008-03-10 10:44:50
"Taras D" <taras.digmail.com> writes:

> 1) A program that crashes is writing a stack trace.
However, the stack
> trace is in heaxadecimal. Is there anyway of replacing
the hexadecimal
> numbers with symbols?

Try addr2line.

Andreas.

-- 
Andreas Schwab, SuSE Labs, schwabsuse.de
SuSE Linux Products GmbH, Maxfeldstraße 5, 90409 Nürnberg,
Germany
PGP key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5
214B 8276 4ED5
"And now for something completely different."

Re: stack trace and breaking before crash
country flaguser name
United States
2008-03-10 10:53:52
Taras D wrote:

> 1) A program that crashes is writing a stack trace.
However, the stack
> trace is in heaxadecimal. Is there anyway of replacing
the hexadecimal
> numbers with symbols?

Set error_start to dumper to get a real core dump instead of
the stack
trace file.  Then load the core into gdb.

> 2) Is it possible to get gdb to break before the
program crashes? In
> VS 2003, the program breaks execution before the crash
allowing
> inspection of the stack/variables/etc. The exception
I'm getting is:
> Exception: STATUS_ACCESS_VIOLATION at eip=610AE0E9.
I've tried typing
> in bt after the crash occurs but the output doesn't
seem to be a stack
> trace of the running program.

Set error_start to gdb and you will be taken to the point of
the
exception when it occurs.

Brian

Re: stack trace and breaking before crash
country flaguser name
United States
2008-03-10 11:01:52
Taras D wrote:

> inspection of the stack/variables/etc. The exception
I'm getting is:
> Exception: STATUS_ACCESS_VIOLATION at eip=610AE0E9.
I've tried typing

Oh, and that address range is inside the DLL so you won't
get any
symbols without first building Cygwin with debug symbols. 
You can use
the .dbg symbols file from the -src package, although the
paths will be
wrong so gdb won't be able to display source locations.

Brian

[1-4]

about | contact  Other archives ( Real Estate discussion Medical topics )