Commit Graph

45 Commits

Author SHA1 Message Date
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
hausner@google.com e58b6e4d4c Splitting debugger breakpoints into two parts
Splitting breakpoints into SourceBreakpoint that represent
a user-defined source location of a breakpoint, and
CodeBreakpoint, which represents a code location. There can
be more than one CodeBreakpoint per SourceBreakpoint, e.g.
for functions that are also called as closures (and are thus
compiled twice.)

Functions are no longer compiled as a side effect of setting
a breakpoint. When they eventually get compiled, the previously
recorded SourceBreakpoint is found and a CodeBreakpoint is set.
Review URL: https://chromiumcodereview.appspot.com//9581013

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@4891 260f80e4-7a28-3924-810f-c04153c831b5
2012-03-02 18:01:38 +00:00
hausner@google.com 6d9abc5e3b StepOver, StepInto, StepOut
Implement single stepping in the debugger.
- Add PC descriptors for function return
- functions to set temporary breakpoints on all
  locations in a function.
- patching/restoring of function return code pattern
- determine call target of instance calls
Review URL: https://chromiumcodereview.appspot.com//9484002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@4639 260f80e4-7a28-3924-810f-c04153c831b5
2012-02-27 22:00:28 +00:00
turnidge@google.com 0ddd4c04e9 Dart_PropagateError, take 2.
This change hopefully takes care of the non-mac build issues.  The
checked mode failures are fixed in a separate cl.
Review URL: https://chromiumcodereview.appspot.com//9316071

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@3863 260f80e4-7a28-3924-810f-c04153c831b5
2012-02-02 19:05:06 +00:00
turnidge@google.com ae88492093 Revert Dart_PropagateError until I can track down the problems in
checked mode tests.

Sorry for the hubbub.
Review URL: https://chromiumcodereview.appspot.com//9314053

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@3823 260f80e4-7a28-3924-810f-c04153c831b5
2012-02-01 23:39:28 +00:00
turnidge@google.com 9da62c5fea Add Dart_PropagateError.
This function can be used in native functions to properly pass all
errors up the stack.

Set the long jump base in the Compiler instead of outside of the
compiler.  A bunch of errors that used to be propagated through the
sticky_error are now propagated through return values.  This includes
all of the DartEntry and DartLibraryCall functions.

In particular, we no longer use the long jump to cross dart frames.
Instead errors are propagated across dart frames using the same
mechanism that we use for unhandled exceptions.  I've added assertions
to make sure that we only use the long jump when it is "safe".
Review URL: https://chromiumcodereview.appspot.com//9169102

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@3815 260f80e4-7a28-3924-810f-c04153c831b5
2012-02-01 22:34:16 +00:00
hausner@google.com e1d0b0619b Debugger API: get local variables of an activation frame
Also add a test case where the evaluation of a field name results in an error during the evaluation of the field.
Review URL: https://chromiumcodereview.appspot.com//9264058

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@3738 260f80e4-7a28-3924-810f-c04153c831b5
2012-01-31 18:10:08 +00:00
hausner@google.com 864393bdad Add debugger functions to inspect objects and classes.
Next steps: inspect global variables, better support for inspecting local variables on stack.
Review URL: https://chromiumcodereview.appspot.com//9288071

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@3634 260f80e4-7a28-3924-810f-c04153c831b5
2012-01-27 00:27:12 +00:00
hausner@google.com 02d59f08ba Add functions to list library and script urls in an isolate.
Review URL: https://chromiumcodereview.appspot.com//9117015

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@3571 260f80e4-7a28-3924-810f-c04153c831b5
2012-01-24 21:33:04 +00:00
hausner@google.com 595cb76374 Implement deletion of breakpoints
- deletion of breakpoints
- better cleanup of debugger resources
Review URL: https://chromiumcodereview.appspot.com//9271008

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@3470 260f80e4-7a28-3924-810f-c04153c831b5
2012-01-20 22:10:59 +00:00
hausner@google.com 3ebdf081ca Set breakpoint at url, line number
Add debugger functionality to set breakpoint at given url and line number.
Review URL: https://chromiumcodereview.appspot.com//9240014

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@3420 260f80e4-7a28-3924-810f-c04153c831b5
2012-01-18 23:15:56 +00:00
turnidge@google.com 55e33151db Introduce the Error object class in the vm. It represents all of the
things that may go wrong while invoking the dart api.

Here are the four types of error:

- ApiError = the user misused one of the dart apis
- LanguageError = a language-level problem, e.g. compiler error
- UnhandledException = an uncaught exception made its way to the embedder
- UnwindError = a forced isolate interrupt

This cl is the first of a series. I plan to move the point of
creation for LanguageErrors into the Parser, etc. I also plan to move
the longjmp's out of dart_api_impl.cc. I also also plan to implement
UnwindErrors later.

(Copied from Issue 9085031 due to subversion problems)
Review URL: http://codereview.chromium.org//9166016

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@3168 260f80e4-7a28-3924-810f-c04153c831b5
2012-01-10 21:42:21 +00:00
hausner@google.com 75918306af First debugger API unit test
Add unit test file, expose more debugger functionality in the API.
Review URL: http://codereview.chromium.org//8872049

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@2320 260f80e4-7a28-3924-810f-c04153c831b5
2011-12-09 19:29:37 +00:00
hausner@google.com 9159389495 First bits of external debugger API
The debugger API is in a separate set of files. Embedders do not have
to include the debug api if they don't need to.
Review URL: http://codereview.chromium.org//8826007

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@2198 260f80e4-7a28-3924-810f-c04153c831b5
2011-12-07 22:13:49 +00:00