Instead of calling code object directly, call indirectly and
pass the code object in a register. The object pool is then loaded from
the code object. This is another preparation step for making generated code
relocatable.
All non-ia32 platforms:
No entry patching.
ARM:
PC marker (now code object) moves to the same place as on x64 (below saved PP, above saved FP).
R9 is now used as PP, R10 as CODE_REG.
BUG=
R=rmacnak@google.com
Review URL: https://codereview.chromium.org//1192103004 .
- Display paused time as tooltip over "paused" word.
- Send a timestamp with every ServiceEvent.
- Unit tests verifying that paused on start, exit, and breakpoint timestamps are stable.
- Remember the pause time in DebuggerEvent.
- Remember the pause time in MessageHandler.
- Updated service protocol documentation.
R=turnidge@google.com
Review URL: https://codereview.chromium.org//1311503004 .
Fix copying breakpoints over to a new location when a latent location is resolved.
Fix bad assumption that BreakpointLocationAtLine always returns non-null result.
Review URL: https://codereview.chromium.org//1149983003
- Add _getCrashDump RPC
- crash dump service response is map of request uris to responses, includes:
-- getVM
-- getFlagList
-- for each isolate:
-- getIsolate
-- _getAllocationProfile
-- getStack
- Add FakeVM to service library
- Add load crash dump to Observatory connect page
- Removes old chromium target support from connect page
- Make debugger page display stack even if libraries can't be loaded
- Fix reload of vm-connect page
- Fix polymer initialization calls
R=turnidge@google.com
Review URL: https://codereview.chromium.org//1100583006
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@45390 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
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
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
When we call a closure, the caller saves the context before the call.
So when walking the stack, we used to check the callee activation to
see if it was a closure call, and then recover our caller-saved
context.
This breaks down in the following case:
1. Caller calls function F.
2. Function F is compiled.
3. The compiler needs to run code to evaluate a constant (e.g. a
static final getter).
4. We hit a breakpoint *while* evaluating the constant.
In this case, there is no callee frame for the closure call yet.
I fix this by using the the pc descriptors to see if the current pc in
the caller is a closure call. This avoids needing to have a callee
frame available.
---
ALSO:
New flags:
--verify-incoming-contexts: in development - verify assumptions about
contexts in stub code. (currently ia32 only)
--trace-debugger-stacktrace: this helps debug these kinds of
stacktrace issues.
Miscellaneous improvements to frame and context printing.
BUG=
R=johnmccutchan@google.com
Review URL: https://codereview.chromium.org//240213004
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@35130 260f80e4-7a28-3924-810f-c04153c831b5
Remodel the top-level isolate summary page.
Add variables to stack frames in the stack trace.
Stop putting small integers and bools in the object id ring.
Rework how we pass down null references (and null-like references like
uninitialized values).
Collect all isolate timers by default.
Change the lifetime of IsolateSpawnState so that we can refer to it
later to know how an isolate started up. Stop pretending that
IsolateSpawnState is a void*. Clean up vestigial IsolateStartData.
R=johnmccutchan@google.com
Review URL: https://codereview.chromium.org//145323002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@32128 260f80e4-7a28-3924-810f-c04153c831b5
No need to halt on single step if there is a breakpoint on the
same location. While looking at the resulting test failures, I
discovered that the step_in_equals test was not at all testing
what it was meant to test. It happened to pass because of a
related bug in the parser. Decided to abandon that test and
instead check that we can break at == even if one of the operands
is null.
Added ability to match line numbers in the debugger tests.
R=regis@google.com
Review URL: https://codereview.chromium.org//135843003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@31898 260f80e4-7a28-3924-810f-c04153c831b5
- Identify a source breakpoint by a script and a token position
rather than a function object.
- When a new breakpoint is set, iterate over all compiled functions
to see whether code breakpoints must be set.
This change fixes issues with functions that get compiled several
times, for example as implicit closures or a copies of mixin
functions or local closures of mixing functions. We did not detect
all duplicates of functions.
Eliminated recently introduced const modifiers in SourceBreakpoint
class. They tend to be in the way because several accessor methods
of SourceBreakpoint compute data lazily and modify the object as a
side effect.
Review URL: https://codereview.chromium.org//117133005
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@31372 260f80e4-7a28-3924-810f-c04153c831b5