mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-24 01:31:46 +00:00
[wpiutil] StackTrace: Include offset on Linux (#3305)
This commit is contained in:
@@ -26,8 +26,11 @@ std::string GetStackTrace(int offset) {
|
||||
// extract just function name from "pathToExe(functionName+offset)"
|
||||
StringRef sym{mangledSymbols[i]};
|
||||
sym = sym.split('(').second;
|
||||
sym = sym.split('+').first;
|
||||
trace << "\tat " << Demangle(sym) << "\n";
|
||||
StringRef offset;
|
||||
std::tie(sym, offset) = sym.split('+');
|
||||
StringRef addr;
|
||||
std::tie(offset, addr) = offset.split(')');
|
||||
trace << "\tat " << Demangle(sym) << " + " << offset << addr << "\n";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user