diff options
author | Nat Goodspeed <nat@lindenlab.com> | 2015-11-02 14:09:43 -0500 |
---|---|---|
committer | Nat Goodspeed <nat@lindenlab.com> | 2015-11-02 14:09:43 -0500 |
commit | 11c428759e0b99fc34e219181d81d024b0323b4d (patch) | |
tree | e6ee27fa90d7767ac8f959c97474ee34bab00211 /indra/llcommon/llerror.cpp | |
parent | 84150294b912d04e345007b65670c0230a2e4d79 (diff) | |
parent | 77da469d6f7901ee0cddf5fb351cd2a756b217f0 (diff) |
Automated merge with ssh://bitbucket.org/lindenlab/viewer-release
Diffstat (limited to 'indra/llcommon/llerror.cpp')
-rwxr-xr-x | indra/llcommon/llerror.cpp | 26 |
1 files changed, 21 insertions, 5 deletions
diff --git a/indra/llcommon/llerror.cpp b/indra/llcommon/llerror.cpp index 5ed348e13c..638cecb054 100755 --- a/indra/llcommon/llerror.cpp +++ b/indra/llcommon/llerror.cpp @@ -239,6 +239,14 @@ namespace { std::string className(const std::type_info& type) { + return LLError::Log::demangle(type.name()); + } +} // anonymous + +namespace LLError +{ + std::string Log::demangle(const char* mangled) + { #ifdef __GNUC__ // GCC: type_info::name() returns a mangled class name,st demangle @@ -252,18 +260,18 @@ namespace // but gcc 3.3 libstc++'s implementation of demangling is broken // and fails without. - char* name = abi::__cxa_demangle(type.name(), + char* name = abi::__cxa_demangle(mangled, abi_name_buf, &abi_name_len, &status); // this call can realloc the abi_name_buf pointer (!) - return name ? name : type.name(); + return name ? name : mangled; #elif LL_WINDOWS // DevStudio: type_info::name() includes the text "class " at the start static const std::string class_prefix = "class "; - std::string name = type.name(); + std::string name = mangled; std::string::size_type p = name.find(class_prefix); if (p == std::string::npos) { @@ -272,11 +280,14 @@ namespace return name.substr(p + class_prefix.size()); -#else - return type.name(); +#else + return mangled; #endif } +} // LLError +namespace +{ std::string functionName(const std::string& preprocessor_name) { #if LL_WINDOWS @@ -403,6 +414,11 @@ namespace namespace LLError { + bool is_available() + { + return Globals::instanceExists(); + } + class SettingsConfig : public LLRefCount { friend class Settings; |