Commit graph

81 commits

Author SHA1 Message Date
johnmccutchan@google.com ef666553a1 Add runtime and native entry tags
- Split runtime and native entry tags.
- Set runtime / native entry address as vm tag in stubs.
- Add reverse native entry resolver (pc to name) to public API (breaking change).
- Hookup reverse resolver for standalone VM (io + bootstrap + builtin natives).
- Runtime entries are registered with tags.
- Profiler queries for tag names via the reverse native entry resolver.
- Profiler outputs named entry tags as children under parent tag (runtime or native).

R=asiva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@34941 260f80e4-7a28-3924-810f-c04153c831b5
2014-04-10 20:26:45 +00:00
zra@google.com 2fe51715e5 Begins work on ARM64, first assembler test.
Most new code is in constants_arm64.h and
{assembler,disassembler,simulator}_arm64.{h,cc}

The rest of the CL just #def's out tests, modifies status files,
and adds UNIMPLEMENTED functions, etc.

R=regis@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@34654 260f80e4-7a28-3924-810f-c04153c831b5
2014-04-02 17:39:32 +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
hausner@google.com 040093eb26 Handle stepping requests after isolate interrupt event
Adding test case provided by jacobr.

Fix issue 17008

R=jacobr@google.com, regis@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@32938 260f80e4-7a28-3924-810f-c04153c831b5
2014-02-21 22:40:11 +00:00
hausner@google.com baf16bac5e Make safe points in generated code invisible to the debugger
- remove some PC descriptors that are part of implicit, synthesized
  code, e.g. generated null checks in == methods, implicit constructors,
  implicitly generated code in user constructors, etc.
- ignore single step callbacks on PC descriptors that are part of
  synthesized code.

R=regis@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@31966 260f80e4-7a28-3924-810f-c04153c831b5
2014-01-21 21:49:42 +00:00
hausner@google.com c571528323 Make return statements single steppable
Replace the code smashing breakpoints at function returns with a call
to a runtime stub that checks whether the debugger is single stepping.
The call to the stub is only emitted in unoptimized code.

R=srdjan@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@31435 260f80e4-7a28-3924-810f-c04153c831b5
2014-01-02 23:31:52 +00:00
asiva@google.com a576fec3c0 Allow the native resolver to setup whether it needs the Dart API scope to
be setup automatically or not when a native function is invoked.
This would allow the embedder to treat some native functions as leaf
functions whose invocation can be very light.

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

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@31286 260f80e4-7a28-3924-810f-c04153c831b5
2013-12-19 17:47:56 +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
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
iposva@google.com 25b81b3e8b - Fix string conversion warnings.
R=johnmccutchan@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@30204 260f80e4-7a28-3924-810f-c04153c831b5
2013-11-12 19:43:44 +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
turnidge@google.com 2ad40bc29b When a value has been optimized away by the compiler, set its value to
"<optimized out>".  This will make it less confusing for people using
the debugger.

- Added constant_dead() to the flow graph.
- Added Symbols::OptimizedOut().

R=fschneider@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@28671 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-15 18:35:07 +00:00
turnidge@google.com b4b7e5899c Allow access to context variables in optimized/inlined frames.
R=asiva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@28669 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-15 18:17:36 +00:00
turnidge@google.com 99ce6672cf Fix a typo in debugger.cc that was causing variable bounds checking to
be done on the frame context instead of the variable's context.

Update the unit test.

R=hausner@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@28594 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-14 17:35:35 +00:00
turnidge@google.com fb6249ec3b Add unit tests to cover stack inspect in the presence of closure calls
for both optimized and non-optimized code.

Fix an assert which was broken.

R=iposva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@28538 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-11 18:15:32 +00:00
turnidge@google.com afb372d9e1 Fix checked mode failure
Review URL: https://codereview.chromium.org//26842003

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@28470 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-10 19:00:31 +00:00
turnidge@google.com b15b2931e0 Allow the debugger to inspect local variables from optimized and
inlined frames.

------------

Most remaining deoptimization code from the code generator moves to
DeoptContext.  This allows the code to be reused by the debugger.
There is some rework of the code along the way.  The remaining code in
the code generator is simpler.

Implement the ability to deopt a frame to an Array.  Each inlined
frame accesses its locals from this array at some fixed offset.

Refactor the Debugger::CollectStackTrace code.  New code is int
Debugger::CollectStackTraceNew.  There is a flag --use_new_stacktrace
which can be used to revert back to the old version.  I intend to
remove this flag shortly, after any dust clears.

Added a unit test which makes sure that we can inspect locals from
optimized and inlined frames.  Tested this code in the dart editor
debugger as well.

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

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@28468 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-10 18:15:53 +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 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 fe9e202f8b Fix debugger expression evaluation for top-level functions
The temporary class that holds the expression to be evaluated
must be marked as finalized.

Added Jacob's closure tests.

Fixes issue 13192.

R=jacobr@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@27338 260f80e4-7a28-3924-810f-c04153c831b5
2013-09-10 15:30:52 +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 a105ba48fc JSON string decoding for VM debugger
The VM must properly decode JSON strings it receives.

R=regis@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@26668 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-26 20:59:16 +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 56533b8374 Added unit test cases to try and reproduce issue 12137 (Things
work as expected)

R=srdjan@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@25805 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-06 00:11:55 +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 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
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