Stepping through the following small program:
main() {
var map = {};
}
will crash the vm if it is compiled in debug mode because
the debugging tries to call .Length() on an uninitialized Map.
Crash:
runtime/vm/object.h: 6545: error: expected: (value & kSmiTagMask) == kSmiTag
Dumping native stack trace for thread d12f
[0x0000000000a66c36] dart::Profiler::DumpStackTrace(bool)
[0x0000000000a66c36] dart::Profiler::DumpStackTrace(bool)
[0x0000000000765548] dart::DynamicAssertionHelper::Fail(char const*, ...)
[0x000000000074b78b] dart::Smi::ValueFromRaw(unsigned long)
[0x000000000074b6ad] dart::Smi::Value(dart::RawSmi const*)
[0x00000000009b92cc] dart::LinkedHashMap::Length() const
[0x00000000009e2351] dart::LinkedHashMap::PrintJSONImpl(dart::JSONStream*, bool) const
[...]
Filed as bug https://github.com/dart-lang/sdk/issues/27790.
R=turnidge@google.com
Review URL: https://codereview.chromium.org/2486213002 .
- enable the service protocol web server when it is already enabled
- disable the service protocol web server when it is already disabled
- disable the service protocol web server when it is enabled
- validate field in the ServiceProviderInfo object
- try connecting to the web server without the auth token when use of
an auth token is enabled
- try connecting to the web server with the auth token when use of
an auth token is enabled
- try connecting to the web server without the auth token when use of
an auth token is not enabled
BUG=
R=johnmccutchan@google.com
Review URL: https://codereview.chromium.org/2500543002 .
- [x] Add `ServiceProtocolnfo` class to dart:developer.
- [x] Add `Service` class to dart:developer.
- [x] Add `Service.getInfo` static method to dart:developer.
- [x] Add `Service.controlWebServer` static method to dart:developer.
API:
```dart
/// Information about the service protocol.
class ServiceProtocolInfo {
/// The major version of the protocol.
final int majorVersion;
/// The minor version of the protocol.
final int minorVersion;
/// The Uri to access the service. If the web server is not running, this
/// will be null.
final Uri serverUri;
}
/// Access information about the service protocol and control the web server.
class Service {
/// Get information about the service protocol.
static Future<ServiceProtocolInfo> getInfo();
/// Control the web server that the service protocol is accessed through.
static Future<ServiceProtocolInfo> controlWebServer({bool enable: false});
}
```
... and add a randomly generated authentication token path prefix that must be passed in to access the service protocol.
Old base url:
Observatory listening on http://127.0.0.1:54804/
New base url:
Observatory listening on http://127.0.0.1:54804/<token>/
For example:
Observatory listening on http://127.0.0.1:54804/PTwjm8Ii8qg=/
Many tools will need to be updated.
Fixes#23320
BUG=
R=asiva@google.com, rmacnak@google.com
Review URL: https://codereview.chromium.org/2438613002 .
- [x] Add three public fields to the "BoundVariable" service type: declarationTokenPos, visibleStartTokenPos, and visibleEndTokenPos. (naming suggestions welcome!)
- [x] Extend LocalVarDescriptors to hold the declaration token position (it already had the scope visibility boundaries).
- [x] Extend ContextScope to hold the declaration token position.
- [x] Add a unit test which verifies this works for local variables, function parameters, and closure captured variables.
Fixes https://github.com/dart-lang/sdk/issues/25569
BUG=
R=rmacnak@google.com
Review URL: https://codereview.chromium.org/2419013004 .
- [x] Make `reloadSources` RPC public.
- [x] Add an optional 'pause' parameter to `reloadSources`. When set to true, the isolate will enter the debug pause loop immediately after reloading sources and before resuming execution. This makes it possible for debugger clients to set breakpoints before resuming.
- [x] Add reload_sources_test which tests pausing after reload.
- [x] Fix a bug in `GetVarDescriptors` where a null code object could be used.
R=turnidge@google.com
Review URL: https://codereview.chromium.org/2411153002 .
- [x] Add a new header 'dev_fs_path_b64' which is used over 'dev_fs_path' when present.
- [x] 'dev_fs_path_b64' expects the path encoded as UTF8 and then BASE64.
- [x] Add unit test case.
BUG=
R=turnidge@google.com
Review URL: https://codereview.chromium.org/2386123005 .
This change:
- Sucks in gn binaries
- Sucks in a version of llvm that the GN build likes
- Adds tools/gn.py to invoke gn
- Adds a root BUILD.gn and .gn file
- Removes chrome boilerplate we don't need
- etc.
This lets us do a standalone build of the 'runtime'
target for x64, ia32, arm, arm64, mips, and the
simulators on Linux, and arm and arm64 on Android.
It does not include tcmalloc, and hasn't been tested
on Mac or Windows. That work and more cleanup of
chrome boilerplate will come in follow-up CLs.
R=johnmccutchan@google.com
Review URL: https://codereview.chromium.org/2350583002 .
When async-stepping over an await statement that follows a previous
async-step command, ensure that the synthetic breakpoint at the
beginning of the async closure is not accidentally deleted.
Removing a test that depends on minute details of the internal
implementation of async-step commands.
Adding new test that checks for multiple consecutive async-step
commands.
Note that debugger.cc seems to contain a memory leak. Breakpoint
objects are not deleted (deallocated) when RemoveBreakpoint()
is called. Will address this in a separate CL.
BUG=#27238
R=johnmccutchan@google.com
Review URL: https://codereview.chromium.org/2366463002 .
Just like we do for local variables, add a debug step check (and
thus a breakpoint location) to global variable assignment if
the right side of the assignment has no possible breakpoint locations.
BUG=#27287
R=johnmccutchan@google.com
Review URL: https://codereview.chromium.org/2354773002 .
- [x] GYPI: Remove buggy dependency on the sdk's packages.stamp which shouldn't have been a dependency in the first place.
- [x] GN: Switch output names to match new non-polymer based build
BUG=
Review URL: https://codereview.chromium.org/2351933002 .