I have an application that I am debugging, and I am trying to understand how gdb works and why I can not execute the application sometimes. The problem that I am facing is that gdb will freeze and the process it is attached to will go down when I go through the program. After gdb freezes and I have to kill it to free the terminal (ctrl-C does not work, I have to do it from another terminal window, get the process ID for this gdb session and use kill -9).
I assume gdb hangs because it waits for the application to stop on the next instruction, and somehow the application terminates without gdb, identifying this. But this is just a reflection on my part about the behavior that I have observed so far. So my question is that anyone has seen this type of behavior before and / or could have guessed what might be the cause. I think this can help me improve my debugging strategy.
In case this is important, I am using g ++ 4.4.3, gdb 7.1, running on Ubuntu 10.04 x86_64.
linux g ++ gdb
Gabriel southern
source share