From 0d787c1fa18c6a1f29ef9840e28a68cf077be1de Mon Sep 17 00:00:00 2001 From: Elliott Hughes Date: Thu, 4 Apr 2013 13:46:46 -0700 Subject: 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 --- libc/bionic/malloc_debug_qemu.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'libc/bionic/malloc_debug_qemu.cpp') diff --git a/libc/bionic/malloc_debug_qemu.cpp b/libc/bionic/malloc_debug_qemu.cpp index 08225c1..34ddb87 100644 --- a/libc/bionic/malloc_debug_qemu.cpp +++ b/libc/bionic/malloc_debug_qemu.cpp @@ -600,7 +600,7 @@ int malloc_debug_initialize() { error_log("Unable to open /dev/qemu_trace"); return -1; } else { - qtrace = mmap(0, PAGESIZE, PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0); + qtrace = mmap(NULL, PAGESIZE, PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0); close(fd); if (qtrace == MAP_FAILED) { -- cgit v1.1