Reputation: 44448
I'm using the command like interface to gdb and have set a breakpoint in multi-threaded code.
All I want is for it to display some sort of ID for the current thread so I know when I'm looking at a different thread.
I know about the thread
command, but don't want to type it in every single time.
I also know about setting breakpoints that fire only on a particular thread, but that's not what I want.
Is there a way to get gdb to just print the ID of the current thread while stepping through code?
Upvotes: 1
Views: 388
Reputation: 22519
If you have a Python-enabled gdb, you can do it with "set extended-prompt".
Upvotes: 2