Get stack-trace of all threads in dbx?
807578Jan 28 2010 — edited Feb 2 2010Hi,
I'm debugging a multi-threaded application that's hanging on occassion and I'd like to get a stack trace of all threads. I know on gdb there's a quick an easy command to do this. There doesn't seem to be any with dbx.
I've being trying to use the .dbxrc file to write a function to do the commands for me.
Here's my function, but it's only running the first command to fet the list of thread id's it seems to never get into the for loop. I'm no expert in ksh, so anyone have a clue how to get this working?
/// DBXRC function
function bt
{
p=builtin threads | awk '{print $1}' | tr -d '>' '' | tr '\n' ' '
for index in $p
do
builtin thread $i
builtin where -v
done
}