summaryrefslogtreecommitdiffstats
path: root/debuggerd/x86
Commit message (Collapse)AuthorAgeFilesLines
* Updated non-ARM archs to reflect logging changes.Brigid Smith2014-06-191-1/+1
| | | | Change-Id: I0af865881c19ea4a57ec1aa9455bc32c08a60d75
* Changing how debuggerd filters log messages to different locations.Brigid Smith2014-06-161-7/+7
| | | | | | | | | | | | | The system by which debuggerd filters its output to different locations is now based on an enum called logtype with easy to understand categories for log messages (like THREAD, MEMORY, etc.) instead of the old, fairly esoteric scope_flags variable. Now much of the output that previously went to logcat does not show up on the screen, but all output can be found in the tombstone file. In addition, the tombstone's location is now printed so it can be located easily. Bug: 15341747 Change-Id: Ia2f2051d1dfdea934d0e6ed220f24345e35ba6a2
* Fix x86 and x86_64 builds.Christopher Ferris2014-06-031-1/+1
| | | | Change-Id: I1ee9117843aff2abe4067f288b8496d4bfc78c9e
* Next phase of the move, reformat use C++ features.Christopher Ferris2014-01-131-28/+27
| | | | | | | | | | | | | | | | | Use the libbacktrace C++ interface instead of the C interface in debuggerd. Reformat the debuggerd code to be closer to Google C++ style. Fix all debuggerd casts to be C++ casts. Add a frame number to the frame data structure for ease of formatting and add another FormatFrameData function. Change the format_test to use the new FormatFrameData function. Modify all of the backtrace_test to use the C++ interface. Change-Id: I10e1610861acf7f4a3ad53276b74971cfbfda464
* Move to C++ for debuggerd.Christopher Ferris2014-01-101-0/+0
| | | | | | | | | This is part 1, only including the bare minimum changes because our diff tool doesn't easily show differences when a file moves. This also breaks it into a small chunk in case some other changes break things, as unlikely as I think that will be. Change-Id: Ib7a3e7a2cc1ac574d15b65fda23813ebcf5d31af
* Remove x86 debuggerd dependencies on non-uapi headers and corkscrew.Elliott Hughes2013-11-141-14/+6
| | | | | | | Also remove a hack that claims to be "just like ARM", but which was different from the ARM and MIPS behavior. Change-Id: I9b16da9a56430998ded27d304ce52c7cc8bfedfc
* Update debuggerd to use libbacktrace.Christopher Ferris2013-10-031-11/+7
| | | | | | | | | | | | Remove all of the code in debuggerd that uses libcorkscrew directly and replace with libbacktrace. Also do a bit of refactoring to clean up some functions that were passing around variables that weren't used. Bug: 8410085 Change-Id: I27da4fbe3f12ce38a85b4432fc1119984c9c391b
* Uploaded native crash dumps do not include memory contentsChristopher Tate2013-04-051-6/+6
| | | | | | | | | Also fixed the LOG() macro to actually write to the log again, tracking the change in _LOG() argument semantics. Bug 8322568 Change-Id: I79330c85c26d3ffb734315b6d0f2c0bb80bd234a
* Enhance native stack dumps.Jeff Brown2012-06-081-32/+17
| | | | | | | | | | | | | | | | | | | | | | | | | Provides a new mechanism for dumpstate (while running as root) to request that debuggerd dump the stacks of native processes that we care about in bug reports. In this mode, the backtrace is formatted to look similar to a Dalvik backtrace. Moved the tombstone generating code into a separate file to make it easier to maintain. Fixed a bug where sometimes the stack traces would be incomplete because we were not waiting for each thread to stop after issuing PTRACE_ATTACH, only the main thread. So sometimes we were missing traces for some threads. Refactored the logging code to prevent accidentally writing data to logcat when explicitly dumping a tombstone or backtrace from the console. Only root or system server can request to dump backtraces but only root can dump tombstones. Bug: 6615693 Change-Id: Ib3edcc16f9f3a687e414e3f2d250d9500566123b
* Improve stack unwinder robustness.Jeff Brown2011-11-041-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Keep track of whether memory maps are readable. Use the information in try_get_word to try to avoid accidentally dereferencing an invalid pointer within the current process. (Note that I haven't ever seen that happen during normal unwinding, but it pays to be a little more careful.) Refactored try_get_word a little to make it easier to pass it the needed state for validation checks by way of a little memory_t struct. Improved how the memory map for the current process is cached. This is important because we need up to date information about readable maps. Use a 5 second cache expiration. Improved the PC -> LR fallback logic in the unwinder so we can eke out an extra frame sometimes. Fixed a bug reading ELF program headers. The phnum & phentsize fields are half-words. We were incorrectly interpreting phnum as a whole word. Used android_atomic_* operations carefully in the unwinder to prevent possible memory races between the dumper and the dumpee. This was highly unlikely (or even impossible due to the presence of other barriers along the way) but the code is clearer now about its invariants. Fixed a bug in debuggerd where the pid was being passed to have its stack dump taken instead of the tid, resulting in short stacks because ptrace couldn't read the data if pid != tid. Did a full sweep to ensure that we use pid / tid correctly everywhere. Ported old code from debuggerd to rewind the program counter back one instruction so that it points to the branch instruction itself instead of the return address. Change-Id: Icc4eb08320052975a4ae7f0f5f0ac9308a2d33d7
* Use libcorkscrew in debuggerd.Jeff Brown2011-10-223-137/+23
| | | | Change-Id: I5e3645a39d96c808f87075b49111d0262a19a0c8
* Fix crash reporting on x86 platform.Vladimir Chtchetkine2011-06-071-7/+8
| | | | | | Make sure that crash frame gets printed in one line Change-Id: If097a5a1655b17165b2a3271f0f5ee8ace57686f
* debuggerd: IA versionBruce Beare2010-11-294-0/+201
Change-Id: I0c0d9c2d7e476b8d117aaf505a9480a47c0b5c05 Signed-off-by: Lei Li <lei.l.li@intel.com> Signed-off-by: Bruce Beare <bruce.j.beare@intel.com>