OSDN Git Service

Don't collect useless stack frames; do demangle C++ symbols.
authorElliott Hughes <enh@google.com>
Tue, 29 Jan 2013 00:27:36 +0000 (16:27 -0800)
committerElliott Hughes <enh@google.com>
Tue, 29 Jan 2013 17:56:31 +0000 (09:56 -0800)
commit35b621c5f4c79959cd36fec0153c2c9c43ebe5f0
tree016d232e99a12943587357bf8b10a3d25cb98b0e
parenta0151cbfbaa37965dbcd188a55a78d3ad4802b9b
Don't collect useless stack frames; do demangle C++ symbols.

Previously, we'd collect every stack frame and then throw some away
when we came to log them. This meant that stack traces were effectively
shorter than the buffers that had been allocated for them. This patch
only stores frames we'll actually output.

Also dynamically call the C++ demangler so we don't have to try to
read mangled names. Because no one knows the mangling of operator new[]
for int arrays off the top of their head.

Bug: 7291287
Change-Id: I42b022fd7cd61675d05171de4c3b2704d058ef2a
libc/bionic/debug_mapinfo.cpp
libc/bionic/debug_mapinfo.h
libc/bionic/debug_stacktrace.cpp
libc/bionic/debug_stacktrace.h
libc/bionic/malloc_debug_check.cpp
libc/bionic/pthread_debug.cpp