Quick way to find the stream claimed in gdb?

When my Cocoa application clicks on an assertion in the code, gdb gives me a hint as expected, but it is never (normal, rare) in the correct thread.

I know I can use the Xcode GUI debugger, and this makes it a little less painful, but I think there should be a gdb command line trick that I don't know.

Is there an easier way to find a thread that was approved differently than changing for each thread and issuing where?

+1
source share
2 answers

(gdb) thread apply all bt

+1
source

" bt". " ", , , .

, " " , , . , ( ). , , - (, 5 )

(gdb) thread apply all where 5

, , , , , , .

(gdb) set height 10000
(gdb) set logging on
(gdb) thread apply all where 5
(gdb) shell

gdb.txt .

+3

Source: https://habr.com/ru/post/1728333/


All Articles