mirror of
https://github.com/geode-sdk/geode.git
synced 2025-04-19 08:25:09 -04:00
Merge 09d4f9f51b
into dcd3244944
This commit is contained in:
commit
41537e8e84
1 changed files with 14 additions and 4 deletions
|
@ -164,9 +164,15 @@ static Mod* modFromAddress(void const* addr) {
|
|||
|
||||
static std::string getInfo(void* address, Mod* faultyMod) {
|
||||
std::stringstream stream;
|
||||
stream << "Faulty Lib: " << getImageName(imageFromAddress(address)) << "\n";
|
||||
auto image = imageFromAddress(address);
|
||||
auto imageName = getImageName(image);
|
||||
stream << "Faulty Lib: " << imageName << "\n";
|
||||
stream << "Faulty Mod: " << (faultyMod ? faultyMod->getID() : "<Unknown>") << "\n";
|
||||
stream << "Instruction Address: " << address << "\n";
|
||||
stream << "Instruction Address: " << address;
|
||||
if (image) {
|
||||
stream << " (" << imageName << " + " << std::showbase << std::hex << ((uintptr_t)address - (uintptr_t)image->imageLoadAddress) << std::dec << ")";
|
||||
}
|
||||
stream << "\n";
|
||||
stream << "Signal Code: " << std::hex << s_signal << " (" << getSignalCodeString() << ")" << std::dec << "\n";
|
||||
return stream.str();
|
||||
}
|
||||
|
@ -279,8 +285,12 @@ static std::string getStacktrace() {
|
|||
free(demangle);
|
||||
}
|
||||
|
||||
stacktrace << "- " << binary;
|
||||
stacktrace << " @ " << std::showbase << std::hex << address << std::dec;
|
||||
if (auto image = imageFromAddress(reinterpret_cast<void*>(address))) {
|
||||
stacktrace << "- " << getImageName(image) << " + " << std::showbase << std::hex << (address - (uintptr_t)image->imageLoadAddress) << std::dec;
|
||||
}
|
||||
else {
|
||||
stacktrace << "- " << binary << " @ " << std::showbase << std::hex << address << std::dec;
|
||||
}
|
||||
stacktrace << " (" << function << " + " << offset << ")\n";
|
||||
stacktrace << "- " << function << "\n";
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue