info threads
info threads 1 2 3 4
thread 2 # 切换
thread find {LWP} # 找指定的LWP的线程
bt # 打印栈信息

f 10 # 进入这个栈桢
p a1 # 查看变量
p *this 


gdb 速记_gdb

info threads 只能打印出线程列表。

如果想要找到指定LWP,可通过 thread find。