Commit Graph

87 Commits

Author SHA1 Message Date
hausner@google.com 3f40651e3a Support evaluation of expressions in context of a stack frame
This change adds a debugger API function to evaluate an expression
in the context of a particular stack frame. The expression can
refer to local variables accessible in the frame, but it cannot
alter the variables.

R=regis@google.com

Review URL: https://codereview.chromium.org//249533003

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@35340 260f80e4-7a28-3924-810f-c04153c831b5
2014-04-23 22:56:23 +00:00
hausner@google.com ea84b80f47 Add class id to debugger stack trace
Add the class id of the origin class of each activation frame’s function.
Top-level functions have no class id. The wire protocol for an activation
frame now looks like this:

CallFrame =	“{“ functionName “:” String “,”
                    [ location “:” Location “,” ]
                    [ classId “:” Integer “,” ]
                    locals “:” NamedObjList “}“

R=devoncarew@google.com

Review URL: https://codereview.chromium.org//242453011

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@35232 260f80e4-7a28-3924-810f-c04153c831b5
2014-04-21 23:16:41 +00:00
turnidge@google.com bb6003d9b7 Fix line number table generation for multiline strings with interpolation.
Share the line number table generation code between debugger and vm service.

R=hausner@google.com

Review URL: https://codereview.chromium.org//219993004

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@34606 260f80e4-7a28-3924-810f-c04153c831b5
2014-04-01 18:16:27 +00:00
fschneider@google.com 16857e0b13 Revert r32930 (Add more timing information in the VM to track time...)
It caused severe performance regressions that should be addressed.

TBR=asiva@google.com

Review URL: https://codereview.chromium.org//177733002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@32959 260f80e4-7a28-3924-810f-c04153c831b5
2014-02-24 12:15:55 +00:00
asiva@google.com 6d313d3797 Add more timing information in the VM to track time spent is dart code Vs native code.
R=johnmccutchan@google.com, turnidge@google.com

Review URL: https://codereview.chromium.org//137483010

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@32930 260f80e4-7a28-3924-810f-c04153c831b5
2014-02-21 21:30:29 +00:00
regis@google.com 7830430adf Implement eager instantiation and canonicalization of type arguments at run
time using a cache in uninstantiated type arguments.
Remove InstantiatedTypeArguments class.
Fix a bug in optimized code: do not update unused type test cache for Smi.
Fix a bug in optimized code on ARM and MIPS in type test cache lookup.

R=iposva@google.com, srdjan@google.com

Review URL: https://codereview.chromium.org//154393003

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@32447 260f80e4-7a28-3924-810f-c04153c831b5
2014-02-07 19:54:33 +00:00
turnidge@google.com b891e78325 Post-meetup feature extravaganza.
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
2014-01-29 18:40:12 +00:00
hausner@google.com 0c434b3073 Rename kDummyTokenIndex to kNoSourcePos
Addresses comment to previous change list.

R=regis@google.com

Review URL: https://codereview.chromium.org//144343002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@31969 260f80e4-7a28-3924-810f-c04153c831b5
2014-01-21 23:46:26 +00:00
turnidge@google.com b640712e6b Handle vmservice messages while at breakpoint.
Allow rudimentary inspection of breakpoints from vmservice.

R=hausner@google.com, johnmccutchan@google.com

Review URL: https://codereview.chromium.org//113513004

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@31233 260f80e4-7a28-3924-810f-c04153c831b5
2013-12-18 17:45:17 +00:00
hausner@google.com 55c283a672 Transmit breakpoint id on paused event
Breakpoint callback get an additional parameter to receive the id of the breakpoint that was hit, or 0 if the debugger pauses due to stepping.

R=turnidge@google.com

Review URL: https://codereview.chromium.org//110913002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@31029 260f80e4-7a28-3924-810f-c04153c831b5
2013-12-10 17:41:05 +00:00
rmacnak@google.com 0b2ed441d9 Revert "De-mangle private identifiers returned by the debugger API."
Review URL: https://codereview.chromium.org//79773003

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@30489 260f80e4-7a28-3924-810f-c04153c831b5
2013-11-20 23:48:24 +00:00
rmacnak@google.com e47066f327 De-mangle private identifiers returned by the debugger API.
BUG=http://dartbug.com/14892
R=asiva@google.com

