History log of /system/core/debuggerd/tombstone.cpp
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
21bd040effcfc48e8794558c91bbfdc159a98f00 02-Jun-2015 Christopher Ferris <cferris@google.com> Change the 64 bit map address format.

Previously, the map printing in tombstones for 64 bit devices uses
a variable length value. This means that the maps are not lined up.
The new format is to print the map as 00000000'00000000 in all ways.

Also fix a bug where the backtrace_map_t did not initialize all
parameters.

Add unit tests for all of the dump_all_maps function.

Bug: 20950813
(cherry picked from commit 862fe029190b6d8344889988fb85526e64b2f4b7)

Change-Id: Ife5c48bddeb19006a98f9e87520474e97b97f6d9
/system/core/debuggerd/tombstone.cpp
0c3f1ae66b693ef0f37066b697cc10a07ef56acc 22-May-2015 Christopher Ferris <cferris@google.com> Refactor dump_memory function.

- Add dumping memory around registers for x86/x86_64.
- Add unit tests for new dump_memory function.
- Cleanup all of the machine.cpp files.
- Increase the high address check for 32 bit, and decrease the high
address allowed for 64 bit slightly to match mips64.

Bug: 21206576
(cherry picked from commit e8bc77eb845ab5557a4c98fe0da604d4a3740bef)

Change-Id: I49ec237e30076a232f084da1072bf9aba15dc0cd
/system/core/debuggerd/tombstone.cpp
f0861f9f8fb1884e863fdf5e1b95d69d43d8b1ff 16-May-2015 Christopher Ferris <cferris@google.com> Switch UniquePtr to std::unique_ptr.

Bug: 21209050
Change-Id: I91d4c44de479b37f2729382fcdf103b8c69aa668
(cherry picked from commit 6e96403b8fd25a98f2cfc9680de45f39ff4ec491)
/system/core/debuggerd/tombstone.cpp
eb19e766322fb57ccde989e0e35b0ac3e28a4ac2 15-May-2015 Christopher Ferris <cferris@google.com> Prevent crashes if a map cannot be created.

Under some conditions, /proc/<pid>/maps might return nothing. If we
try and unwind in this case, we'll crash. Check this case and fail
the unwind.

Add checks that no other functions try and use map_ without
checking for nullptr.

Add logging when an unwind fails so it's clear what happened.

Bug: 21162746
Change-Id: I56ce51dda0cfc9db20475a441f118108196aa07c
(cherry picked from commit 30c942cf1024bf791c28ab9b67a1f752de72248c)
/system/core/debuggerd/tombstone.cpp
af67fb247540ef084a0b644e1d3bf225db4de6bd 06-May-2015 Christopher Ferris <cferris@google.com> Add offset to map data.

Also, print the offset in the maps section.

Bug: 20864928
Change-Id: I71f005726e5ef73cf75bbcb8f829fd5127cb9d61
(cherry picked from commit 5c8856854de4ae7836fc1073d534f4b7b7a03eb9)
/system/core/debuggerd/tombstone.cpp
b0481f48091d77f21492cc2f717308412091bc02 05-May-2015 Christopher Ferris <cferris@google.com> All debuggerd log output marked fatal.

This avoids the log daemon skipping some of the log output from
debuggerd.

Bug: 20846525
(cherry picked from commit b0412a5c2b446edb137980333aa0a0bbfda2e955)
Change-Id: Ifed48814d76c7e855645b6d5487d5e6e1fcafd9e
/system/core/debuggerd/tombstone.cpp
329ed7dae49eba09bdf865dd999d1a7e73bb9687 02-May-2015 Christopher Ferris <cferris@google.com> Add load base to map for relocation packing.

The new linker relocation packing support uses non-zero load bases,
so we better handle them properly.

Also print out the load base for a map if it's non-zero.

Bug: 20687795
Change-Id: Iec2d1db2051e7b4a278c1dfa57d745128a7f2974
/system/core/debuggerd/tombstone.cpp
a21bd93ef5223ce585985e3b426ff5f07c9f4499 27-Feb-2015 Christopher Ferris <cferris@google.com> Print the build id of shared libraries if present.

For every map that has a name, and if it's a mapped in shared library,
print the build id.

Refactor the way dump_all_maps logs data.

Refactor the way stack segments are dumped.

Bug: 19371018
Change-Id: Ic08d05a4b13f128925743936fb84d8059f7cb56f
/system/core/debuggerd/tombstone.cpp
2d3f38a6b8e724749b59d201a01b35fa0951141e 26-Jan-2015 Mark Salyzyn <salyzyn@google.com> liblog: introduce ANDROID_LOG_* flags

