Have you tried simply running your executable in gdb, and then just hitting ^C (Ctrl+C) when you want to interrupt it? That should drop you to gdb’s prompt, where you can simply run the where
command to see where you are, and then carry on execution with continue
.
If you find yourself in a irrelevant thread (e.g. a looping UI thread), use thread
, info threads
and thread n
to go to the correct one, then execute where
.