diff options
author | liamwhite <liamwhite@users.noreply.github.com> | 2023-01-22 19:13:58 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-01-22 19:13:58 +0100 |
commit | 9705094a576e6594e359cc0256b63385ac05de3f (patch) | |
tree | 39bd8d1893028a8ba815e214fca2defb8e6331e4 /src/core | |
parent | Merge pull request #9642 from Tachi107/appstream-metadata-fix (diff) | |
parent | Change licenses (diff) | |
download | yuzu-9705094a576e6594e359cc0256b63385ac05de3f.tar yuzu-9705094a576e6594e359cc0256b63385ac05de3f.tar.gz yuzu-9705094a576e6594e359cc0256b63385ac05de3f.tar.bz2 yuzu-9705094a576e6594e359cc0256b63385ac05de3f.tar.lz yuzu-9705094a576e6594e359cc0256b63385ac05de3f.tar.xz yuzu-9705094a576e6594e359cc0256b63385ac05de3f.tar.zst yuzu-9705094a576e6594e359cc0256b63385ac05de3f.zip |
Diffstat (limited to 'src/core')
-rw-r--r-- | src/core/arm/arm_interface.cpp | 22 |
1 files changed, 4 insertions, 18 deletions
diff --git a/src/core/arm/arm_interface.cpp b/src/core/arm/arm_interface.cpp index 2df7b0ee8..8aa7b9641 100644 --- a/src/core/arm/arm_interface.cpp +++ b/src/core/arm/arm_interface.cpp @@ -1,14 +1,12 @@ // SPDX-FileCopyrightText: Copyright 2018 yuzu Emulator Project // SPDX-License-Identifier: GPL-2.0-or-later -#ifndef _MSC_VER -#include <cxxabi.h> -#endif - #include <map> #include <optional> + #include "common/bit_field.h" #include "common/common_types.h" +#include "common/demangle.h" #include "common/logging/log.h" #include "core/arm/arm_interface.h" #include "core/arm/symbols.h" @@ -71,20 +69,8 @@ void ARM_Interface::SymbolicateBacktrace(Core::System& system, std::vector<Backt const auto symbol_set = symbols.find(entry.module); if (symbol_set != symbols.end()) { const auto symbol = Symbols::GetSymbolName(symbol_set->second, entry.offset); - if (symbol.has_value()) { -#ifdef _MSC_VER - // TODO(DarkLordZach): Add demangling of symbol names. - entry.name = *symbol; -#else - int status{-1}; - char* demangled{abi::__cxa_demangle(symbol->c_str(), nullptr, nullptr, &status)}; - if (status == 0 && demangled != nullptr) { - entry.name = demangled; - std::free(demangled); - } else { - entry.name = *symbol; - } -#endif + if (symbol) { + entry.name = Common::DemangleSymbol(*symbol); } } } |