1. Does GDB has something like "Edit and Continue" as in Visual C++? More specifically, in VC, "Edit and Continue is a time-saving feature that enables you to make changes to your source code while your program is in break mode. When you resume execution of the program by choosing an execution command like Continue or Step, Edit and Continue automatically applies the code changes with some limitations. This allows you to make changes to your code during a debugging session, instead of having to stop, recompile your entire program, and restart the debugging session."

2. How to get the ability to run programs backward? What is "target environment" in this description "If the target environment supports it, gdb can allow you to “rewind” the program by running it backward" and how to make my target environment support it? I am programming sometimes in Linux with emacs or with IDE Code::Blocks.

Thanks in advance!

03-02-2009

QuantumPete

1. No, that's not possible as far as I know.
2. Try using the rewind command and see whether it works.

QuantumPete

03-02-2009

matsp

The "Edit and continue", basically assumes that the compiler, linker and debugger understands "what changed" in the executable file.

The "rewind" feature probably requires suitable support in the "hardware adaptation", so it will probably work in big OS on big processors (e.g. Linux on x86), but less likely to work on less GDB-active environment, such as Windows on x86, or Linux on Mips.