Move away from using POSIX open(2) flags and introduce ANDROID_LOG_* flags to
replace them. Add security by preventing random mode flags from getting into
underlying POSIX calls. ANDROID_LOG_* flags overlap POSIX O_* flag definitions.

Change-Id: Ib32bb64c287e8bf150be62242e1ba46bb37839fc
/system/core/debuggerd/tombstone.cpp
ab9e7dcef62ae05b3c74215325a2bd2b554d383a 10-Feb-2015 Christopher Ferris <cferris@google.com> Do not dump maps/memory/code of sibling threads.

Modifies the code so that if the unwind fails, the code still prints
as much data as possible.

Also, for sibling threads, skip printing the maps and memory/code
since it's not likely to be very relevant.

Fix a few cases where extra space is at the end of lines.

Fix an inverted if statement that was checking the wrong condition.

Bug: 18816322
Change-Id: Ic659e0c34489bf2c65c5a23e2b83e31653b927e4
/system/core/debuggerd/tombstone.cpp
12385e3ad085aa1ac06c26529b32b688503a9fcf 06-Feb-2015 Christopher Ferris <cferris@google.com> Move map data into backtrace data proper.

The backtrace structure used to include a pointer to a backtrace_map_t
that represented the map data for a particular pc. This introduced a
race condition where the pointer could be discarded, but the backtrace
structure still contained a pointer to garbage memory. Now all of the map
information is right in the structure.

Bug: 19028453
Change-Id: If7088a73f3c6bf1f3bc8cdd2bb4b62e7cab831c0
/system/core/debuggerd/tombstone.cpp
c184d5655ac126c781e940f1a77a3448d2351b78 19-Dec-2014 Elliott Hughes <enh@google.com> #include <arpa/inet.h> for htonl.

Not sure why this only shows up with clang.

Change-Id: Id5603483e32f8a8d4b091dbb31b3142e3f77deac
/system/core/debuggerd/tombstone.cpp
d4c7a1cfad22a55d31b6a27b859fb534194fb0e4 03-Nov-2014 Christopher Ferris <cferris@google.com> am a11ac455: Merge "Fix debuggerd issues."

* commit 'a11ac45536f0722becefccdb6b58378c5d9d0d4b':
Fix debuggerd issues.
1072f917cfa36ff905c31122a3cd99224e305932 01-Nov-2014 Christopher Ferris <cferris@google.com> Fix debuggerd issues.

- Fix a problem where a tid exits before the attach completes, and it
causes debuggerd to self terminate.
- Fix a problem where sibling tid dumps do not properly wait for the tid
to get signalled.

Bug: 17800180
Bug: 12567315

(cherry picked from commit 84ddb34a3af77dbe490aaa07b738bbfd7109d5ba)

Change-Id: I45e33865614d4c96f4a89cf117398666b556d500
/system/core/debuggerd/tombstone.cpp
c3261151152f27011135786820579eb1981540f3 10-Aug-2014 Dmitriy Ivanov <dimitry@google.com> am 75ef453e: am 2f40ddf3: Merge "Do not suppress maps dump when si_addr<PAGE_SIZE"

* commit '75ef453e5d3352aad8c55cd8fa572945c6f4bbfa':
Do not suppress maps dump when si_addr<PAGE_SIZE
f10aa3ae9d58269465c579e4c286ccef6be4c2d0 09-Aug-2014 Dmitriy Ivanov <dimitry@google.com> Do not suppress maps dump when si_addr<PAGE_SIZE

Also remove alignment of si_addr.

Change-Id: Ie5445bf8a5baa49e04e37c643c25ebd0f1dc9d22
/system/core/debuggerd/tombstone.cpp
a9d3ed32e9553b97730ba9fafc4741c91dad7a3b 30-Jul-2014 Mark Salyzyn <salyzyn@google.com> am 1d497f8a: am cddc97cb: Merge "debuggerd: tombstone: suppress logger request for logd process"

* commit '1d497f8a92994abeb5baeaacdec037268838af20':
debuggerd: tombstone: suppress logger request for logd process
45ae446cab9cfc9b6100d91b1a37c6ad82e0cb99 25-Jul-2014 Mark Salyzyn <salyzyn@google.com> debuggerd: tombstone: suppress logger request for logd process

