android_system_core/include/cutils
Christopher Ferris 9774df6134 Move 32 bit/64 bit check into debuggerd.
On 64 bit systems, calls to dump_backtrace_to_file or dump_tombstone
try and directly contact the correct debuggerd (32 bit vs 64 bit)
by reading the elf information for the executable.
Unfortunately, system_server makes a call to dump_backtrace_to_file
and it doesn't have permissions to read the executable data, so it
defaults to always contacting the 64 bit debuggerd.
This CL changes the code so that all dump requests go to the 64 bit
debuggerd, which reads the elf information and redirects requests for
32 bit processes to the 32 bit debuggerd.

Testing:

- Forced the watchdog code in system_server to dump stacks and
  verified that all native stacks are dumped correctly.
- Verified that dumpstate and bugreport still properly dump the native
  processes on a 64 bit and 32 bit system.
- Intentionally forced the 64 bit to 32 bit redirect to write only a
  byte at a time and verified there are no errors, and no dropped data.
- Used debuggerd and debuggerd64 to dump 32 bit and 64 bit processes
  seemlessly.
- Used debuggerd on a 32 bit system to dump native stacks.

Bug: https://code.google.com/p/android/issues/detail?id=97024
Change-Id: Ie01945153bdc1c4ded696c7334b61d58575314d1
2015-01-20 17:22:07 -08:00
..
android_reboot.h Make init handle reboots 2013-04-23 13:21:40 -07:00
aref.h Remove atomic-inline.h. 2014-11-17 14:38:56 -08:00
ashmem.h Fix sim-eng build. 2010-06-30 22:20:49 -07:00
atomic.h Second attempt to "Rewrite atomic.h to use stdatomic.h." 2014-11-13 15:59:10 -08:00
bitops.h include: cleanup for -Wsystem-header 2014-05-23 15:09:57 -07:00
compiler.h Add ANDROID_API macro to export symbols 2011-10-12 13:45:59 -07:00
config_utils.h Config utils improvement 2011-05-26 13:57:03 -07:00
debugger.h Move 32 bit/64 bit check into debuggerd. 2015-01-20 17:22:07 -08:00
dir_hash.h auto import from //depot/cupcake/@135843 2009-03-03 19:32:55 -08:00
fs.h include: cleanup for -Wsystem-header 2014-05-23 15:09:57 -07:00
hashmap.h auto import from //depot/cupcake/@135843 2009-03-03 19:32:55 -08:00
iosched_policy.h system: Add support for getting/setting i/o priorities and include a userspace tool 2010-02-25 14:02:55 -08:00
jstring.h Do not typedef char16_t if it is a keyword. 2014-07-18 17:53:02 -07:00
klog.h am db480f75: am 6a58c4f3: am 33e86e00: Merge "libcutils: add method to get klog level" 2014-03-08 05:46:35 +00:00
list.h Merge "Fix list_for_each_safe macro" 2014-05-22 22:27:14 +00:00
log.h Move liblog headers to system/core/include/log 2013-07-24 12:32:39 -07:00
memory.h auto import from //depot/cupcake/@135843 2009-03-03 19:32:55 -08:00
misc.h Remove dead code that looked like part of debuggerd. 2014-01-31 10:37:18 -08:00
multiuser.h File-system utilities for installd and zygote. 2012-08-30 10:29:41 -07:00
native_handle.h native_handle.h: fix declaration 2011-05-02 17:27:37 -07:00
open_memstream.h Only the Mac doesn't have open_memstream. 2014-08-20 16:16:24 -07:00
partition_utils.h Crypto changes for devices that don't write ext4 fs on wipe 2011-05-26 19:42:32 -07:00
process_name.h auto import from //depot/cupcake/@135843 2009-03-03 19:32:55 -08:00
properties.h Remove HAVE_LIBC_SYSTEM_PROPERTIES and HAVE_SYSTEM_PROPERTY_SERVER. 2015-01-12 13:56:34 -08:00
qtaguid.h libcutils: qtaguid: Support new functions, add tag resource tracking. 2011-09-14 15:00:40 -07:00
record_stream.h HACK: cutils: restore record_stream temporarily 2013-06-04 17:40:28 +00:00
sched_policy.h Add more SP_ constants 2012-04-23 17:34:06 -07:00
sockets.h You either have winsock or <sys/sockets.h>. 2015-01-09 12:21:51 -08:00
str_parms.h Adding a handy predicate function (str_parms_has_key() 2014-03-25 19:08:13 +00:00
threads.h auto import from //depot/cupcake/@135843 2009-03-03 19:32:55 -08:00
trace.h Remove atomic-inline.h. 2014-11-17 14:38:56 -08:00
uevent.h Extend to receive NFLOG packets. 2015-01-15 12:50:59 -08:00