Re: [LAU] reporting a bug: getting a backtrace

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Renato <rennabh@...>
Cc: <linux-audio-user@...>
Date: Tuesday, January 17, 2012 - 10:03 pm

On 01/17/2012 10:27 PM, Renato wrote:

Hi Renato,

You need to compile the program with gcc's '-g' option in order to
produce useful backtraces. Some software has this flag turned on by
default (check the output of `make`) but duplicating it does not hurt.

With most autotools' configured projects you can that with environment
variables:
CFLAGS=-g CXXFLAGS=-g ./configure

(Custom configure scripts often accept '--with-cflags=-g' or similar
options - usually documented in ./INSTALL)

Next run the program under the GNU debugger:

gdb --args ./path/to/binary [options]
## inside gdb:
run
## wait until it crashes, then type
thread apply all bt
## and send the output upstream.

gdb slows things down. If the application-under-test is a jack-client:
It may cause jack-timeouts and eventually jackd may kick out the client
(You should not be running jackd with realtime privileges at the same
time as jack-client under gdb). An Alternative to running the program
inside the debugger is to create core-dump of the crash, and later
analyze the dump with gdb:

ulimit -c unlimited
./my/bad/program
## crash
ls -l core.XXXXX
gdb ./my/bad/program core.XXXXX
thread apply all bt

HTH,
robin
_______________________________________________
Linux-audio-user mailing list
Linux-audio-user@lists.linuxaudio.org
http://lists.linuxaudio.org/listinfo/linux-audio-user

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[LAU] reporting a bug: getting a backtrace, Renato, (Tue Jan 17, 9:29 pm)
Re: [LAU] reporting a bug: getting a backtrace, Robin Gareus, (Tue Jan 17, 10:03 pm)
Re: [LAU] reporting a bug: getting a backtrace, Renato, (Tue Jan 17, 10:21 pm)
Re: [LAU] reporting a bug: getting a backtrace, Guido Scholz, (Sat Jan 21, 3:50 pm)
Re: [LAU] reporting a bug: getting a backtrace, Renato, (Sun Jan 22, 9:10 am)
Re: [LAU] reporting a bug: getting a backtrace, Alan Russell, (Sat Jan 21, 12:11 am)
Re: [LAU] reporting a bug: getting a backtrace, Fons Adriaensen, (Sat Jan 21, 10:44 am)
Re: [LAU] reporting a bug: getting a backtrace, Fons Adriaensen, (Sat Jan 21, 12:30 am)