Review URL: https://codereview.chromium.org//76423004

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@30436 260f80e4-7a28-3924-810f-c04153c831b5
2013-11-20 01:40:17 +00:00
rmacnak@google.com af3f18fa84 Add an API function to get a debugger stack trace from an error handle.
BUG=http://dartbug.com/14322
R=asiva@google.com

Review URL: https://codereview.chromium.org//51793002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@30323 260f80e4-7a28-3924-810f-c04153c831b5
2013-11-15 23:42:23 +00:00
hausner@google.com 0673063f57 Add closure object type to debugger wire protocol
R=devoncarew@google.com

Review URL: https://codereview.chromium.org//61153006

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@30289 260f80e4-7a28-3924-810f-c04153c831b5
2013-11-14 19:42:14 +00:00
hausner@google.com 14489dd0f0 Add Dart_GetClosureInfo
Will be used by debugger wire protocol.

R=regis@google.com

Review URL: https://codereview.chromium.org//65383007

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@30162 260f80e4-7a28-3924-810f-c04153c831b5
2013-11-11 18:22:05 +00:00
jacobr@google.com 761c1de735 Fix to asiva's code review comments on TBR Cl.
BUG=
R=asiva@google.com

Review URL: https://codereview.chromium.org//49613002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@29390 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-28 20:23:19 +00:00
hausner@google.com fcb84c8dc9 Fix expression evaluation in library context
- Use correct source for patch functions when class
  finalizer reports error
- Reinstate support for class in Dart_EvaluateExpr

R=regis@google.com

Review URL: https://codereview.chromium.org//25284003

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@28064 260f80e4-7a28-3924-810f-c04153c831b5
2013-09-30 18:49:32 +00:00
rmacnak@google.com 89d5616468 Never return a Dart_Handle on a dart::Class from the embedding API.
R=asiva@google.com

Review URL: https://codereview.chromium.org//24210003

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@27715 260f80e4-7a28-3924-810f-c04153c831b5
2013-09-20 18:29:56 +00:00
jacobr@google.com cac607707a Make Dart_ScriptGetTokenInfo account for line_offset() and col_offset()
Cleanup bugs in wrapExpressionAsClosure Fix bug in how setters were handled and filter out 'this' from local variables list.

BUG=
R=hausner@google.com

Review URL: https://codereview.chromium.org//23526056

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@27581 260f80e4-7a28-3924-810f-c04153c831b5
2013-09-17 20:52:22 +00:00
jacobr@google.com d9f7cc5099 Add "function" as an argument to Dart_ActivationFrameInfo
BUG=
R=hausner@google.com

Review URL: https://codereview.chromium.org//23609032

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@27440 260f80e4-7a28-3924-810f-c04153c831b5
2013-09-12 17:45:42 +00:00
hausner@google.com f82de66060 Evaluation of expression in context of library top-level
Third and final part of expression evaluation in the context
of an (object|class|library).

R=iposva@google.com

Review URL: https://codereview.chromium.org//23514020

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@26898 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-29 23:24:23 +00:00
hausner@google.com 2642b1e522 Evaluate expression in the context of a class
Allows debugger to evaluate an expression in the context of a
static method of a class.

R=srdjan@google.com

Review URL: https://codereview.chromium.org//23102019

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@26617 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-23 22:42:41 +00:00
hausner@google.com 8e9139da08 Fix debugger stack traces
This change fixes the lookup of exception handlers that are
contained in activation frames that are not user-visible
(e.g. frames in dart library code).

