fschneider@google.com
2442d5e047
VM: Fix a bug with local variable values when breaking at a variable declaration.
...
This fixes the case When breaking at a declaration 'var a;'
BUG=dartbug.com/22353
R=hausner@google.com
Review URL: https://codereview.chromium.org//936283005
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@43882 260f80e4-7a28-3924-810f-c04153c831b5
2015-02-19 17:11:07 +00:00
fschneider@google.com
aefdc04fa8
VM: Fix issue with local variable values reported by the debugger.
...
I added a function to test if a variable is visible or not to the
debugger tests.
BUG=dartbug.com/22353
TEST=standalone/debugger/local_variables_test
R=hausner@google.com
Review URL: https://codereview.chromium.org//933253003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@43850 260f80e4-7a28-3924-810f-c04153c831b5
2015-02-18 18:48:00 +00:00
hausner@google.com
8e7752f56b
Fix bug in processing of latent breakpoints
...
Debugger hangs when encountering a url that has no match
in any of the loaded libraries.
R=johnmccutchan@google.com
Review URL: https://codereview.chromium.org//872643008
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@43662 260f80e4-7a28-3924-810f-c04153c831b5
2015-02-10 19:11:56 +00:00
hausner@google.com
f96ae9969e
Support breakpoints in deferred libraries
...
This CL introduces latent breakpoints, which are bp in urls that are
not yet loaded. When the VM loads additional scripts through deferred
libraries, latent breakpoints get set.
R=iposva@google.com
Review URL: https://codereview.chromium.org//808643004
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42510 260f80e4-7a28-3924-810f-c04153c831b5
2014-12-19 16:35:37 +00:00
hausner@google.com
9a54ccd905
Fix debugging of async code
...
Make sure the debugger finds the closure function containing the body
of async functions, but not the synthetic function that generates the
future.
Change the way the debugger sets one-time breakpoints. Instead of
compiling the function and instrumenting all safe-points, set a
breakpoint marked as “one-shot” at the beginning of the function
and wait until the function is compiled. Then, once it fires, it
gets automatically deleted.
Finally, be smarter how we resolve breakpoints in compiled code.
The compiler rearranges code in await expressions, which tripped
up the debugger. This change makes sure we select the lowest compiled
code address only within the line containing the requested breakpoint
position.
R=iposva@google.com
Review URL: https://codereview.chromium.org//805573003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42368 260f80e4-7a28-3924-810f-c04153c831b5
2014-12-15 18:20:20 +00:00
hausner@google.com
f9089a3ca5
Find all compiled copies of a function when setting breakpoint
...
Fixes a bug where the debugger did not find a compiled implicit
closure if the non-closureized version had not been compiled yet,
thus failing to set a breakpoint.
R=regis@google.com
Review URL: https://codereview.chromium.org//149853004
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@32165 260f80e4-7a28-3924-810f-c04153c831b5
2014-01-30 18:08:02 +00:00
hausner@google.com
ab1aee6587
Mark debugger test as failed if debug target crashes
...
Fixes issue 13721
R=zra@google.com
Review URL: https://codereview.chromium.org//148613002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@32039 260f80e4-7a28-3924-810f-c04153c831b5
2014-01-27 22:59:26 +00:00
hausner@google.com
dff049ab71
Don’t call toString from debugger
...
Debugger no longer calls toString on objects. It continues to do so
on known basic types like numbers, booleans, strings. This is necessary
because toString() may have side effects. See issue 16229 for example.
R=johnmccutchan@google.com
Review URL: https://codereview.chromium.org//146833007
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@32003 260f80e4-7a28-3924-810f-c04153c831b5
2014-01-24 23:14:15 +00:00
hausner@google.com
812467f0f6
Fix several little buglets with stepping
...
No need to halt on single step if there is a breakpoint on the
same location. While looking at the resulting test failures, I
discovered that the step_in_equals test was not at all testing
what it was meant to test. It happened to pass because of a
related bug in the parser. Decided to abandon that test and
instead check that we can break at == even if one of the operands
is null.
Added ability to match line numbers in the debugger tests.
R=regis@google.com
Review URL: https://codereview.chromium.org//135843003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@31898 260f80e4-7a28-3924-810f-c04153c831b5
2014-01-16 21:15:17 +00:00
hausner@google.com
23968102ac
Fix setting breakpoint in non-finalized class.
...
This fixes issue 15870
Also added test case and verified manually that test case fails before this fix.
R=iposva@google.com , jacobr@google.com
Review URL: https://codereview.chromium.org//116223006
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@31449 260f80e4-7a28-3924-810f-c04153c831b5
2014-01-03 20:50:32 +00:00
hausner@google.com
15e8f121dd
Change how debugger handles source breakpoints
...
- Identify a source breakpoint by a script and a token position
rather than a function object.
- When a new breakpoint is set, iterate over all compiled functions
to see whether code breakpoints must be set.
This change fixes issues with functions that get compiled several
times, for example as implicit closures or a copies of mixin
functions or local closures of mixing functions. We did not detect
all duplicates of functions.
Eliminated recently introduced const modifiers in SourceBreakpoint
class. They tend to be in the way because several accessor methods
of SourceBreakpoint compute data lazily and modify the object as a
side effect.
Review URL: https://codereview.chromium.org//117133005
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@31372 260f80e4-7a28-3924-810f-c04153c831b5
2013-12-26 20:53:58 +00:00
hausner@google.com
70aa249370
VM debugger: fix closures in mixed-in functions
...
Avoid assertion in debugger when compiling closures in mixin
functions.
R=asiva@google.com
Review URL: https://codereview.chromium.org//102453002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@30823 260f80e4-7a28-3924-810f-c04153c831b5
2013-12-03 19:19:54 +00:00
sgjesse@google.com
c38de04d0c
Change dart:io Platform.script to return a Uri.
...
BUG=
R=sgjesse@google.com
Review URL: https://codereview.chromium.org//46063010
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@29651 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-31 07:29:01 +00:00
floitsch@google.com
7006de6f23
Remove deprecated parts of dart:async.
...
Attempt to fix most uses of the deprecated features.
R=floitsch@google.com , nweiz@google.com , rnystrom@google.com
Review URL: https://codereview.chromium.org//48483002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@29628 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-31 02:24:29 +00:00
whesse@google.com
4f08151090
Revert "Change dart:io Platform.script to return a Uri."
...
This reverts r29619 and r29624. The changes look fine on the buildbot,
but need review before adding to the repository.
BUG=
TBR=sgjesse@google.com
Review URL: https://codereview.chromium.org//52723007
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@29627 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-31 02:17:37 +00:00
whesse@google.com
cb0110350a
Change dart:io Platform.script to return a URI. Change all uses of Platform.script to work with the new value.
...
R=floitsch@google.com
Review URL: https://codereview.chromium.org//53313007
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@29619 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-31 01:08:11 +00:00
whesse@google.com
69205c207c
Remove uses of Options from pkg, samples, tests, and third_party directories.
...
BUG=
R=sgjesse@google.com
Review URL: https://codereview.chromium.org//52573002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@29552 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-30 15:17:01 +00:00
fschneider@google.com
a329b0e6bc
Dart VM: Simplify code generation for equality operators.
...
By inserting the necessary checks for null inside the callee
at the AST level, the code generation of == operations can be
greatly simplified.
This is a performance-neutral change and a step for allowing
generic inlining of arbitrary == methods. So far we could only
inline them for a common set of types in the flow graph
optimizer.
R=srdjan@google.com
Review URL: https://codereview.chromium.org//24203004
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@28084 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-01 10:10:50 +00:00
zra@google.com
8f97cd66ae
Reverts change to debug_lib.dart
...
Even though this behavior hid failures on ARM and MIPS, it
appears that some test rely on it.
R=regis@google.com
Review URL: https://codereview.chromium.org//25361002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@28070 260f80e4-7a28-3924-810f-c04153c831b5
2013-09-30 22:11:46 +00:00
zra@google.com
1a9d6cfb1f
Adds the BreakpointRuntime stub to ARM and MIPS.
...
Also:
- Makes some stub calls patachable.
- Updates pkg.status for an unrelated failing test.
R=regis@google.com
Review URL: https://codereview.chromium.org//25092010
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@28066 260f80e4-7a28-3924-810f-c04153c831b5
2013-09-30 20:17:48 +00:00
floitsch@google.com
74da0c7286
Remove usage of dart:json.
...
R=jmesserly@google.com , lrn@google.com , nweiz@google.com , rnystrom@google.com
Review URL: https://codereview.chromium.org//23596007
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@26789 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-28 14:05:11 +00:00
floitsch@google.com
1887b5ca49
Some more removals of dart:utf.
...
R=jmesserly@google.com , lrn@google.com , nweiz@google.com
Review URL: https://codereview.chromium.org//22909059
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@26712 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-27 13:18:34 +00:00
floitsch@google.com
35d7140e66
Remove Encoding-enum from dart:io and add interface in dart:convert.
...
BUG= http://dartbug.com/6284
BUG= http://dartbug.com/7966
R=nweiz@google.com , sgjesse@google.com
Review URL: https://codereview.chromium.org//22872012
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@26632 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-26 10:37:25 +00:00
sgjesse@google.com
38506f9d57
Remove the LineTransformer from dart:io
...
The LineTransformer has been retired, and is replaced with LineSplitter from dart:convert
R=floitsch@google.com , nweiz@google.com
Review URL: https://codereview.chromium.org//22927016
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@26419 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-21 07:35:46 +00:00
fschneider@google.com
13b7b7242a
Faster invocation of fields as methods.
...
Until now there was a large discrepancy between
x.f() and
(x.f)()
This CL makes x.f() as fast as (x.f)() by automatically
generating a intermediate dispatcher function that loads
the field and invokes the result as a closure.
The approach resembles the one taken for fast noSuchMethod
invocation and reuses the same per-class cache
of dispatcher functions.
It also fixes a bug in the debugger so that VM-generated
implicit dispatcher functions (like for noSuchMethod, or
field-as-method invocation) don't show up the debuggers
stack trace.
BUG=https://code.google.com/p/dart/issues/detail?id=11041
R=srdjan@google.com
Review URL: https://codereview.chromium.org//18750004
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@25001 260f80e4-7a28-3924-810f-c04153c831b5
2013-07-15 11:12:09 +00:00
iposva@google.com
2229450865
- Use TCP_NODELAY when using the coverage tool and ddbg.
...
- Use IPPROTO_TCP instead of SOL_TCP for increased portability.
R=asiva@google.com , hausner@google.com
Review URL: https://codereview.chromium.org//18829003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@24865 260f80e4-7a28-3924-810f-c04153c831b5
2013-07-09 21:14:31 +00:00
devoncarew@google.com
558fcef922
Added a test to cover debugging step over.
...
Added a separate test to cover step in and out.
R=hausner@google.com
Review URL: https://codereview.chromium.org//18558005
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@24706 260f80e4-7a28-3924-810f-c04153c831b5
2013-07-02 22:16:01 +00:00
sgjesse@google.com
887c8e7596
Move getters from Options to Platform
...
The getters for executable, script and version are now statics on
Platform. I kept them on Options for now, but updated most tests to
use Platform.
R=ajohnsen@google.com , floitsch@google.com , iposva@google.com
BUG=
Review URL: https://codereview.chromium.org//17406010
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@24401 260f80e4-7a28-3924-810f-c04153c831b5
2013-06-25 12:56:23 +00:00
devoncarew@google.com
762d86296b
Fix for an issue w/ breakpointResolved events not being sent.
...
Added tests for breakpointResolved events.
Added tests for handling toString() invocations throwing exceptions, and extended debug_lib.dart to supported verifying values of local variables.
R=hausner@google.com
Review URL: https://codereview.chromium.org//17112010
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@24164 260f80e4-7a28-3924-810f-c04153c831b5
2013-06-18 21:56:00 +00:00
hausner@google.com
efd3b8428c
Yay for static type checking
...
The analyzer found this problem :)
Review URL: https://codereview.chromium.org//15741016
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@23088 260f80e4-7a28-3924-810f-c04153c831b5
2013-05-23 18:01:15 +00:00
hausner@google.com
6a206d3af8
Let debug target pick the debugger port
...
Invoking the dart executable with --debug:0 lets the debuggee pick a free port number. It prints the port number to stdout if --verbose_debug is specified on the command line.
Adapt debugger tests to use this scheme for selecting an available port number.
R=iposva@google.com
Review URL: https://codereview.chromium.org//15507004
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@23086 260f80e4-7a28-3924-810f-c04153c831b5
2013-05-23 17:41:50 +00:00
hausner@google.com
18aaaef686
Always send kill signal to debug target
...
Make sure we kill the debug target process in all cases
to ensure that no zombie processes linger around.
Also make sure the cleanup code gets only called once.
Review URL: https://codereview.chromium.org//15295014
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@22866 260f80e4-7a28-3924-810f-c04153c831b5
2013-05-17 18:37:28 +00:00
hausner@google.com
2b7746ae05
Allow breakpoints on one-liner functions
...
Fixes issue 10234. This is also the first step for setting
reliable breakpoints on a == b expressions.
R=srdjan@google.com
Review URL: https://codereview.chromium.org//15000005
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@22799 260f80e4-7a28-3924-810f-c04153c831b5
2013-05-16 15:44:05 +00:00
kustermann@google.com
8597b143e3
Fixed syntax error in debug_lib.dart
...
R=ricow@google.com
Review URL: https://codereview.chromium.org//15119003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@22778 260f80e4-7a28-3924-810f-c04153c831b5
2013-05-16 08:28:47 +00:00
kustermann@google.com
f87e9a5ca5
Fixed debugger_test to wait until target process is dead
...
R=hausner@google.com
Review URL: https://codereview.chromium.org//14773038
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@22775 260f80e4-7a28-3924-810f-c04153c831b5
2013-05-16 08:06:41 +00:00
hausner@google.com
d0eea20dfa
Add a debugger test for closure breakpoints
...
Stop at closure, step into the closure function.
R=asiva@google.com
Review URL: https://codereview.chromium.org//14864024
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@22605 260f80e4-7a28-3924-810f-c04153c831b5
2013-05-10 22:45:59 +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
ajohnsen@google.com
6b1706285b
Fix standalone tests to pass dartc.
...
BUG=
Review URL: https://codereview.chromium.org//14268002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@21514 260f80e4-7a28-3924-810f-c04153c831b5
2013-04-15 21:05:33 +00:00
floitsch@google.com
5431a5af54
Remove AsyncError with Expando.
...
Review URL: https://codereview.chromium.org//14251006
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@21498 260f80e4-7a28-3924-810f-c04153c831b5
2013-04-15 18:58:32 +00:00
hausner@google.com
15720724d9
Add more error detection to debugger test
...
Detect when malformed messages leave over garbage, e.g. when there
are is an extra closing brace.
Review URL: https://codereview.chromium.org//13741025
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@21119 260f80e4-7a28-3924-810f-c04153c831b5
2013-04-08 22:24:00 +00:00
floitsch@google.com
343fa26d65
Remove deprecated Expect from the libraries.
...
Review URL: https://codereview.chromium.org//13724021
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@21079 260f80e4-7a28-3924-810f-c04153c831b5
2013-04-08 16:07:34 +00:00
floitsch@google.com
a813a57b5a
Remove unnecessary expect-package line.
...
BUG= http://dartbug.com/9703
Review URL: https://codereview.chromium.org//13454030
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@21004 260f80e4-7a28-3924-810f-c04153c831b5
2013-04-05 22:35:54 +00:00
tball@google.com
b3cae06ace
Synced basic_debugger_test start on new "debugger initialized" message.
...
Review URL: https://codereview.chromium.org//13597004
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@20997 260f80e4-7a28-3924-810f-c04153c831b5
2013-04-05 20:55:10 +00:00
floitsch@google.com
8fd6d0aafd
Remove Expect from core library.
...
Committed: https://code.google.com/p/dart/source/detail?r=19755
Reverted: http://code.google.com/p/dart/source/detail?r=19756
Review URL: https://codereview.chromium.org//12212016
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@20996 260f80e4-7a28-3924-810f-c04153c831b5
2013-04-05 19:43:16 +00:00
hausner@google.com
b3ccd9f1ea
Make basic_debugger_test less flaky
...
There is a race condition between debugger and debugee. Detect if the debugger is attempting to connect to the debugee to soon and simply skip running the debug test
rather than failing the test.
Review URL: https://codereview.chromium.org//13555003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@20894 260f80e4-7a28-3924-810f-c04153c831b5
2013-04-03 21:32:55 +00:00
hausner@google.com
8f1ec650be
Update debugger test
...
Change test and test framework so it no longer expects the paused
event to contain a stack trace. This is in preparation to remove
the stack trace in paused events.
Review URL: https://codereview.chromium.org//13474011
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@20873 260f80e4-7a28-3924-810f-c04153c831b5
2013-04-03 16:30:47 +00:00
tball@google.com
439636fc4e
Use random debug port in basic_debugger_test.
...
Issue 8232
Review URL: https://codereview.chromium.org//12796012
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@20634 260f80e4-7a28-3924-810f-c04153c831b5
2013-03-28 19:02:11 +00:00
kustermann@google.com
2b452bfb9f
Drain stdin in basic_debuger_test and did status file update
...
Review URL: https://codereview.chromium.org//12457037
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@20523 260f80e4-7a28-3924-810f-c04153c831b5
2013-03-26 16:54:05 +00:00
kustermann@google.com
816c75ac3b
Fixed the first issue in debug_lib.dart
...
Review URL: https://codereview.chromium.org//12851019
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@20520 260f80e4-7a28-3924-810f-c04153c831b5
2013-03-26 16:01:11 +00:00
lrn@google.com
53f877edb7
Rename String.concat to operator+.
...
Review URL: https://codereview.chromium.org//12441003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@19788 260f80e4-7a28-3924-810f-c04153c831b5
2013-03-11 12:59:17 +00:00