Thread: Edit-and-Continue and Running-Backward in Debug

  1. #1
    Registered User
    Join Date
    Jan 2009
    Posts
    159

    Edit-and-Continue and Running-Backward in Debug

    Hi,
    I got two questions about GDB

    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!

  2. #2
    Technical Lead QuantumPete's Avatar
    Join Date
    Aug 2007
    Location
    London, UK
    Posts
    894
    1. No, that's not possible as far as I know.
    2. Try using the rewind command and see whether it works.

    QuantumPete
    "No-one else has reported this problem, you're either crazy or a liar" - Dogbert Technical Support
    "Have you tried turning it off and on again?" - The IT Crowd

  3. #3
    Kernel hacker
    Join Date
    Jul 2007
    Location
    Farncombe, Surrey, England
    Posts
    15,677
    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.


    --
    Mats
    Last edited by matsp; 03-02-2009 at 06:01 AM.
    Compilers can produce warnings - make the compiler programmers happy: Use them!
    Please don't PM me for help - and no, I don't do help over instant messengers.

Popular pages Recent additions subscribe to a feed

Tags for this Thread