Roll back the cxxabi demangle _Z check
This commit is contained in:
parent
b2180ae797
commit
8e7b4a953f
@ -14,11 +14,12 @@
|
|||||||
namespace cpptrace {
|
namespace cpptrace {
|
||||||
namespace detail {
|
namespace detail {
|
||||||
std::string demangle(const std::string& name) {
|
std::string demangle(const std::string& name) {
|
||||||
// https://itanium-cxx-abi.github.io/cxx-abi/abi.html#demangler
|
// TODO: Do a special check to ensure external names start with _Z?
|
||||||
// check both _Z and __Z, apple prefixes all symbols with an underscore
|
// // https://itanium-cxx-abi.github.io/cxx-abi/abi.html#demangler
|
||||||
if(!(starts_with(name, "_Z") || starts_with(name, "__Z"))) {
|
// // check both _Z and __Z, apple prefixes all symbols with an underscore
|
||||||
return name;
|
// if(!(starts_with(name, "_Z") || starts_with(name, "__Z"))) {
|
||||||
}
|
// return name;
|
||||||
|
// }
|
||||||
// Apple clang demangles __Z just fine but gcc doesn't, so just offset the leading underscore
|
// Apple clang demangles __Z just fine but gcc doesn't, so just offset the leading underscore
|
||||||
std::size_t offset = 0;
|
std::size_t offset = 0;
|
||||||
if(starts_with(name, "__Z")) {
|
if(starts_with(name, "__Z")) {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user