summaryrefslogtreecommitdiffstats
path: root/lldb/source/Core/Mangled.cpp
diff options
context:
space:
mode:
authorBenjamin Kramer <benny.kra@googlemail.com>2010-06-22 21:27:55 +0000
committerBenjamin Kramer <benny.kra@googlemail.com>2010-06-22 21:27:55 +0000
commitb328d72d77db1c54e3120ad88e546e393687538b (patch)
treed5069eaff12cb687c0e75eaf5d8e9852b40e2e7e /lldb/source/Core/Mangled.cpp
parent05407f6b252d6f148274e389126373cef2552cec (diff)
downloadbcm5719-llvm-b328d72d77db1c54e3120ad88e546e393687538b.tar.gz
bcm5719-llvm-b328d72d77db1c54e3120ad88e546e393687538b.zip
Turns out __cxa_demangle returns the size of the buffer instead of the size of
the demangled name. Fall back to strlen. llvm-svn: 106579
Diffstat (limited to 'lldb/source/Core/Mangled.cpp')
-rw-r--r--lldb/source/Core/Mangled.cpp7
1 files changed, 2 insertions, 5 deletions
diff --git a/lldb/source/Core/Mangled.cpp b/lldb/source/Core/Mangled.cpp
index cb4335bb6aa..31afa8bc54c 100644
--- a/lldb/source/Core/Mangled.cpp
+++ b/lldb/source/Core/Mangled.cpp
@@ -141,7 +141,6 @@ namespace
return status;
}
const char *GetBuffer () const { return m_demangle_buf; }
- size_t GetLength () const { return m_demangle_buf_len; }
};
}
@@ -197,11 +196,9 @@ Mangled::GetDemangledName () const
::pthread_setspecific (g_demangle_key, buf);
}
- int status = buf->Demangle (mangled);
- if (status == 0)
+ if (buf->Demangle (mangled) == 0)
{
- m_demangled.SetCStringWithLength(buf->GetBuffer(),
- buf->GetLength());
+ m_demangled.SetCString(buf->GetBuffer());
}
else
{
OpenPOWER on IntegriCloud