Pruning backtrace output with gdb script -


my program has 100 threads, of idle , share defined backtrace when idle. of time interested in threads not idle , therefore not have "common" backtrace. thought using gdb script way this.

define backtraces     thread apply bt end 

this script print backtraces. there way store output variable can process, prune, , display relevant backtraces?

i naively tried:

define backtraces     set $bts = thread apply bt     // whatever processing here end 

but fails following expected:

no symbol "thread" in current context.

is there better way this? or tutorials on how power script in gdb?

is there better way this?

you need use python scripting achieve desired result.

the filtering backtrace start.


Comments

Popular posts from this blog

linux - xterm copying to CLIPBOARD using copy-selection causes automatic updating of CLIPBOARD upon mouse selection -

c++ - qgraphicsview horizontal scrolling always has a vertical delta -