On Sun, Jun 05, 2005 at 09:42:12AM +0200, Matijs van Zuijlen wrote:
> Package: gdb
> Version: 6.3-5
> Severity: normal
> 
> I'm not sure what is wrong, but often when I try to debug a program that
> uses threads, I cannot get a proper backtrace. Instead, I get something
> like this (the example is from gst-compprep-0.8):
> 
>   Program received signal SIGILL, Illegal instruction.
>   0x0f08de24 in mpeg2_detect_accel () from /usr/lib/libmpeg2.so.0
>   (gdb) where
>   #0  0x0f08de24 in mpeg2_detect_accel () from /usr/lib/libmpeg2.so.0
>   #1  0x0f08dd4c in mpeg2_detect_accel () from /usr/lib/libmpeg2.so.0
>   #2  0x0f08dd4c in mpeg2_detect_accel () from /usr/lib/libmpeg2.so.0
>   #3  0x0f08dd4c in mpeg2_detect_accel () from /usr/lib/libmpeg2.so.0
>   #4  0x0f08dd4c in mpeg2_detect_accel () from /usr/lib/libmpeg2.so.0
>   #5  0x0f08dd4c in mpeg2_detect_accel () from /usr/lib/libmpeg2.so.0
>   #6  0x0f08dd4c in mpeg2_detect_accel () from /usr/lib/libmpeg2.so.0
>   #7  0x0f08dd4c in mpeg2_detect_accel () from /usr/lib/libmpeg2.so.0
>   #8  0x0f08dd4c in mpeg2_detect_accel () from /usr/lib/libmpeg2.so.0
>   #9  0x0f08dd4c in mpeg2_detect_accel () from /usr/lib/libmpeg2.so.0
>   #10 0x0f08dd4c in mpeg2_detect_accel () from /usr/lib/libmpeg2.so.0
>   #11 0x0f08dd4c in mpeg2_detect_accel () from /usr/lib/libmpeg2.so.0
>   #12 0x0f08dd4c in mpeg2_detect_accel () from /usr/lib/libmpeg2.so.0
>   Previous frame inner to this frame (corrupt stack?)
>   (gdb)

This will have nothing to do with threads.  Probably that library is
compiled with -fomit-frame-pointer and does not include debugging
information; that means that GDB simply can't figure out the stack
frame.  The only way to fix this is to build a debug version, in
general.

Looking at the disassembly for the function it isn't reasonable to
expect GDB to understand what's going on (esp. the use of pushf/popf).

-- 
Daniel Jacobowitz
CodeSourcery, LLC


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to