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:
@@ -106,7 +106,7 @@ int __system_properties_init(void)
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
prop_area *pa = mmap(0, fd_stat.st_size, PROT_READ, MAP_SHARED, fd, 0);
|
||||
prop_area *pa = mmap(NULL, fd_stat.st_size, PROT_READ, MAP_SHARED, fd, 0);
|
||||
|
||||
if (pa == MAP_FAILED) {
|
||||
goto cleanup;
|
||||
@@ -150,7 +150,7 @@ const prop_info *__system_property_find(const char *name)
|
||||
while(count--) {
|
||||
unsigned entry = *toc++;
|
||||
if(TOC_NAME_LEN(entry) != len) continue;
|
||||
|
||||
|
||||
pi = TOC_TO_INFO(pa, entry);
|
||||
if(memcmp(name, pi->name, len)) continue;
|
||||
|
||||
@@ -163,7 +163,7 @@ const prop_info *__system_property_find(const char *name)
|
||||
int __system_property_read(const prop_info *pi, char *name, char *value)
|
||||
{
|
||||
unsigned serial, len;
|
||||
|
||||
|
||||
for(;;) {
|
||||
serial = pi->serial;
|
||||
while(SERIAL_DIRTY(serial)) {
|
||||
|
||||
Reference in New Issue
Block a user