mirror of
https://github.com/dart-lang/sdk
synced 2024-11-02 12:24:24 +00:00
826576dcfc
The relocated addresses are populated during BSS::Initialize() for natively loaded ELF snapshots, and during the non-native loader when it is used. Putting this information in the BSS segment avoids having to change the embedder interface, since we only need this information for AOT snapshots. This also avoids depending on our ELF snapshot layout to reverse-engineer the DSO base for ELF-compiled snapshots. We now always print the DSO base for both the VM and isolate in non-symbolic stack traces, not just for ELF-compiled snapshots. However, we still only print the relocated addresses in individual stack frames if we're guaranteed they match those in separately saved debugging information. Bug: https://github.com/dart-lang/sdk/issues/41880 Cq-Include-Trybots: luci.dart.try:vm-kernel-precomp-linux-release-x64-try,vm-kernel-precomp-linux-product-x64-try,vm-kernel-precomp-linux-debug-x64-try,vm-kernel-precomp-win-release-x64-try,vm-kernel-precomp-mac-release-simarm64-try Change-Id: I4837262f78e6e73a32eb7e24ef7a68ccb8ec2669 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/148441 Commit-Queue: Tess Strickland <sstrickl@google.com> Reviewed-by: Martin Kustermann <kustermann@google.com>
29 lines
881 B
C++
29 lines
881 B
C++
// Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
|
|
// for details. All rights reserved. Use of this source code is governed by a
|
|
// BSD-style license that can be found in the LICENSE file.
|
|
|
|
#ifndef RUNTIME_VM_NATIVE_SYMBOL_H_
|
|
#define RUNTIME_VM_NATIVE_SYMBOL_H_
|
|
|
|
#include "vm/allocation.h"
|
|
#include "vm/globals.h"
|
|
|
|
namespace dart {
|
|
|
|
class Mutex;
|
|
|
|
class NativeSymbolResolver : public AllStatic {
|
|
public:
|
|
static void Init();
|
|
static void Cleanup();
|
|
static char* LookupSymbolName(uword pc, uword* start);
|
|
static bool LookupSharedObject(uword pc,
|
|
uword* dso_base = nullptr,
|
|
char** dso_name = nullptr);
|
|
static void FreeSymbolName(char* name);
|
|
static void AddSymbols(const char* dso_name, void* buffer, size_t size);
|
|
};
|
|
|
|
} // namespace dart
|
|
|
|
#endif // RUNTIME_VM_NATIVE_SYMBOL_H_
|