Change-Id: I619880342ee6febd1a6cc98d2a4f536120efc1c8
/system/core/debuggerd/tombstone.cpp
04f9b2a809cb83c3d36c75791bfa28690800c883 17-Jul-2014 Nick Kralevich <nnk@google.com> debuggerd: use O_NOFOLLOW|O_CLOEXEC for tombstones

Change-Id: I71bdfba30346a9fad3129b404f39eda8190698e3
/system/core/debuggerd/tombstone.cpp
7e775952e173b02d1930c56885da4ab7a9e62e0a 08-Jul-2014 Elliott Hughes <enh@google.com> Fix LP64 tombstone.cpp build failure.

Change-Id: Id071417f56dd883e9d2e38a6f3296cb23a0352fb
/system/core/debuggerd/tombstone.cpp
8606eaa7700609a2f9f2383b954b4e64dbc4c827 07-Jul-2014 Brigid Smith <brigidsmith@google.com> Improving maps output.

Maps output now displays fault address location more intelligently. If
the fault is not in a mapped region, it now shows where that address is
with respect to the other maps.

In addition, the size of the map is now printed as part of the output.

Also, crasher now supports an "mmap" option which mmaps/munmaps a region
of memory and then attempts to access it, causing a fault address in
between mapped regions that can be used to test that new part of the
maps output.

Change-Id: Ia5e1926802bdfcbbdb7857e3631ddf395ae0c5b8
/system/core/debuggerd/tombstone.cpp
17e85c06716fe1a6973d46e6b8b19c6b72de1c81 28-Jun-2014 Mark Salyzyn <salyzyn@google.com> debuggerd: synchronize cosmetics to internal

Change-Id: I66bc2b181cd75da188c046571492224d5ac3fc98
/system/core/debuggerd/tombstone.cpp
e43290d7ed6e90bd64c93fe8796f5aeaf1e68436 27-Jun-2014 Mark Salyzyn <salyzyn@google.com> tombstone: log output header suppressed in crash

Bug: 15520846
Change-Id: I18934cc60af3dda98ab729fbabc4c7a66834512e
/system/core/debuggerd/tombstone.cpp
80f596984e3a941353a7d179efdf86ff0181d412 21-Jun-2014 Michael Wright <michaelwr@google.com> Print ABI in backtraces.

This lets the stack tool figure out which toolchain to use
automatically.

Change-Id: Ia235d6904622423fe6fbc7b0315a1861e52a41ad
/system/core/debuggerd/tombstone.cpp
f473200d355a10dca1260948acc85bf059034768 23-Jun-2014 Brigid Smith <brigidsmith@google.com> Fixing debuggerd header output.

PID and TID output line was missing.

Change-Id: I609af5727bc22ea0b97f3975ddb3cf0102910bc2
/system/core/debuggerd/tombstone.cpp
2e8290463eff6e66e17b8afa0bcdfe4ff2e920cf 20-Jun-2014 Brigid Smith <brigidsmith@google.com> Maps output now marks the fault address location.

If the fault address is not within a mapped region, it logs an error
message after the output. Otherwise, it prefixes the location of the
fault address with "--->" to make it easier to locate.

Change-Id: I330adaade4402ffeb09f1a6d34a944c2f054d06d
/system/core/debuggerd/tombstone.cpp
50eb546ec1584c04cf18f1941a042d7c5d045a67 18-Jun-2014 Brigid Smith <brigidsmith@google.com> Removed log.quiet and log = NULL cases from debuggerd.

Now the functionality implemented by these semi-confusing cases has been
replaced with the same logtype enum behavior that is easier to
understand, and cases that used log-looking behavior to print to logcat
(when log = NULL) now use the more transparent ALOGE/ALOGD functions.

Change-Id: I7e38f2d4ca74a828df4d2266b3ea34edd3c6f5bb
/system/core/debuggerd/tombstone.cpp
7b2078eeb4f68f3a81695de64ec8df003d3f8e3c 17-Jun-2014 Brigid Smith <brigidsmith@google.com> Changed maps output in debuggerd.

Now the map output is only sent to the tombstone, and the entire
contents of /prod/$PID/maps is logged, not just 3 lines. Additionally,
crasher now supports "crasher SIGSEGV-non-null", which attempts to write to a
dereferenced function address, causing a SIGSEGV at a non-zero address.
This new crasher mode can be used to test the new maps output.

