laptoplinux
August 8th, 2008, 04:24 PM
I'm trying to use gdb or ddd to debug code, and the problem is occurring in a subroutine in a separate source file than the main program file. How can I make gdb or ddd step into the subroutine source file and show me each line of the subroutine as it executes, and then jump back into the main file?
When I use gdb, telling it to step into the subroutine just makes it execute the whole subroutine at once, causing the crash.
When I use ddd, I can get it to step into the function, but it won't show which line it is currently on. Trying to load the source file of the subroutine loads the file, but there is now marker to indicate which line the debugger is currently on.
When I use gdb, telling it to step into the subroutine just makes it execute the whole subroutine at once, causing the crash.
When I use ddd, I can get it to step into the function, but it won't show which line it is currently on. Trying to load the source file of the subroutine loads the file, but there is now marker to indicate which line the debugger is currently on.