[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Free debugger that can do source debugging without executable.



Christopher Barry <cbarry@2xtreme.net> writes:

> Is there a debugger or a way to get ddd to load and interpret a C source
> file and step through it a step at a time without requiring the
> debug-symbol compiled executable? I seem to remember doing something
> like this a long time ago with one of Borland's IDEs, but I might be
> mistaken.

Well, it should be possible to create a script that does a quick
compile of a given C program with debugging turned on and then starts
gdb.  This is what Borland IDE's (and Microsoft's, and in fact any IDE 
I've seen that allows one to debug) in fact do.  However, you're
really going to need an IDE to do that properly, as you need to tell
the script how to compile your program (e.g. what "-l" flags to use).

If you had a proper makefile, you could simply have a script that does 
"make debug" and then invokes gdb; if you can get ddd to use that
instead of the real gdb, this may do what you want.


Reply to: