Commit Graph

63 Commits

Author SHA1 Message Date
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
asiva@google.com 6076250adb 1. Create a port when a debugger object is created for an isolate, use this
port as the unique ID to represent an isolate in the debugger message
   format.

2. Switch the Event handler API to use an isolate id instead of the isolate
   object itself.

3. Add a unit test case for isolate debugger event handling with an
   interrupt of isolate to ensure that interrupting the isolate runs
   the interrupt event handler.
Review URL: https://codereview.chromium.org//11052006

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@13207 260f80e4-7a28-3924-810f-c04153c831b5
2012-10-04 00:13:37 +00:00
asiva@google.com 31fe6a2c79 Fix dartium build break.
Review URL: https://codereview.chromium.org//11043003

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@13132 260f80e4-7a28-3924-810f-c04153c831b5
2012-10-02 19:06:52 +00:00
asiva@google.com 27e1b05914 Add isolate event handler setup in order to be able to propagate isolate
events (create/shutdown/interrupted)
Review URL: https://codereview.chromium.org//11026011

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@13130 260f80e4-7a28-3924-810f-c04153c831b5
2012-10-02 18:09:55 +00:00
hausner@google.com 201bce4219 Support for show/hide combinators
- Add a new VM object called a Namespace.
- A Namespace is a library, and two list of names to hide/show.
- Convert Library and LibraryPrefix to contain Namespace
  objects instead of Libraries in their import list.
Review URL: https://codereview.chromium.org//10967052

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@12804 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-24 20:46:56 +00:00
devoncarew@google.com fdae229dcc Fix for http://code.google.com/p/dart/issues/detail?id=5085 - break-on-exceptions in the debugger can recurse.
This CL turns off the break-on-exceptions behavior when evaluating Dart code in the debugger (in particular, the toString() method).
Review URL: https://chromiumcodereview.appspot.com//10928149

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@12275 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-12 18:01:50 +00:00
cshapiro@google.com da14bf70a7 Add attributions so printf like functions can have their arguments checked.
This change also corrects some misuses of format strings and format
arguments that discovered by the compiler checks.

Review URL: https://chromiumcodereview.appspot.com//10869063

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11912 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-06 00:58:25 +00:00
asiva@google.com ec7f44f025 Create frequently used symbols in the vm isolate
- Avoids the need for doing a NewSymbol on these everytime
- saves space as they get shared by isolates
Review URL: https://chromiumcodereview.appspot.com//10783035

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9834 260f80e4-7a28-3924-810f-c04153c831b5
2012-07-24 00:01:50 +00:00
hausner@google.com 67191621a4 Debugger API to enable/disable debugging of libraries
Review URL: https://chromiumcodereview.appspot.com//10797033

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9772 260f80e4-7a28-3924-810f-c04153c831b5
2012-07-19 22:51:09 +00:00
hausner@google.com 057772b937 Fix Dart_GetClassInfo
issue 4142.

Also address review comments from previous change list.
Review URL: https://chromiumcodereview.appspot.com//10800024

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9764 260f80e4-7a28-3924-810f-c04153c831b5
2012-07-19 16:29:46 +00:00
srdjan@google.com bfd52ec46a Rename Script's source to Source. Trace parser (--trace-parser) only if source is available (thus skipping all the 'noise' of bootstrap methods).
Review URL: https://chromiumcodereview.appspot.com//10752017

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9494 260f80e4-7a28-3924-810f-c04153c831b5
2012-07-10 00:14:25 +00:00
regis@google.com d95cbc8d7f Use VM type cast and save handles.
Review URL: https://chromiumcodereview.appspot.com//10693071

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9317 260f80e4-7a28-3924-810f-c04153c831b5
2012-07-02 21:42:53 +00:00
hausner@google.com fbeaabda52 Debugger support to display global variables
- Add library id to ActivationFrame
- Add debugger function to get all global variables visible in
  a library (including imported variables).
- Add LibraryPrefixIterator
- Fix Dart_GetLibraryImports
Review URL: https://chromiumcodereview.appspot.com//10657048

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9121 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-26 17:32:34 +00:00
hausner@google.com a1cb082925 Add API to configure debugger pause on exception
Still to be done: proper determination whether an exception is
handled or unhandled. We still assume that TypeError and AssertionError
exceptions are unhanded.

