[vm] At least give module+offset when symbols are missing on Windows.
TEST=manually added crash Change-Id: I73c8a9417a52efb1c9a1fd0fbe913c60637f9613 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/422541 Reviewed-by: Alexander Aprelev <aam@google.com> Commit-Queue: Ryan Macnak <rmacnak@google.com>
This commit is contained in:
committed by
Commit Queue
parent
3ef86d2807
commit
2a388bdee4
@@ -95,7 +95,22 @@ void NativeSymbolResolver::FreeSymbolName(const char* name) {
|
||||
bool NativeSymbolResolver::LookupSharedObject(uword pc,
|
||||
uword* dso_base,
|
||||
const char** dso_name) {
|
||||
#ifdef DART_TARGET_OS_WINDOWS_UWP
|
||||
return false;
|
||||
#else
|
||||
IMAGEHLP_MODULE64 info = {};
|
||||
info.SizeOfStruct = sizeof(info);
|
||||
if (!SymGetModuleInfo64(GetCurrentProcess(), pc, &info)) {
|
||||
return false;
|
||||
}
|
||||
if (dso_base != nullptr) {
|
||||
*dso_base = info.BaseOfImage;
|
||||
}
|
||||
if (dso_name != nullptr) {
|
||||
*dso_name = Utils::StrDup(info.ImageName);
|
||||
}
|
||||
return true;
|
||||
#endif // ifdef DART_TARGET_OS_WINDOWS_UWP
|
||||
}
|
||||
|
||||
void NativeSymbolResolver::AddSymbols(const char* dso_name,
|
||||
|
||||
Reference in New Issue
Block a user