History log of /bionic/libc/bionic/debug_stacktrace.cpp
Revision Date Author Comments
262b7384e4e691d42070a57472ecc64cf668c480 07-May-2013 Ben Cheng <bccheng@google.com> Adjust PC value in ARM stack trace.

-2 for Thumb BLX(2) or -4 for the rest.

Change-Id: Ie59351a0012c2267309f63f0462fdba4698846fe
63dd03ccedc316724c40e140067e612932e4420e 08-May-2013 Ben Cheng <bccheng@google.com> Remove a spurious FIXME and unnecessary type cast.

Change-Id: I05dcefdec7f047bef7eef5c5ceb7453992d56c24
52171b9bdcb2aa1efe9c4deab37c029699fe763d 07-May-2013 Ben Cheng <bccheng@google.com> Adjust PC value in ARM stack trace.

-2 for Thumb BLX(2) or -4 for the rest.

Change-Id: I804fdabfa1db4709bede222d4b432e8d42d53167
8f2a5a0b40fc82126c691d5c30131d908772aab7 15-Mar-2013 Elliott Hughes <enh@google.com> Clean up internal libc logging.

We only need one logging API, and I prefer the one that does no
allocation and is thus safe to use in any context.

Also use O_CLOEXEC when opening the /dev/log files.

Move everything logging-related into one header file.

Change-Id: Ic1e3ea8e9b910dc29df351bff6c0aa4db26fbb58
35b621c5f4c79959cd36fec0153c2c9c43ebe5f0 29-Jan-2013 Elliott Hughes <enh@google.com> 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
239e7a0756fddf3698bf72cab10d7f382421090b 26-Jan-2013 Elliott Hughes <enh@google.com> More debug malloc fixes.

Include the leaky executable's name in the log output. Fix the "sh" test.
Use uintptr_t instead of intptr_t.

Also fix debug formatting of NULL with %s.

Bug: 7291287
Change-Id: I015bf341cd48d43a247173612e6ccb1bf1243d53
1e980b6bc8315d00a07312b25486531247abd98c 18-Jan-2013 Elliott Hughes <enh@google.com> Fix the duplication in the debugging code.

We had two copies of the backtrace code, and two copies of the
libcorkscrew /proc/pid/maps code. This patch gets us down to one.

We also had hacks so we could log in the malloc debugging code.
This patch pulls the non-allocating "printf" code out of the
dynamic linker so everyone can share.

This patch also makes the leak diagnostics easier to read, and
makes it possible to paste them directly into the 'stack' tool (by
using relative PCs).

This patch also fixes the stdio standard stream leak that was
causing a leak warning every time tf_daemon ran.

Bug: 7291287
Change-Id: I66e4083ac2c5606c8d2737cb45c8ac8a32c7cfe8