Review URL: https://chromiumcodereview.appspot.com//10540121

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8579 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-12 21:56:50 +00:00
hausner@google.com eebec2a081 Debugger break on TypeError, AssertionError
Add debugger functionality to pause the VM whenever a TypeError
or AssertionError exception happens.

This is a first step towards breaking on handled and unhanded
exceptions in general. We first need to generate more debug info
for catch handlers so we can determine whether an exception will
be handled or not before we unwind the stack to run the catch
clauses.
Review URL: https://chromiumcodereview.appspot.com//10537065

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8457 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-08 17:51:50 +00:00
hausner@google.com c39f48340d Add string encoding to wire protocol
Also, add command to retrieve the source text of a given script.
Review URL: https://chromiumcodereview.appspot.com//10496006

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8220 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-02 00:07:12 +00:00
iposva@google.com bee192cbe4 - Rename class index to class id.
- Remove unused method.
Review URL: https://chromiumcodereview.appspot.com//10441111

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8148 260f80e4-7a28-3924-810f-c04153c831b5
2012-05-31 12:41:37 +00:00
hausner@google.com eeaa660d52 Introduce library ids and info in the wire protocol
- Library hierarchy (imports, prefixes)
- Global (top-level) variables
- Removing breakpoints
Review URL: https://chromiumcodereview.appspot.com//10447045

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8075 260f80e4-7a28-3924-810f-c04153c831b5
2012-05-29 19:51:51 +00:00
hausner@google.com 6ddf54511d Replace linked list of loaded libraries
Replace the linked list of loaded libraries with a growable array
or libraries in the object store. This array will be used in the
debugger, where we use the index of a library in the array as an
id number, similarly to the class id and the table of loaded classes.
Review URL: https://chromiumcodereview.appspot.com//10414084

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@7923 260f80e4-7a28-3924-810f-c04153c831b5
2012-05-23 20:28:21 +00:00
hausner@google.com b00ae2d1a0 Introduce remote objects in Debugger protocol
Review URL: https://chromiumcodereview.appspot.com//10407071

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@7864 260f80e4-7a28-3924-810f-c04153c831b5
2012-05-22 18:06:34 +00:00
hausner@google.com aecd8bc4f9 Add a check to JSON code
Addressing Anton's review comment. Also removing a leftover
debugging printf.

TBR=antonm
Review URL: https://chromiumcodereview.appspot.com//10391139

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@7659 260f80e4-7a28-3924-810f-c04153c831b5
2012-05-15 16:05:40 +00:00
hausner@google.com de86bd5ed8 Debugger wire protocol: setting breakpoints
- Adding commands to set breakpoints and showing current stack trace.
- Adding a callback hook to signal when a breakpoint gets resolved to
  and actual line number. 
- Adding ids for breakpoints and new breakpoint API functions, deprecating
  the existing ones. 
- Adding one helper function to the JSON class

Anton may want to take a look at the JSON addition.
Review URL: https://chromiumcodereview.appspot.com//10383164

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@7628 260f80e4-7a28-3924-810f-c04153c831b5
2012-05-14 21:10:25 +00:00
turnidge@google.com 9731c1c254 Rename Api::NewLocalHandle -> Api::NewHandle.
Api::NewHandle now takes a RawObject* intead of an Object&.
- This makes the code shorter and easier to read.
- This allows us to drop the DARTSCOPE from Dart_GetNativeArgument.
  (6% speedup on Benchmark_UseDartApi)
Review URL: https://chromiumcodereview.appspot.com//10014002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@6283 260f80e4-7a28-3924-810f-c04153c831b5
2012-04-06 17:05:50 +00:00
turnidge@google.com c0d7f96409 Remove many calls to Isolate::Current() in the dart embedding api by
passing the isolate explicitly.
Review URL: https://chromiumcodereview.appspot.com//9956133

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@6193 260f80e4-7a28-3924-810f-c04153c831b5
2012-04-04 20:31:49 +00:00
hausner@google.com 661d0195fa Support breakpoints in closures
Properly set breakpoints in the code of closure functions.
Fix bug 1894.

Also renaming StackTrace to DebuggerStackTrace since we already have a class Stacktrace in the VM.
Review URL: https://chromiumcodereview.appspot.com//9572022

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@4910 260f80e4-7a28-3924-810f-c04153c831b5
2012-03-02 23:43:34 +00:00