android_system_core/debuggerd
Peter Collingbourne cf9f0870e4 Add support for tombstone symbolization to pbtombstone.
This patch teaches pbtombstone to use llvm-symbolizer to symbolize
stack traces and augment the protobuf tombstones with the symbol
information, before printing tombstones with the symbolized stack
traces included.

The main advantage of adding this information to the tombstone
as opposed to having developers use the stack tool is that stack
does not print all of the information in the original tombstone,
which means that both reports may be required to understand a crash.
Furthermore, stack traces printed by stack are not correlated with
the stack traces in the tombstone, making the report harder to read,
especially with GWP-ASan and MTE which may produce multiple stack
traces for the crashing thread.

Although we could teach stack to print more information, this would
continue to be fragile because stack relies on parsing textual
tombstones. Switching stack to read proto tombstones would be
tantamount to a full rewrite and would require duplicating the C++
proto-to-text logic that we already have in Python. It seems better
to reuse the C++ code for the proto-based symbolization tool.

llvm-symbolizer will look up the symbol files by build ID using a
.build-id directory following the standard here:
https://fedoraproject.org/wiki/RolandMcGrath/BuildID

It will look for .build-id directories under paths specified with
--debug-file-directory, which pbtombstone will pass through to
llvm-symbolizer using its own --debug-file-directory flag. The
intent is that tools for platform developers will pass the flag
--debug-file-directory $ANDROID_PRODUCT_OUT/symbols to pbtombstone.
Soong will start creating .build-id under symbols after a corresponding
Soong CL lands.

Bug: 328531087
Change-Id: Ia4676821cf980c69487cf11aefa2a02dc0c1626f
2024-10-30 14:43:25 -07:00
..
client Make timeout messages distinct 2024-07-03 17:33:08 -07:00
common/include Add ability to handle multiple intercepts per pid. 2023-10-19 15:13:59 +00:00
crasher crasher: hide xom from help when unavailable 2024-05-16 13:53:02 -07:00
handler Remove define of SA_EXPOSE_TAGBITS. 2024-09-19 02:04:16 +00:00
include/debuggerd [MTE] Implement permissive (recoverable) MTE for apps 2024-03-19 11:26:02 +01:00
libdebuggerd Add support for tombstone symbolization to pbtombstone. 2024-10-30 14:43:25 -07:00
proto Make pbtombstone a host tool. 2024-10-30 14:42:55 -07:00
rust/tombstoned_client Format all of the blueprint files. 2024-02-26 13:34:38 -08:00
seccomp_policy Fix up the debuggerd policy files. 2024-02-22 16:23:46 -08:00
test_permissive_mte Allow to re-enable MTE a specified time after a permissive fault 2024-08-14 15:02:54 -07:00
tombstoned Remove unnecessary std::move 2024-08-12 18:15:19 +08:00
.clang-format Remove extraneous .clang-format files 2017-03-14 14:06:31 -07:00
Android.bp Add support for tombstone symbolization to pbtombstone. 2024-10-30 14:43:25 -07:00
crash_dump.cpp [MTE] write stack history into tombstone 2024-08-20 18:04:01 -07:00
crash_test.cpp Add a test to verify the dex_pc is correct. 2021-09-15 22:14:28 +00:00
crash_test.h Add a test to verify the dex_pc is correct. 2021-09-15 22:14:28 +00:00
debuggerd.cpp debuggerd: dump frozen Java processes 2024-01-12 14:06:43 -08:00
debuggerd_benchmark.cpp debuggerd: add pause time benchmark. 2017-12-19 16:36:04 -08:00
debuggerd_test.cpp Make pbtombstone a host tool. 2024-10-30 14:42:55 -07:00
MODULE_LICENSE_APACHE2 auto import from //depot/cupcake/@135843 2009-03-03 19:32:55 -08:00
OWNERS Remove jmgao from OWNERS files. 2021-08-10 21:42:14 -07:00
pbtombstone.cpp Add support for tombstone symbolization to pbtombstone. 2024-10-30 14:43:25 -07:00
protocol.h [MTE] Implement permissive (recoverable) MTE for apps 2024-03-19 11:26:02 +01:00
TEST_MAPPING Make sure debuggerd_test is run on device. 2024-04-25 13:57:52 -07:00
tombstone_handler.cpp Add tombstone_handler for crashes in Microdroid 2023-03-20 11:46:09 +00:00
tombstone_handler.h Add tombstone_handler for crashes in Microdroid 2023-03-20 11:46:09 +00:00
tombstone_symbolize.cpp Add support for tombstone symbolization to pbtombstone. 2024-10-30 14:43:25 -07:00
tombstone_symbolize.h Add support for tombstone symbolization to pbtombstone. 2024-10-30 14:43:25 -07:00
util.cpp Fix fallback paths for dumping threads. 2022-05-27 13:05:56 -07:00
util.h Dump threads in tombstone fallback path. 2022-02-16 15:02:38 -08:00