W5
This commit is contained in:
@@ -15,7 +15,11 @@
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
#if defined(__GNUG__)
|
||||
// The demangler is a host-side nicety for trap traces. wasi-libc++ does not
|
||||
// provide __cxa_demangle, and a wasm unit that merely includes uce_lib.h must
|
||||
// not pull it in as an unresolvable import — so it is host-only.
|
||||
#if defined(__GNUG__) && !defined(__wasm__)
|
||||
#define UCE_WASM_TRACE_HAVE_DEMANGLE 1
|
||||
#include <cxxabi.h>
|
||||
#endif
|
||||
|
||||
@@ -30,7 +34,7 @@ struct WasmTraceSummary
|
||||
|
||||
inline std::string wasm_trace_demangle(const std::string& name)
|
||||
{
|
||||
#if defined(__GNUG__)
|
||||
#if defined(UCE_WASM_TRACE_HAVE_DEMANGLE)
|
||||
// frame names look like "module!symbol"; demangle the symbol part
|
||||
auto bang = name.find('!');
|
||||
std::string prefix = bang == std::string::npos ? "" : name.substr(0, bang + 1);
|
||||
|
||||
Reference in New Issue
Block a user