Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to list backtraces of all threads non-interactively (without needing to press ENTER key)?

I am in a gdb session trying to debug a core dump with more than 200 threads.

When I do thread apply all bt in gbd, I have to press Enter key repeatedly for more threads. Its quite annoying. Is there a way I can specify in my command to do it without pressing Enter?

Thanks for any info.

EDIT: Here is a sample output:

(gdb) thread apply all bt

Thread 409 (Thread 7505):
#0  0x00007ffff1d6961c in ?? ()
#1  0x0000000000000000 in ?? ()
...
...
...
...
<snipping out 20 some backtraces>  
...
...
...
...
Thread 390 (Thread 10529):
#0  0x00007ffff1d6961c in ?? ()
#1  0x0000001300000000 in ?? ()
#2  0x00007fffe860bd50 in ?? ()
#3  0x00007fffe8464690 in ?? ()
#4  0x0000000000000014 in ?? ()
---Type <return> to continue, or q <return> to quit---
like image 771
bits Avatar asked Nov 03 '25 04:11

bits


1 Answers

Disable the pager by using:

set height 0
like image 62
Carl Norum Avatar answered Nov 06 '25 01:11

Carl Norum



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!