mirror of
https://github.com/geode-sdk/geode.git
synced 2025-02-17 00:30:26 -05:00
dump memory mappings in crash logs
a very bad solution to not resolving mod names
This commit is contained in:
parent
a49e230d63
commit
33e7ea3fe3
1 changed files with 12 additions and 0 deletions
|
@ -239,6 +239,15 @@ void printModsAndroid(std::stringstream& stream) {
|
|||
}
|
||||
}
|
||||
|
||||
void printMemoryMappings(std::stringstream& stream) {
|
||||
std::ifstream processMappings("/proc/self/maps");
|
||||
|
||||
std::string mapping;
|
||||
while (std::getline(processMappings, mapping)) {
|
||||
stream << mapping << "\n";
|
||||
}
|
||||
}
|
||||
|
||||
static std::string s_result;
|
||||
bool crashlog::setupPlatformHandler() {
|
||||
(void)utils::file::createDirectoryAll(crashlog::getCrashLogDirectory());
|
||||
|
@ -289,6 +298,9 @@ void crashlog::setupPlatformHandlerPost() {
|
|||
ss << "\n== Crash Report (Logcat) ==\n";
|
||||
ss << s_result;
|
||||
|
||||
ss << "\n== Process Mapping ==\n";
|
||||
printMemoryMappings(ss);
|
||||
|
||||
std::ofstream actualFile;
|
||||
actualFile.open(
|
||||
crashlog::getCrashLogDirectory() / (crashlog::getDateString(true) + ".log"), std::ios::app
|
||||
|
|
Loading…
Reference in a new issue