summaryrefslogtreecommitdiffstats
path: root/libc/bionic/debug_stacktrace.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Clean up internal libc logging.Elliott Hughes2013-03-151-2/+1
| | | | | | | | | | | 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
* Don't collect useless stack frames; do demangle C++ symbols.Elliott Hughes2013-01-291-41/+74
| | | | | | | | | | | | | | 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
* More debug malloc fixes.Elliott Hughes2013-01-251-5/+5
| | | | | | | | | | 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
* Fix the duplication in the debugging code.Elliott Hughes2013-01-181-0/+112
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