Make abort messages available to debuggerd.
This adds __libc_fatal, cleans up the internal logging code a bit more, and switches suitable callers over to __libc_fatal. In addition to logging, __libc_fatal stashes the message somewhere that the debuggerd signal handler can find it before calling abort. In the debuggerd signal handler, we pass this address to debuggerd so that it can come back with ptrace to read the message and present it to the user. Bug: 8531731 Change-Id: I416ec1da38a8a1b0d0a582ccd7c8aaa681ed4a29
This commit is contained in:
@@ -21,6 +21,8 @@
|
||||
#include <stdint.h>
|
||||
#include <sys/auxv.h>
|
||||
|
||||
struct abort_msg_t;
|
||||
|
||||
// When the kernel starts the dynamic linker, it passes a pointer to a block
|
||||
// of memory containing argc, the argv array, the environment variable array,
|
||||
// and the array of ELF aux vectors. This class breaks that block up into its
|
||||
@@ -67,6 +69,8 @@ class KernelArgumentBlock {
|
||||
char** envp;
|
||||
Elf32_auxv_t* auxv;
|
||||
|
||||
abort_msg_t** abort_message_ptr;
|
||||
|
||||
private:
|
||||
// Disallow copy and assignment.
|
||||
KernelArgumentBlock(const KernelArgumentBlock&);
|
||||
|
Reference in New Issue
Block a user