Implement in-frame evaluation in the vm service.
Add a notion of 'current frame' and use it across the debugger,
particularly in source-location based commands (break, clear).
Change the expansion logic for frames, so that by default only the
current frame is shown. When a user expands a frame it is now pinned.
Change command line parsing so that internal whitespace is preserved. We need this to properly evaluate expressions with internal whitespace.
Fix a deadlock in the debugger message loop.
R=johnmccutchan@google.com
Review URL: https://codereview.chromium.org//993613002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44353 260f80e4-7a28-3924-810f-c04153c831b5
--------
VM
Add a new ServiceEvent class in the vm. Rework the event type names.
Add BreakpointAdded, BreakpointResolved, and BreakpointRemoved
service events.
Record the top frame for kIsolateInterrupted and kExceptionThrown
debugger events.
Send a top frame in more Pause* events.
Send breakpoint list with the Isolate response. Remove the
getBreakpoints method from the vm service.
Move Resume events into debugger.cc.
Rework MessageHandler a bit so that we can send PauseStart and
PauseExit notifications.
--------
Observatory
Move some event handler from Application to Isolate.
Rewrite breakpoint tracking code to use the new breakpoint events.
Change run state tracking in Isolate.
Change getFromMap so that it applies updates if the map isn't a ref.
Use getFromMap instead of new ServiceObject in invokeRpc. This
fixes some duplicate ServiceObject problems.
Review URL: https://codereview.chromium.org//979823003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44268 260f80e4-7a28-3924-810f-c04153c831b5
Simplify debugger logic. Any function can be marked as
non-debuggable when is is created. The debugger no longer
needs a heuristic which functions are debuggable.
Mostly used for synthetic, generated functions that
have no source code, e.g. async code, implicit getters and
setters, implicit constructors, forwarding constructors,
dispatcher functions.
Review URL: https://codereview.chromium.org//789643006
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42570 260f80e4-7a28-3924-810f-c04153c831b5
Make sure the debugger finds the closure function containing the body
of async functions, but not the synthetic function that generates the
future.
Change the way the debugger sets one-time breakpoints. Instead of
compiling the function and instrumenting all safe-points, set a
breakpoint marked as “one-shot” at the beginning of the function
and wait until the function is compiled. Then, once it fires, it
gets automatically deleted.
Finally, be smarter how we resolve breakpoints in compiled code.
The compiler rearranges code in await expressions, which tripped
up the debugger. This change makes sure we select the lowest compiled
code address only within the line containing the requested breakpoint
position.
R=iposva@google.com
Review URL: https://codereview.chromium.org//805573003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42368 260f80e4-7a28-3924-810f-c04153c831b5
The debugger_ is initialized in Dart::CreateIsolate but the object
store is only valid after Dart::InitializeIsolate. I could have moved
the initalization of debugger_ later, but then many of the debugger()
accesses in the vm would need null checks. Instead I moved the
isolate creation notification a bit.
I was only able to see this problem when running a two isolate program
with the --pause-isolates-on-start option.
BUG=
R=johnmccutchan@google.com
Review URL: https://codereview.chromium.org//802543002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42344 260f80e4-7a28-3924-810f-c04153c831b5
This change makes CTX available by not caching the current
context while in Dart code. Instead the current context
is held in a local variable (:saved_current_context_var) and
is passed as argument in CTX at calls.
This also simplifies a lot of code in the debugger: As a result,
Isolate::top_context is not needed anymore since the current context
can always be extracted from a Dart frame.
R=vegorov@google.com
Review URL: https://codereview.chromium.org//678763004
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41422 260f80e4-7a28-3924-810f-c04153c831b5
The creation and assignment of a fresh loop variable appeared to be outside
of the loop body. When the assignment fails, e.g. due to a type check, the
stack walking code could thus access the wrong context variables.
This CL fixes code and PC descriptor generation for for-in loops and also
fixes a separate bug that crashed the VM when printing an internal error
message.
Fixes issue 20999.
R=regis@google.com
Review URL: https://codereview.chromium.org//577423005
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@40552 260f80e4-7a28-3924-810f-c04153c831b5
Improve the isolate view and isolate summary.
Details:
- Rig DbgMsgQueueList so it can run even when the debugger hasn't started.
- Add <action-link> element for pause/resume actions.
- Introduce new flex-percentile css classes.
- Add <isolate-run-state>, <isolate-location>, <isolate-shared-summary>, and <isolate-counter-chart> elements. Counters are now displayed as a pie chart instead of as text.
- Reorg <isolate-view> and <isolate-summary> substantially.
- Add shared style sheet to <script-view>.
- Combine pause-on-start/pause-on-exit with other debugger pause events and present a consistent representation for these in the vm service. Reorg how pause events are shown in <isolate-run-state>.
- Give the user a nicer message when an isolate is still loading.
- Move the /resume command to /debug/resume. Implement this with a bool in the Isolate class which is used to smuggle resume requests from the vm service to the dart embedding api.
- Add the /debug/pause command to the vm service
- Break the DebuggerEvent struct out into its own top-level class. Add JSON printing.
etc.
R=johnmccutchan@google.com
Review URL: https://codereview.chromium.org//271153002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@36366 260f80e4-7a28-3924-810f-c04153c831b5
Some time ago when operator== calls had inlined null checks at
the call site, the debugger had to instrument multiple code breakpoints
that were all mapping to the same source position. This is no longer
necessary. This change makes sure we set a code breakpoint only at
the lowest compiled code address, so that expressions like i++ no longer
result in 2 or 3 breakpoints (one each for load filed, add, store field).
Fixes 18397.
R=srdjan@google.com
Review URL: https://codereview.chromium.org//256243002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@35510 260f80e4-7a28-3924-810f-c04153c831b5