Commit Graph

152 Commits

Author SHA1 Message Date
asiva@google.com de8b3c18b0 Remove some dead code.
R=hausner@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@23046 260f80e4-7a28-3924-810f-c04153c831b5
2013-05-23 00:26:33 +00:00
hausner@google.com b466bceb20 Make VM debugger stop at every safe point
Debugger front-end can decide to ignore some steps and only halt
when the next line is reached.

R=iposva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@22972 260f80e4-7a28-3924-810f-c04153c831b5
2013-05-21 23:07:22 +00:00
zra@google.com a49ab3a890 Adds support for debugger API on MIPS.
Enable debugger api tests on MIPS.
Enable isolate tests on MIPS.
Enable code descriptors tests on MIPS.
Enable snapshot tests on MIPS.
Enable heap tests on MIPS.

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@22042 260f80e4-7a28-3924-810f-c04153c831b5
2013-04-25 18:03:15 +00:00
regis@google.com ad6005e5c4 Support debugger API on ARM.
Support smull ARM instruction in order to detect 32-bit multiplication overflow.
Enable debugger api tests on ARM.
Enable isolate tests on ARM.
Enable code descriptors tests on ARM.
Enable snapshot tests on ARM.
Enable heap tests on ARM.

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@21890 260f80e4-7a28-3924-810f-c04153c831b5
2013-04-23 16:10:22 +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 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
tball@google.com 34c2a002fc Added EXPECT_TRUE macro, updated debugger unit tests to use it for
API calls that return True.
Review URL: https://codereview.chromium.org//13009004

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@20450 260f80e4-7a28-3924-810f-c04153c831b5
2013-03-25 16:21:58 +00:00
asiva@google.com 61f6a96cd3 Remove redundant Dart_LoadEmbeddedScript as it doesn't seem to be used in the VM and hopefully dartium can start using Dart_Script always.
Review URL: https://codereview.chromium.org//12919020

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@20277 260f80e4-7a28-3924-810f-c04153c831b5
2013-03-20 15: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
tball@google.com 73bde21dea Corrected test suppression from previous CL.
Review URL: https://codereview.chromium.org//12317117

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@19022 260f80e4-7a28-3924-810f-c04153c831b5
2013-02-26 00:12:33 +00:00
tball@google.com 309ef2a8b5 Disabled context variables in local variable list in the debugger,
so developers can still use it while issue 8593 is being fixed.
Review URL: https://codereview.chromium.org//12320023

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@19020 260f80e4-7a28-3924-810f-c04153c831b5
2013-02-25 23:36:28 +00:00
iposva@google.com c900112af7 - Improve the message for NoSuchMethodErrors that are
determined statically at compile time.
Review URL: https://codereview.chromium.org//12328019

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@18848 260f80e4-7a28-3924-810f-c04153c831b5
2013-02-21 18:53:27 +00:00
asiva@google.com d6c8e4f892 Add unit tests which reliabily reproduces the error condition reported in Issue 6080 without the need for a specialized and inconsistent private environment.
Review URL: https://codereview.chromium.org//12218046

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@18232 260f80e4-7a28-3924-810f-c04153c831b5
2013-02-07 20:55:21 +00:00
hausner@google.com a2d682d1d8 Improve line info accuracy in debugging
Review URL: https://codereview.chromium.org//11696005

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@16550 260f80e4-7a28-3924-810f-c04153c831b5
2012-12-28 18:51:58 +00:00
hausner@google.com 4a0f4b0911 Fix debugger test
Review URL: https://codereview.chromium.org//11369203

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@14823 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-12 23:51:51 +00:00
hausner@google.com 959f9ab4c4 More function literal changes in tests.
Review URL: https://codereview.chromium.org//11363206

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@14816 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-12 22:57:39 +00:00
asiva@google.com ebbb7c4134 - Represent strings internally in UTF-16 format, this makes it
compatible with webkit and will allow for easy externalization of
  strings. One byte strings are retained for pure ASCII strings.
  (The language specification was changed recently to reflect this as
   follows "A string is a sequence of UTF-16 code units").