Bug: 15343662
Change-Id: I796d92e8352a6b9714bbbfe96f3143c56565ef2f
/system/core/debuggerd/tombstone.cpp
62ba489ba00a2689d4e257bc178cff87495f99d7 10-Jun-2014 Brigid Smith <brigidsmith@google.com> Changing how debuggerd filters log messages to different locations.

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
/system/core/debuggerd/tombstone.cpp
9c8dacce55455cacd282789982ef931e55bb4a40 03-Jun-2014 Brigid Smith <brigidsmith@google.com> Adding ABI output to debuggerd tombstones.

Bug: 15084471
Change-Id: If9fb260a3403e86f80928f2f5f79331fc0936030
/system/core/debuggerd/tombstone.cpp
e4369d68a255790ff0ed21ba31d3dcbb520df09d 27-May-2014 Mark Salyzyn <salyzyn@google.com> logd: logcat: debuggerd: audit logs to events and main

- auditd spawn log copy to events and main
- logcat delete events as one of the default logs
- debuggerd do not collect events.
- squish multiple spaces
- switch from strcpy to memmove for overlapping buffers

BUG: 14626551
Change-Id: I89b30273ce931ed2b25a53ea9be48e77f4c1bbf4
/system/core/debuggerd/tombstone.cpp
a323b504a70af5f143532f0ef521eb61ecddad6b 17-May-2014 Elliott Hughes <enh@google.com> Teach debuggerd the name of SIGTRAP.

Also add SIGTRAP to the list of signals we don't want to double fault on.

Bug: 15024256
Change-Id: I23ab80800563c007fcd3e42527329fedf762f0c8
/system/core/debuggerd/tombstone.cpp
989980c55d9a11766b8698a97ce5eef3d8cfa286 14-May-2014 Mark Salyzyn <salyzyn@google.com> logd: logcat: debuggerd: auditd logs to events

- auditd switch to recording logs to events log id
- logcat add events as one of the default logs
- debuggerd collect events log as well.

ToDo: debuggerd & bugreport collect intermixed logs.

BUG: 14626551
Change-Id: I958f0e729b7596748be57488a38824db5645be7b
/system/core/debuggerd/tombstone.cpp
c5bb49a138a78442e7326dfb6bbf85feadf0d486 05-May-2014 Christopher Ferris <cferris@google.com> Log stack even if tombstone cannot be created.

Bug: 14498701
Change-Id: I62c271bef2f73166eeb91d3fa3ce1e1b724a081f
/system/core/debuggerd/tombstone.cpp
855fcc3114c20ff9fd286fe1723d1413fec9685a 26-Apr-2014 Elliott Hughes <enh@google.com> Use the si_code value bionic passes us.

Bionic needs to re-raise various signals, which means the si_code
debuggerd sees has been clobbered. If bionic sends us the original
si_code value, we can use that instead of the one we see when the
ptrace the crashed process' siginfo.

Change-Id: If116a6bc667d55a6fb39b74f96673292af4e4c8c
/system/core/debuggerd/tombstone.cpp
bd395b9a142209228ec8c03d3eb3f3e97a89f9b5 24-Apr-2014 Elliott Hughes <enh@google.com> Add missing si_code values to debuggerd.

Also add static_asserts so we'll be notified if any more new ones show up.

Change-Id: I3a502dd4da35354e1ac65865191d31ccdacef298
/system/core/debuggerd/tombstone.cpp
2e7347d617b02b13d227bb4cecf6bd69b7b20fa9 13-Feb-2014 Nick Kralevich <nnk@google.com> Merge "Convert all selinux_android_restorecon and _setfilecon calls to new API."
68bd59f6d2c63b752aa4f38bcd655c0d52d6597e 07-Feb-2014 Christopher Ferris <cferris@google.com> Use stat structure to keep oldest mtime.

Change-Id: If9496127db28d2dcd09bc5b3144632a43afb8d55
/system/core/debuggerd/tombstone.cpp
27a93650c0df02e4cd3c48bbec8acee8b817a012 07-Feb-2014 Stephen Smalley <sds@tycho.nsa.gov> Convert all selinux_android_restorecon and _setfilecon calls to new API.

libselinux selinux_android_restorecon API is changing to the more
general interface with flags and dropping the older variants.

Also get rid of the old, no longer used selinux_android_setfilecon API
and rename selinux_android_setfilecon2 to it as it is the only API in use.