Fixes issue 12318 (https://code.google.com/p/dart/issues/detail?id=12318)

R=srdjan@google.com

Review URL: https://codereview.chromium.org//23000011

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@26445 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-21 17:22:30 +00:00
jacobr@google.com 605b33c1bc fix cpp11 compile errors
R=asiva@google.com

Review URL: https://codereview.chromium.org//23072026

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@26387 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-20 20:24:11 +00:00
hausner@google.com d62ea57f8e Evaluate expression in context of an object
This is the core functionality needed for the debugger.

Review URL: https://codereview.chromium.org//23067006

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@26328 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-19 22:17:09 +00:00
asiva@google.com 50cc2b4a1e Fix for issue 12136 (do not try to copy type arguments if the base class
has no type arguments).

R=regis@google.com

Review URL: https://codereview.chromium.org//20575003

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@25688 260f80e4-7a28-3924-810f-c04153c831b5
2013-07-31 23:27:25 +00:00
asiva@google.com 417a55d314 Allow type objects to be passed in to Dart_GetStaticFields
(This is in sync with the change to have the entire Dart API surface
accept type objects instead of exposing the class objects).

R=jacobr@google.com

Review URL: https://codereview.chromium.org//19713002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@25137 260f80e4-7a28-3924-810f-c04153c831b5
2013-07-18 00:28:03 +00:00
asiva@google.com 5f0c327096 Add Dart_GetSupertype to the dart debugger API so that the dartium
debugger interface can use this instead of Dart_GetSuperClass.

R=regis@google.com

Review URL: https://codereview.chromium.org//18238003

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@24648 260f80e4-7a28-3924-810f-c04153c831b5
2013-07-01 19:46:42 +00:00
hausner@google.com 1e955965df Better single stepping in VM debugger
Single stepping now steps into the next dart code that the
user is interested in, including from one asynchronous task
to the next.

R=asiva@google.com

Review URL: https://codereview.chromium.org//17846009

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@24632 260f80e4-7a28-3924-810f-c04153c831b5
2013-07-01 17:29:18 +00:00
iposva@google.com b60d09b1fb - Add different types for persistent and weak persistent handles
in the Dart C API.
- Adapt code in the runtime.

R=asiva@google.com

Review URL: https://codereview.chromium.org//15772005

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@23421 260f80e4-7a28-3924-810f-c04153c831b5
2013-05-30 15:55:59 +00:00
iposva@google.com e24d83c10d - Add a GetClassId() to Object, so that we do not have to
create a temporary class handle only to get at an object's
  class id, which is stored in the object header.

R=asiva@google.com

Review URL: https://codereview.chromium.org//15338008

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@22904 260f80e4-7a28-3924-810f-c04153c831b5
2013-05-20 21:01:31 +00:00
hausner@google.com 428829c41a Create handle scope in debugger callback
Fix issue 10052.

Review URL: https://codereview.chromium.org//14246043

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@21764 260f80e4-7a28-3924-810f-c04153c831b5
2013-04-19 19:54:49 +00:00
hausner@google.com df5c543b6f Add library id, location info to breakpointResolved event
Review URL: https://codereview.chromium.org//13940008

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@21592 260f80e4-7a28-3924-810f-c04153c831b5
2013-04-16 23:24:21 +00:00
hausner@google.com 89949d455b Deprecate old debugger breakpoint handler
- Add new breakpoint handler callback that does not take a
  stack trace
- Remove deprecated handler from debugger core
- Adjust tests
- Old breakpoint handler support remain in code until Dartium
  switches to new handler.

Review URL: https://codereview.chromium.org//14298002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@21569 260f80e4-7a28-3924-810f-c04153c831b5
2013-04-16 19:42:39 +00:00
hausner@google.com 268bdbc85f More cleanups in debugger API and wire protocol
Review URL: https://codereview.chromium.org//13975018

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@21392 260f80e4-7a28-3924-810f-c04153c831b5
2013-04-12 21:49:24 +00:00
hausner@google.com 8b71446903 Remove legacy debugger API stuff. The removed functions do not appear to be used in Dartium.
Review URL: https://codereview.chromium.org//14029016

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@21305 260f80e4-7a28-3924-810f-c04153c831b5
2013-04-11 19:26:25 +00:00
hausner@google.com 1a4d308dea Add library id to code location object
Add libraryId field to the JSON Location object in the debugger
wire protocol.
Review URL: https://codereview.chromium.org//13771013

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@21098 260f80e4-7a28-3924-810f-c04153c831b5
2013-04-08 18:31:56 +00:00
hausner@google.com ee69789e07 Add line table command to debugger
New command returns token information of a script. This will enable
the editor/debugger to translate token offsets to line numbers.
Review URL: https://codereview.chromium.org//13533016

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@21009 260f80e4-7a28-3924-810f-c04153c831b5
2013-04-05 23:45:14 +00:00
hausner@google.com b0b38313ec Add text location in debugger event
- Adding token number in text location data. Line number will be
  removed when the editor knows how to convert a token number to its
  line number.
- "location" field in stack frames is now optional. If it is not present, there
  is no corresponding textual location for the code location.
- Add location info of "paused" and "interrupted" events.
  Stack trace will go away in these events.
Review URL: https://codereview.chromium.org//13144018

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@20816 260f80e4-7a28-3924-810f-c04153c831b5
2013-04-02 20:41:29 +00:00
asiva@google.com 6e878e9c12 Remove Dart_GetScriptSource as it is not used anywhere.
Review URL: https://codereview.chromium.org//12732007

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@19998 260f80e4-7a28-3924-810f-c04153c831b5
2013-03-14 10:18:00 +00:00
asiva@google.com 6b8987e55b Add a command line option to generate source code for a script
(apparently this would be useful for pretty printing the output of
dart2dart)
Review URL: https://codereview.chromium.org//12517005

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@19996 260f80e4-7a28-3924-810f-c04153c831b5
2013-03-14 09:47:46 +00:00
tball@google.com 4c4482e4c7 Initial prototype of vmstats support, based on Dart VM Stats draft design doc.
Review URL: https://codereview.chromium.org//12221022

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@19091 260f80e4-7a28-3924-810f-c04153c831b5
2013-02-26 22:34:08 +00:00
regis@google.com feb7329e2f Resubmitting r18013.
Review URL: https://codereview.chromium.org//12084120

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@18018 260f80e4-7a28-3924-810f-c04153c831b5
2013-02-02 00:18:37 +00:00
regis@google.com 450bf7c06c Revert r18013 failing on Windows.
Review URL: https://codereview.chromium.org//12169002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@18015 260f80e4-7a28-3924-810f-c04153c831b5
2013-02-01 23:58:53 +00:00
regis@google.com c651283897 Cleanup api for isolate state checking.
This should avoid the breakage on Windows observed by reverted r17962.
Review URL: https://codereview.chromium.org//12082126

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@18013 260f80e4-7a28-3924-810f-c04153c831b5
2013-02-01 23:43:33 +00:00
asiva@google.com f4fe42c280 Added macros OBJECT_IMPLEMENTATION and FINAL_OBJECT_IMPLEMENTATION
which have different implementations of 'operator=' and 'operator^='.
In the case of FINAL_OBJECT_IMPLEMENTATION we do not do the vtable setting
in these methods (Note the |= operator functionality is now subsumed into
the new implementation of "operator^=")
Review URL: https://codereview.chromium.org//12052033

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@17491 260f80e4-7a28-3924-810f-c04153c831b5
2013-01-23 20:01:31 +00:00
hausner@google.com c3a133777d Add function for one-time stop at function entry
Adds function Dart_OneTimeBreakAtEntry()

Used by debugger clients to stop at the beginning of the program without setting a user-visible breakpoint.
Review URL: https://codereview.chromium.org//11926026

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@17332 260f80e4-7a28-3924-810f-c04153c831b5
2013-01-19 00:03:30 +00:00
srdjan@google.com d1c4735609 Transition ^= to |=
Review URL: https://codereview.chromium.org//11867022

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@17309 260f80e4-7a28-3924-810f-c04153c831b5
2013-01-18 19:53:17 +00:00
asiva@google.com 7022b39e35 Convert all symbol accessors to return read only handles so that it is not necessary to create a new handle in the code that uses it.
Added a few more strings to the symbols list.
Review URL: https://codereview.chromium.org//11667012

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@16584 260f80e4-7a28-3924-810f-c04153c831b5
2013-01-02 19:31:59 +00:00
asiva@google.com ceed3e5beb - Add support to interrupt a running isolate with the following command:
<===  InterruptCmd = "{" RequestId "," command ":" interrupt "," params ":" "{" isolateId ":" Integer "}" "}"
===>  InterruptCmdResp = "{" RequestId "}"

- Send isolate events over to the debugger client in the following format:
===>  "{" event ":" isolate "," params ":" "{" reason ":" created "," id ":" Integer "}" "}"
===>  "{" event ":" isolate "," params ":" "{" reason ":" shutdown "," id ":" Integer "}" "}"
===>  "{" event ":" paused "," params ":" "{" reason ":" interrupted "," callFrames ":" StackTrace "}" "}"

- Added id ";" Integer, to params in all paused events messages

- create per isolate debugger message queues, instead of the global static one

- Add 'i' command in ddbg to exercise the interrupt feature

- Add support for handling isolave event messages in ddbg
Review URL: https://codereview.chromium.org//11028040

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@13333 260f80e4-7a28-3924-810f-c04153c831b5
2012-10-05 23:10:28 +00:00