Debugging threaded application
    Vaidehi Shukla 
    vaidehi.shukla at gmail.com
       
    Mon Dec  4 22:52:26 PST 2006
    
    
  
Hi,
Here I've written following gdb macro:
define thbt
info threads
set $_count=1
while ( $_count < 3 )
thread $_count
bt
set $_count++
end
end
document thbt
Display backtrack of all the threads
end
'thread  $_count' command returns error:
(gdb) thread $_count
Thread ID 0 not known.  Use the "info threads" command to
see the IDs of currently known threads.
Means 'thread' command doesn't understand shell variable. Other commands
like 'print' works properly with shell variable.
I'm using '4.18' gdb version.
Let me know if anybody has some idea why it's not working and how to make it
correct.
Regards,
Vaidehi
    
    
More information about the freebsd-threads
mailing list