turning off the gdb pager to collect gobs of info.
I’ve got stuff interrupted with the debugger, so I can’t invoke our external tool to collect stacks. Since gdb doesn’t have redirect for most commands here’s how I was able to collect all my stacks,...
View ArticleMaking function calls within gdb.
Here’s a quick debugging tidbit for the day, somewhat obscure, but it is a cool one and can be useful (I used it today) Gdb has a particularily nice feature of being able to call arbitrary functions on...
View Articlegdb on linux. Finding your damn thread.
Suppose you are debugging a threaded process, and know that somewhere in there you have one of many threads that’s running the code you want to debug. How do you find it? Listing the running threads...
View ArticleA gdb tip for threaded debugging. scheduler locking.
Threaded debugging can behave oddly on a number of platforms. In particular the next command can behave oddly. Here’s an example: (gdb) n 29375 m_pConnEntry->sqleCaCeGetCachedRegisteredMemory(...
View Articlegdb signal SIGCONT and pause()
Anybody used to debugging on AIX is probably familiar with the convienence of the handy pause() function. Put a call to this in your program where you want to get the debugger attached, and let it run....
View Article