News for hackers. Stuff that matters.
Re:Interactive Programming in C by anon4 on Sunday December 28, 2014 @06:49AM (#8806058)
I know the Visual Studio C++ debugger has edit-and-continue functionality. It would be nice to read how that is implemented, since it's obviously much more invasive than this.
Re:Interactive Programming in C by deng on Sunday December 28, 2014 @07:41AM (#8806141)
I don't know how Visual Studio does it, but Apple did implement a feature called "fix and continue" for gdb (it was very dependend on XCode, so it could not be merged to mainline). The implementation was described like this:

"It was pointed out that I never said what F&C _is_. It's a feature for debugging your program, where you can modify your sources mid-debug-session, and the debugger will "patch" in the new code. At a very high level, the source file you're modifying is built as a shared library, gdb executes inferior function calls to load that shared library into the program, gdb finds all old versions of all functions contained in that shared library and writes trampolines in the prologues to jump to the new versions of those functions, and gdb redirects all file-static (including global) variables in that shared library to point to the statics/globals in the original executable."

(From: http://osdir.com/ml/gdb.devel/2003-06/msg00518.html)

Re:Interactive Programming in C by 0xFFC on Sunday December 28, 2014 @02:10PM (#8807038)
can you explain how visual studio do this ? what should I search for learning about it ?