Closed Bug 578157 Opened 11 years ago Closed 11 years ago
Single-stepping should work efficiently under Jaeger
It should be possible for a debugger to mix single-stepping through JaegerMonkey-compiled code and continuing while still retaining good performance. adrake suggests introducing a new JSTRAP_ value, JSTRAP_STEP, indicating that the program should continue a single step. JM can recompile the code placing traps at points of interest: - any jump to a different statement (regardless of source line) - *before* any function call - *before* any return - *before* any throw - *before* any eval It should also be possible to single-step across calls, returns, and throws. If the statement contains a function call, we should stop immediately before the function call; and the next step should bring us into the function call, with arguments in place. If the statement contains (is) a return, we should stop immediately before returning, at a point where we can still see local variables and such. The next step should bring us into the caller, with the return value available. Eval should behave like any other function call.
Proposed implementation is to recompile adding traplikes on JSTRAP_STEP, and recompile removing them on JSTRAP_CONTINUE or function scope exit.
Assignee: general → adrake
It looks like the way to do this currently is preserve SetInterrupt semantics, since it's used for single stepping. We may want to bump this along with associated semantic differences to debug API v2.
I'm gonna merge this into the new single-step bug.
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → DUPLICATE
Duplicate of bug: 610793
You need to log in before you can comment on or make changes to this bug.