Suppose I am in a large function. If I do "finish" GDB goes until it exits that function and tells me the line number of where that function was called from. However, I do not see where exactly that function exited from. If there are many return possibilities, I would like to know the line number inside the function where the function hit a return.
Asked
Active
Viewed 125 times
1
-
2This sounds like a use-case for GDB's [_reversible debugging_](https://sourceware.org/gdb/wiki/ProcessRecord) support. While I've never used it, I hypothesize that on entry to the function you start recording, type `finish`, then `reverse-stepi` until you find yourself at the `return` of interest. – Iwillnotexist Idonotexist Apr 05 '15 at 04:16
-
GDB can't do it. Do you know of any other debugger that can? I think this is basically uninplementable (unless you can go one instruction back in time). – n. m. could be an AI Apr 05 '15 at 04:18