Change-Id: I1e71ec398ccdc24cac4ec76f1b858d0f680f4925
Signed-off-by: Stephen Smalley <sds@tycho.nsa.gov>
/system/core/debuggerd/tombstone.cpp
f7b4b519e4c7df19faa04371d64b7560a08005e0 01-Feb-2014 Elliott Hughes <enh@google.com> Fix debuggerd's symbol offset output.

Before:
00007fff33e489d8 00007ff286e4ad94 /system/lib64/libc.so (__libc_init+54u)

After:
00007fff45c6c158 00007f61bc36fd94 /system/lib64/libc.so (__libc_init+84)

Change-Id: I36796c99843a41583824a96793a5a4c81ddb666e
/system/core/debuggerd/tombstone.cpp
abc60c26b7448e6b2842351688a7a823b8b787d6 19-Dec-2013 Kévin PETIT <kevin.petit@arm.com> AArch64: Port debuggerd

Change-Id: Ib18f76f375a1d70c84e0a09d221e17ac43144b96
Signed-off-by: Kévin PETIT <kevin.petit@arm.com>
/system/core/debuggerd/tombstone.cpp
c6c194ced095df5e777b8fa24527ebd29c8fef54 21-Nov-2013 Pavel Chupin <pavel.v.chupin@intel.com> LP64: Enable debuggerd/libbacktrace/libunwind.

Change-Id: I2e432839f86c33c2adbaac8cc12ca8961956044b
Signed-off-by: Pavel Chupin <pavel.v.chupin@intel.com>
/system/core/debuggerd/tombstone.cpp
4bb477205a2446c3ba9db8df0b0446173065d9eb 18-Dec-2013 Kévin PETIT <kevin.petit@arm.com> debuggerd: a few generic improvements

This one makes dump_memory reasonably architecture-agnostic so it is
possible to share the code between architectures.

It also includes a few small improvements in tombstone.cpp.

Change-Id: Ib8a9599bfa420b41e80207988e87aee1b9d79541
Signed-off-by: Kévin PETIT <kevin.petit@arm.com>
/system/core/debuggerd/tombstone.cpp
d391c9b4acb2bcd6cec048075e728d3aee6a0d6f 28-Jan-2014 Christopher Ferris <cferris@google.com> Merge "Re-enable libunwind for arm."
df2906186b6952c57b1f662bfef0b65c9f8c2e0d 23-Jan-2014 Christopher Ferris <cferris@google.com> Re-enable libunwind for arm.

Update to handle the new optimized way that libunwind works.

In addition, a small refactor of the BacktraceMap code.

A few new tests of for good measure.

Change-Id: I2f9b4f5ad5a0dfe907b31febee76e4b9b94fb76f
/system/core/debuggerd/tombstone.cpp
fca0bd1a38597b83f6511d0c7c971fce75dc8123 12-Dec-2013 Mark Salyzyn <salyzyn@google.com> debuggerd: Support newline split in log messages

(cherry picked from commit 706fad2b5fd96fb9b705795af1c11ef44d8a8fe9)

Change-Id: I2c19f12ef027ab1e1455ce78824537da1b03edcd
/system/core/debuggerd/tombstone.cpp
22b5cef1277a5e1d5deef7420281eafade2e2614 22-Nov-2013 Mark Salyzyn <salyzyn@google.com> debuggerd: Incorporate liblog reading API

(cherry picked from commit a63f927ce10817ce637dd52ba2f4ac763ce4fc61)

Change-Id: Ic26e9dba3b45c827d122b03e34cc4a5bd48f7deb
/system/core/debuggerd/tombstone.cpp
46756821c4fe238f12a6e5ea18c356398f8d8795 15-Jan-2014 Christopher Ferris <cferris@google.com> Rewrite libbacktrace to be all C++.

This includes removing the map_info.c source and replacing it with the
BacktraceMap class to handle all map related code.

Change all callers of libbacktrace map functionality.

Also modify the corkscrew thread code so that it doesn't need to build
the map twice (once in the corkscrew format and once in the libbacktrace
format).

Change-Id: I32865a39f83a3dd6f958fc03c2759ba47d12382e
/system/core/debuggerd/tombstone.cpp
20303f856f1f1cdb5af58af0b116b8c598f0ea5c 11-Jan-2014 Christopher Ferris <cferris@google.com> Next phase of the move, reformat use C++ features.

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
/system/core/debuggerd/tombstone.cpp
d607495b892fe6ffa1cd30eaad114eec97d77681 11-Jan-2014 Christopher Ferris <cferris@google.com> Move to C++ for debuggerd.

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
/system/core/debuggerd/tombstone.cpp