1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 12:07:45 +00:00

AK: Turn demangling back on for userspace

This didn't work at some point, but now it apparently works again. :^)
This commit is contained in:
Andreas Kling 2020-02-02 20:15:58 +01:00
parent ea8d386146
commit 8ccf0e16a9

View file

@ -33,16 +33,12 @@ namespace AK {
inline String demangle(const StringView& name) inline String demangle(const StringView& name)
{ {
#ifdef KERNEL
int status = 0; int status = 0;
auto* demangled_name = abi::__cxa_demangle(String(name).characters(), nullptr, nullptr, &status); auto* demangled_name = abi::__cxa_demangle(String(name).characters(), nullptr, nullptr, &status);
auto string = String(status == 0 ? demangled_name : name); auto string = String(status == 0 ? demangled_name : name);
if (status == 0) if (status == 0)
kfree(demangled_name); kfree(demangled_name);
return string; return string;
#else
return name;
#endif
} }
} }