6#if defined(DART_HOST_OS_ANDROID) || defined(DART_HOST_OS_FUCHSIA) || \
7 defined(DART_HOST_OS_LINUX) || defined(DART_HOST_OS_MACOS)
35 NativeSymbols(
const char* dso_name,
void*
buffer,
size_t size)
36 : next_(nullptr), dso_name_(dso_name) {
37 num_entries_ = *
reinterpret_cast<uint32_t*
>(
buffer);
39 reinterpret_cast<Entry*
>(
reinterpret_cast<uint32_t*
>(
buffer) + 1);
40 name_table_ =
reinterpret_cast<const char*
>(entries_ + num_entries_);
43 NativeSymbols*
next()
const {
return next_; }
46 bool Lookup(
const char* dso_name,
50 if (strcmp(dso_name, dso_name_) != 0) {
55 intptr_t hi = num_entries_ - 1;
57 intptr_t mid = (hi - lo + 1) / 2 + lo;
60 const Entry& entry = entries_[mid];
61 if (dso_offset < entry.offset) {
63 }
else if (dso_offset >= (entry.offset + entry.size)) {
66 *start_offset = entry.offset;
67 *
name = &name_table_[entry.name_offset];
83 const char*
const dso_name_;
84 intptr_t num_entries_;
86 const char* name_table_;
91static NativeSymbols* symbols_ =
nullptr;
96 NativeSymbols*
symbols = symbols_;
107 int r = dladdr(
reinterpret_cast<void*
>(pc), &
info);
112 auto const dso_name =
info.dli_fname;
113 const auto dso_base =
reinterpret_cast<uword>(
info.dli_fbase);
114 const auto dso_offset = pc - dso_base;
118 uword symbol_start_offset;
119 const char* symbol_name;
120 if (
symbols->Lookup(dso_name, dso_offset, &symbol_start_offset,
122 if (start !=
nullptr) {
123 *
start = symbol_start_offset + dso_base;
129#if !defined(DART_HOST_OS_FUCHSIA)
131 if (
info.dli_sname ==
nullptr) {
134 if (start !=
nullptr) {
139 char* demangled = abi::__cxa_demangle(
info.dli_sname,
nullptr, &
len, &status);
143 return info.dli_sname;
154 const char** dso_name) {
156 int r = dladdr(
reinterpret_cast<void*
>(pc), &
info);
160 if (dso_base !=
nullptr) {
161 *dso_base =
reinterpret_cast<uword>(
info.dli_fbase);
163 if (dso_name !=
nullptr) {
164 *dso_name =
info.dli_fname;
static void info(const char *fmt,...) SK_PRINTF_LIKE(1
static float next(float f)
static bool LookupSharedObject(uword pc, uword *dso_base=nullptr, const char **dso_name=nullptr)
static const char * LookupSymbolName(uword pc, uword *start)
static void AddSymbols(const char *dso_name, void *buffer, size_t size)
static void FreeSymbolName(const char *name)
DEF_SWITCHES_START aot vmservice shared library Name of the *so containing AOT compiled Dart assets for launching the service isolate vm snapshot The VM snapshot data that will be memory mapped as read only SnapshotAssetPath must be present isolate snapshot The isolate snapshot data that will be memory mapped as read only SnapshotAssetPath must be present cache dir Path to the cache directory This is different from the persistent_cache_path in embedder which is used for Skia shader cache icu native lib Path to the library file that exports the ICU data vm service The hostname IP address on which the Dart VM Service should be served If not defaults to or::depending on whether ipv6 is specified vm service A custom Dart VM Service port The default is to pick a randomly available open port disable vm Disable the Dart VM Service The Dart VM Service is never available in release mode disable vm service Disable mDNS Dart VM Service publication Bind to the IPv6 localhost address for the Dart VM Service Ignored if vm service host is set endless trace buffer
it will be possible to load the file into Perfetto s trace viewer disable asset Prevents usage of any non test fonts unless they were explicitly Loaded via prefetched default font Indicates whether the embedding started a prefetch of the default font manager before creating the engine run In non interactive keep the shell running after the Dart script has completed enable serial On low power devices with low core running concurrent GC tasks on threads can cause them to contend with the UI thread which could potentially lead to jank This option turns off all concurrent GC activities domain network JSON encoded network policy per domain This overrides the DisallowInsecureConnections switch Embedder can specify whether to allow or disallow insecure connections at a domain level old gen heap size