- Remove four byte string class and all references to it.
- Rename some of the string functions in Dart API to make them
  consistent and better describe the underlying functionality
  Dart_NewString => Dart_NewStringFromCString
  Dart_NewString8 => Dart_NewStringFromUTF8
  Dart_NewString16 => Dart_NewStringFromUTF16
  Dart_NewString32 => Dart_NewStringFromUTF32
  Dart_NewExternalString8 => Dart_NewExternalUTF8String
  Dart_NewExternalString16 => Dart_NewExternalUTF16String
  Dart_NewExternalString32 => Dart_NewExternalUTF32String
  Dart_StringGet8 => Dart_StringToUTF8
  Dart_StringGet16 => Dart_StringToUTF16
  Dart_StringToCString => Dart_StringToCString
  Dart_IsString8 => Removed
  Dart_IsString16 -> Removed
  Dart_StringToBytes -> Removed
  Dart_StringGet32 -> Removed
Review URL: https://codereview.chromium.org//11318018

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@14357 260f80e4-7a28-3924-810f-c04153c831b5
2012-10-31 17:56:46 +00:00
regis@google.com adb534674c Change core lib, dart2js, and more for new optional parameters syntax and semantics (new semantics is not enforced yet).
Review URL: https://codereview.chromium.org//11090016

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@13684 260f80e4-7a28-3924-810f-c04153c831b5
2012-10-16 16:03:47 +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
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
kmillikin@google.com 19596c8071 Change EXPECT(!Dart_IsError(...)) to EXPECT_VALID(...) in VM tests.
This change will give better error messages when the expectation fails
in the tests.  EXPECT_VALID prints the error.

R=iposva@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10276 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-06 07:55:53 +00:00
regis@google.com b86a40f48f Fix type checking of void type.
Fix library and tests accordingly.
Add new test.
Disable new test for dart2js.
Disable some now failing co19 tests (new issue 158 filed).
Hide internal VM String types from user (not complete).
Review URL: https://chromiumcodereview.appspot.com//10787021

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9681 260f80e4-7a28-3924-810f-c04153c831b5
2012-07-16 21:34:07 +00:00
regis@google.com dc96874999 Revert fix for type checking of void type, because some top level tests fail.
Review URL: https://chromiumcodereview.appspot.com//10784020

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9673 260f80e4-7a28-3924-810f-c04153c831b5
2012-07-16 19:05:38 +00:00
regis@google.com a8ceb243f6 Fix type checking of void type.
Fix library and tests accordingly.
Add new test.
Disable new test for dart2js.
Disable some now failing co19 tests (new issue 158 filed).
Hide internal VM String types from user (not complete).
Review URL: https://chromiumcodereview.appspot.com//10704216

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9672 260f80e4-7a28-3924-810f-c04153c831b5
2012-07-16 18:05:55 +00:00
vegorov@google.com 2935029239 Implement ActivationFrame::GetLocalVarValue on x64.
R=iposva@google.com
BUG=3961
TEST=Debug_ExprClosureBreakpoint

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9334 260f80e4-7a28-3924-810f-c04153c831b5
2012-07-03 09:31:44 +00:00
hausner@google.com 3aedbb74e8 Better breakpoint placement
Instead of using token distance to find the first possible breakpoint
position in a line, use generated code address, so the debugger
breaks before the first call on a source line.

Fix issue 3653 
http://code.google.com/p/dart/issues/detail?id=3318
Review URL: https://chromiumcodereview.appspot.com//10686003

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9176 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-27 16:13:49 +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
turnidge@google.com ec36e02c28 Remove the partially completed code for remote IsolateMirrors and
replace it with the beginnings of a local (same isolate) IsolateMirror
implementation.

Removed old mirror tests and added two new mirror tests.

Even though mirrors.cc is part of the vm, I chose to implement most of
it using the dart embedding interface instead of our internal
interfaces because the embedding interface was more convenient.
mirrors.cc is basically all new in this CL -- don't pay any attention
to diffs for that file.

Added dart embedding functions required for the functionality in this
CL: Dart_DebugName, Dart_GetNativeInstanceFieldCount,
Dart_RootLibrary, Dart_RegisteredLibraryUrls, and Dart_LibraryName.

Extended or modified some existing dart api functions, primarily to
make them propagate error handles properly.

Added tests for new dart embedding api functionality.

Added the ability to determine if a port is local to the current isolate.

Extended NotImplementedException to accept an optional string
argument.  I wanted to give more descriptive error messages.
Review URL: https://chromiumcodereview.appspot.com//10416050

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8117 260f80e4-7a28-3924-810f-c04153c831b5
2012-05-30 17:07:19 +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 9e2c641658 Remove the deprecated method invocation and field access apis from the
dart embbedding api.  Use the new apis instead.

