Re: Modifying the arguments to a function is a bad idea
- From: Flash Gordon <smap@xxxxxxxxxxxxxxxxx>
- Date: Fri, 31 Jul 2009 20:34:11 +0100
jacob navia wrote:
Mark McIntyre wrote:jacob navia wrote:
After that assignment it is impossible to go to the first line of the
function and restart it, since the original value of a is lost.
I'm not sure I follow. You can't "go to the start" of a function except by calling it again. In which case you can reset the parameter to whatever you want. If you mean "rewind the debugger and rerun the function", surely thats a QOI issue for the debugger- it should store the complete state so it can rewind properly.
Imagine. At each function (sionce the debugger doesn't know if it
will crash) the debugger should stop the program, save the state
(that can be huge) and then go on in case the function crashes
and the user wants to go back!
<snip>
I've used system where you could have a trace of exactly what has happened going back certainly millions of instructions. I've heard of systems that allow you to step backwards through the code a machine-code instruction at a time, although I've never actually such systems.
--
Flash Gordon
.
- References:
- Modifying the arguments to a function is a bad idea
- From: jacob navia
- Re: Modifying the arguments to a function is a bad idea
- From: Mark McIntyre
- Re: Modifying the arguments to a function is a bad idea
- From: jacob navia
- Modifying the arguments to a function is a bad idea
- Prev by Date: Re: "regulars" do not use debuggers
- Next by Date: Re: Printing the last item of a structure twice
- Previous by thread: Re: Modifying the arguments to a function is a bad idea
- Next by thread: test
- Index(es):
Relevant Pages
|