Commit Graph

29 Commits

Author SHA1 Message Date
tball@google.com 898ec7731f Added Socket::Close() function.
Review URL: https://codereview.chromium.org//12209047

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@18199 260f80e4-7a28-3924-810f-c04153c831b5
2013-02-07 00:44:55 +00:00
hausner@google.com 0b9e169dad Verify integrity of JSOM messages sent to debugger client
Make sure JSOM messages are grammatically correct and string values are properly encoded.
Review URL: https://codereview.chromium.org//12035086

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@17617 260f80e4-7a28-3924-810f-c04153c831b5
2013-01-24 23:35:34 +00:00
ager@google.com 87a43bef60 Implement debugger connection on Windows.
This is a slightly cleaned up version of the code that Devon
created.

All of eventhandler and socket in bin is designed for async
communication only. Therefore, it does not make much sense
to use it for something as simple as this. I have put the
sync send and receive operations into DebuggerConnectionImpl
instead of attempting to use the async Socket::Read and
Socket::Write.

R=devoncarew@google.com,sgjesse@google.com,hausner@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@16336 260f80e4-7a28-3924-810f-c04153c831b5
2012-12-19 18:42:19 +00:00
gram@google.com 3601944836 Revised CL for customisable logging (replacing printfs).
Review URL: https://codereview.chromium.org//11312242

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@15096 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-19 17:38:15 +00:00
asiva@google.com f8548e7142 1. Add isolate id parameter to all the debugger commands in the debugger wire protocol so that the commands are directed to the appropriate isolate.
2. Changed ddbg to pass the isolate ID in the debugger wire message.

The Dart debugger protocol document has been changed to reflect this.
Review URL: https://codereview.chromium.org//11094017

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@13691 260f80e4-7a28-3924-810f-c04153c831b5
2012-10-16 18:22:54 +00:00
asiva@google.com b99cf58b52 Fix race condition when posting debugger messages to the message queue
(An isolate could be shutting down while a message arrives for the isolate).
Review URL: https://codereview.chromium.org//11144027

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@13669 260f80e4-7a28-3924-810f-c04153c831b5
2012-10-15 21:28:36 +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 862687a987 First step towards support for being able to interrupt a running Dart Isolate
using the debugger API
- restructure the debug connection handler code to allow a native thread
  to accept debug connections and read debug commands
- added a new message queue data structure for being able to dispatch
  debug commands on a per isolate basis
- add framework for generic commands and isolate specific commands.
Review URL: https://codereview.chromium.org//10990089

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@13186 260f80e4-7a28-3924-810f-c04153c831b5
2012-10-03 17:13:43 +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
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
hausner@google.com 028f8c78d1 Suppress "Waiting for debugger..." message on cosole
Less noise in the debugger console window.

Also put the verbose debugger output under command line flag
instead of compile time flag.

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11328 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-24 17:57:57 +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 373d313af3 Add multibyte string support to debugger
Issue 4110.

Had to extend the JSON protocol to support code points > 0xffff. The debugger client (editor) needs to support this new escape sequence'
format as well.
Review URL: https://chromiumcodereview.appspot.com//10801002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9751 260f80e4-7a28-3924-810f-c04153c831b5
2012-07-18 23:27:59 +00:00
hausner@google.com d9ba32f258 Support for lists in debugger wire protocol
Review URL: https://chromiumcodereview.appspot.com//10698039

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9235 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-29 00:52:51 +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 ba8c73df3a Fix handling of long JSON messages
Fix Debugger wire protocol for long messages.
Add a stress mode in the protocol handler to break messages
into small pieces.
Review URL: https://chromiumcodereview.appspot.com//10515015

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8269 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-04 22:27: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
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 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 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
hausner@google.com dbd9fa4048 Eliminate need for va_copy in json.cc
The hacked version of va_copy did not work on Linux.
Review URL: https://chromiumcodereview.appspot.com//10383122

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@7525 260f80e4-7a28-3924-810f-c04153c831b5
2012-05-10 23:28:14 +00:00
hausner@google.com e5d8d80479 Support more debugger commands in the wire protocol
Also add a very simple debugger shell which at this point
is meant to be a debugging help for the debugger code rather
than a user-friendly tool.
Review URL: https://chromiumcodereview.appspot.com//10392017

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@7518 260f80e4-7a28-3924-810f-c04153c831b5
2012-05-10 22:04:50 +00:00
hausner@google.com 901d1a4267 Eliminate busy waiting for debugger connection
Review URL: https://chromiumcodereview.appspot.com//10384016

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@7348 260f80e4-7a28-3924-810f-c04153c831b5
2012-05-04 21:24:16 +00:00
hausner@google.com e21141bdac More windows fixes.
I wish we had a sandbox for test builds before we submit...
Review URL: https://chromiumcodereview.appspot.com//10332015

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@7334 260f80e4-7a28-3924-810f-c04153c831b5
2012-05-04 15:56:01 +00:00
hausner@google.com 0eb7d38934 More windows fixes.
Review URL: https://chromiumcodereview.appspot.com//10365015

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@7332 260f80e4-7a28-3924-810f-c04153c831b5
2012-05-04 15:45:27 +00:00
hausner@google.com 95be46105a Beginnings of a debugger wire protocol
The debugger wire handler is implemented similarly to the io event handler.
A dedicated thread monitors the debugger port for incoming connection
requests. When a debugger is connected, the VM sends events messages
over the wire and handles debugger requests.

To start the VM with a debugger connection, use the option
--debug:<portnumber>. The VM pauses at the beginning of main()
and waits for a debugger to connect.

Subsequent changes will implement debugger commands one by one.
With this change, the VM only understands "resume" commands. 
Review URL: https://chromiumcodereview.appspot.com//10357003

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@7330 260f80e4-7a28-3924-810f-c04153c831b5
2012-05-04 15:25:49 +00:00