Re: Modifying the arguments to a function is a bad idea



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
.



Relevant Pages

  • Re: Modifying the arguments to a function is a bad idea
    ... since the original value of a is lost. ... 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. ...
    (comp.lang.c)
  • debug build crashes when calling managed code
    ... In the debugger, when we call one of their APIs (we're calling a method on a ... The method we're calling takes a reference to an instance ... the stack and then call the method providing a reference to that instance. ...
    (microsoft.public.vc.language)
  • Re: SetPositions() being called at the end of the stream
    ... debugger to see who's calling it. ... quartz.dll is calling this function. ... except at the end of the stream. ... Try putting a breakpoint there and check the call stack in the ...
    (microsoft.public.win32.programmer.directx.video)
  • Re: NT Service Problem
    ... I'd perform one more test before going to the debugger. ... but rather useless tools when the problem doesn't fail for you. ... I am also calling this function in ServiceMain ... The Service starts & stops successfully if I dont call this function. ...
    (microsoft.public.vc.mfc)
  • Bug in FileStream
    ... It probably hasn't been seen before because it looks like the change log has to still be within the first page of file, and how long does a change log stay that small? ... The debugger will show that it's looping endlessly in ChunkFileMethodScanner>>positionsOf:in:firstOnly:. ... next: 3 put: $A; reset; upToEnd; ...
    (comp.lang.smalltalk.dolphin)