Fixed a bug where field/function lookup was failing for imported libs.
Added tests.  Had to add a couple of lookup functions to Library.

Fixed a bug in Dart_Invoke -- it wasn't handling a null receiver
correctly.
Review URL: https://chromiumcodereview.appspot.com//10021072

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@6769 260f80e4-7a28-3924-810f-c04153c831b5
2012-04-19 21:04:15 +00:00
hausner@google.com db3e0327a0 Fix static field inspection in debugger
- Handle static fields that have no getter (issue 2462).
- Get correct value of initialized fields (issue 2221).
- Add test case.
Review URL: https://chromiumcodereview.appspot.com//10009023

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@6251 260f80e4-7a28-3924-810f-c04153c831b5
2012-04-05 22:42:45 +00:00
hausner@google.com feafdf0e06 Properly recognize closures when setting breakpoints
Local functions and function literals are unknown to the VM
until the enclosing function is compiled. This change introduces
a list of known closures per class, and a function to look up
the innermost closure at a given token index.

The debugger now checks whether there are newly discovered
closures when a function containing a pending breakpoint is
compiled. If necessary, the breakpoint is set to the inner
function.
Review URL: https://chromiumcodereview.appspot.com//9716004

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@5599 260f80e4-7a28-3924-810f-c04153c831b5
2012-03-16 22:28:57 +00:00
hausner@google.com cd6e29a898 Deoptimize functions before setting breakpoints
Does not yet handle cases where the functions have active frames
on the stack.
Review URL: https://chromiumcodereview.appspot.com//9696020

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@5436 260f80e4-7a28-3924-810f-c04153c831b5
2012-03-13 20:37:49 +00:00
hausner@google.com 8021d5ce2b Fix linux build.
I knew this would happen ;)
Review URL: https://chromiumcodereview.appspot.com//9667019

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@5275 260f80e4-7a28-3924-810f-c04153c831b5
2012-03-10 00:48:35 +00:00
hausner@google.com de3cf9e2bd Teach debugger to ignore breakpoints
Reentrant debugger calls to fetch values may execute dart code as a
side effect. Teach the debugger to ignore any breakpoints it might
hit while doing so.
Review URL: https://chromiumcodereview.appspot.com//9668036

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@5274 260f80e4-7a28-3924-810f-c04153c831b5
2012-03-10 00:43:08 +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 3161ad5dda Print more info in debugger tests
Review URL: https://chromiumcodereview.appspot.com//9475030

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@4648 260f80e4-7a28-3924-810f-c04153c831b5
2012-02-27 23:03:19 +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
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 021029a386 Not my day today
Review URL: https://chromiumcodereview.appspot.com//9113100

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@3638 260f80e4-7a28-3924-810f-c04153c831b5
2012-01-27 01:01:01 +00:00
hausner@google.com ae5c6905ac Fix new test in checked mode
Murphy is in a really bad mood today...
Review URL: https://chromiumcodereview.appspot.com//9289061

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@3637 260f80e4-7a28-3924-810f-c04153c831b5
2012-01-27 00:49:02 +00:00
hausner@google.com 690df302d4 More lottery wins...
Review URL: https://chromiumcodereview.appspot.com//9235082

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@3636 260f80e4-7a28-3924-810f-c04153c831b5
2012-01-27 00:33:00 +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 0071e91d16 Any time now...
Review URL: https://chromiumcodereview.appspot.com//9283043

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@3575 260f80e4-7a28-3924-810f-c04153c831b5
2012-01-24 21:51:04 +00:00
hausner@google.com a64a696ca9 If at first you don't succeed...
Review URL: https://chromiumcodereview.appspot.com//9117051

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@3574 260f80e4-7a28-3924-810f-c04153c831b5
2012-01-24 21:46:40 +00:00
hausner@google.com dd0f8f0d21 Appease picky linux gcc.
Review URL: https://chromiumcodereview.appspot.com//9285030

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@3573 260f80e4-7a28-3924-810f-c04153c831b5
2012-01-24 21:38:56 +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
regis@google.com d573d5437d Enable remaining execution tests on x64.
Review URL: https://chromiumcodereview.appspot.com//9242025

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@3376 260f80e4-7a28-3924-810f-c04153c831b5
2012-01-17 22:52:54 +00:00