platform_system_core/debuggerd
Shikha Panwar abde59e689 Add tombstone_handler for crashes in Microdroid
This changes the crash export mechanism in Microdroid. For this, we
create module tombstone_handler which exports methods very similar to
tombstoned.h

For Microdroid (detected using prop: ro.hardware): It calls newly
introduces microdroid specific methods to connect/notify completion of
crash.

Individual methods:
connect -> For Android, it would connect to
tombstoned which would send it the fd corresponding to newly created
file on /data/tombstone_ . For Microdroid, we connect to tombstone
server on host via vsock & populate these sockets as the output fd.
crash_dump, in the later case, would directly write on the socket(s).

notify_completion: For Microdroid, it would simply shutdown the vsock
connections.

Note when OS is not Microdroid: It calls corresponding methods of
tombstoned_client, essentially serving as a proxy.

Detailed design: go/vm-tombstone
Test: atest MicrodroidHostTests#testTombstonesAreGeneratedUponUserspaceCrash
Bug: 243494912

Change-Id: I68537b967f2ee48c1647f0f923aa79e8bcc66942
2023-03-20 11:46:09 +00:00
..
client debuggerd_client: also log errors to the dump file. 2021-06-29 11:59:14 -07:00
common/include Reland protobuf tombstones. 2021-01-26 17:55:17 -08:00
crasher Suppress the error warning 2023-03-08 02:40:09 +00:00
handler Recoverable GWP-ASan: Don't tell ActivityManager 2023-02-07 17:06:32 -08:00
include/debuggerd Recoverable GWP-ASan: Don't tell ActivityManager 2023-02-07 17:06:32 -08:00
libdebuggerd Display offset in backtraces if necessary. 2023-01-31 17:53:45 -08:00
proto Add tomstone proto support for riscv64 2022-10-12 22:31:45 +00:00
rust/tombstoned_client Make some debuggerd libraries available in apex com.android.virt 2022-04-05 15:55:16 +00:00
seccomp_policy Add seccomp policy for riscv64 crash_dump 2022-10-12 22:31:39 +00:00
test_permissive_mte Disable clang-tidy on crash test. 2023-01-03 15:58:29 -08:00
tombstoned Switch to tombstoned.microdroid 2022-10-24 15:56:33 +00:00
.clang-format Remove extraneous .clang-format files 2017-03-14 14:06:31 -07:00
Android.bp Add tombstone_handler for crashes in Microdroid 2023-03-20 11:46:09 +00:00
crash_dump.cpp Add tombstone_handler for crashes in Microdroid 2023-03-20 11:46:09 +00: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 Always use main thread pid for manual dumping. 2021-07-30 14:08:03 -07:00
debuggerd_benchmark.cpp debuggerd: add pause time benchmark. 2017-12-19 16:36:04 -08:00
debuggerd_test.cpp [gwp-asan] fix tests under clang coverage, and extend invariants 2023-02-22 12:27:37 -08: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 Reland protobuf tombstones. 2021-01-26 17:55:17 -08:00
protocol.h Recoverable GWP-ASan: Don't tell ActivityManager 2023-02-07 17:06:32 -08:00
TEST_MAPPING Add tombstone_handler for crashes in Microdroid 2023-03-20 11:46:09 +00: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
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