Page 1 of 1

how to do a stack trace?

Posted: 19 May 2012 09:46
by joseph_
In a bug report I was asked to provide a proper threaded stack trace. How to do that on Mac OS X? I found that gdb is used for that but it needs to be compiled first and I can't find a compiled version of it. Another program is lldb which is part of Xcode. But I'm not able to download Xcode because it says I need OS X 10.7.3 while I use 10.6.8 and I won't purchase an OS upgrade just for reporting a bug in VLC.

Re: how to do a stack trace?

Posted: 19 May 2012 17:54
by fkuehne
You can download the command line stuff included within Xcode directly without much hassle from github: https://github.com/kennethreitz/osx-gcc-installer/

Hope this helps!

Re: how to do a stack trace?

Posted: 20 May 2012 02:27
by joseph_
Thanks Felix, now I have gdb installed.

I tried to do a backtrace but I get lot of messages similar to this:

Code: Select all

Reading symbols for shared libraries warning: Could not find object file "/Users/fpk/Desktop/videolan/vlc-2.0/64bit/modules/audio_filter/.libs/libdtstofloat32_plugin_la-dtstofloat32.o" - no debug information available for "../../../extras/package/macosx/../../../modules/audio_filter/converter/dtstofloat32.c".
I guess I need to have a debug enabled version of vlc.

Also, my bug report is not a crash but a freeze, I have to force quit VLC or else it eats gigabytes of memory.

These are the last lines of gdb output, seems pretty useless:

Code: Select all

Program received signal SIGKILL, Killed. 0x00007fff81c4ba6a in __semwait_signal () (gdb) backtrace #0 0x00007fff81c4ba6a in __semwait_signal () #1 0x00007fff81c72896 in pthread_join () (gdb) #0 0x00007fff81c4ba6a in __semwait_signal () #1 0x00007fff81c72896 in pthread_join () (gdb) #0 0x00007fff81c4ba6a in __semwait_signal () #1 0x00007fff81c72896 in pthread_join () (gdb) #0 0x00007fff81c4ba6a in __semwait_signal () #1 0x00007fff81c72896 in pthread_join () (gdb) #0 0x00007fff81c4ba6a in __semwait_signal () #1 0x00007fff81c72896 in pthread_join () (gdb) #0 0x00007fff81c4ba6a in __semwait_signal () #1 0x00007fff81c72896 in pthread_join () (gdb) #0 0x00007fff81c4ba6a in __semwait_signal () #1 0x00007fff81c72896 in pthread_join () (gdb) #0 0x00007fff81c4ba6a in __semwait_signal () #1 0x00007fff81c72896 in pthread_join () (gdb) #0 0x00007fff81c4ba6a in __semwait_signal () #1 0x00007fff81c72896 in pthread_join () (gdb) #0 0x00007fff81c4ba6a in __semwait_signal () #1 0x00007fff81c72896 in pthread_join () (gdb) #0 0x00007fff81c4ba6a in __semwait_signal () #1 0x00007fff81c72896 in pthread_join () (gdb) #0 0x00007fff81c4ba6a in __semwait_signal () #1 0x00007fff81c72896 in pthread_join () (gdb) #0 0x00007fff81c4ba6a in __semwait_signal () #1 0x00007fff81c72896 in pthread_join () (gdb) #0 0x00007fff81c4ba6a in __semwait_signal () #1 0x00007fff81c72896 in pthread_join () (gdb) quit The program is running. Exit anyway? (y or n) y