platform_system_core/libcutils
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
..
arch-arm Add android_memset16/android_memset32 for aarch64. 2014-06-23 19:28:33 -07:00
arch-arm64 Add android_memset16/android_memset32 for aarch64. 2014-06-23 19:28:33 -07:00
arch-mips Add Mips memset speedup 2012-08-29 12:33:50 -07:00
arch-x86 Clean up memset[16,32] routines: unify files names, remove redundant wrapper 2014-09-17 18:11:18 +04:00
arch-x86_64 Clean up memset[16,32] routines: unify files names, remove redundant wrapper 2014-09-17 18:11:18 +04:00
tests Disable the static libcutils tests. 2014-11-14 10:56:34 -08:00
Android.mk Remove unused cruft from libcutils. 2015-01-15 21:16:03 -08:00
android_reboot.c Use getmntent when accessing /proc/mounts. 2015-01-05 20:28:36 -08:00
ashmem-dev.c fix valgrind ioctl warning. 2013-08-31 18:57:46 -04:00
ashmem-host.c Make host ashmem_create_region seed only once. 2014-06-03 11:47:58 -07:00
atomic.c Second attempt to "Rewrite atomic.h to use stdatomic.h." 2014-11-13 15:59:10 -08:00
config_utils.c Config utils improvement 2011-05-26 13:57:03 -07:00
debugger.c Move 32 bit/64 bit check into debuggerd. 2015-01-20 17:22:07 -08:00
dir_hash.c Fix a bunch of small system/core bugs. 2013-10-29 14:12:46 -07:00
dlmalloc_stubs.c Fix libcutils/dlmalloc_stubs.c build breakage. 2014-06-03 20:48:44 -07:00
fs.c fs_mkdirs: use O_NOFOLLOW and O_CLOEXEC 2014-06-16 15:40:40 -07:00
hashmap.c libcutils: hashmap: save next pointer in forEach before calling callback 2011-04-19 15:16:18 -07:00
iosched_policy.c Fix windows sdk build. 2014-06-13 04:09:37 +00:00
klog.c libcutils: add method to get klog level 2014-03-07 13:58:02 -08:00
load_file.c auto import from //depot/cupcake/@135843 2009-03-03 19:32:55 -08:00
loghack.h Rename (IF_)LOGE(_IF) to (IF_)ALOGE(_IF) DO NOT MERGE 2012-01-08 11:03:26 +00:00
memory.c Assembly coded android_memset16 and android_memset32 2011-01-07 11:26:34 -08:00
MODULE_LICENSE_APACHE2 auto import from //depot/cupcake/@135843 2009-03-03 19:32:55 -08:00
multiuser.c File-system utilities for installd and zygote. 2012-08-30 10:29:41 -07:00
native_handle.c move native_handle stuff from master_gl 2009-05-20 17:22:13 -07:00
NOTICE auto import from //depot/cupcake/@135843 2009-03-03 19:32:55 -08:00
open_memstream.c Remove dead code. 2014-11-08 11:32:07 -08:00
partition_utils.c libcutils: turn on -Werror 2014-05-01 17:58:17 -07:00
process_name.c Fix references to HAVE_PRCTL. 2014-12-15 12:52:53 -08:00
properties.c Remove HAVE_LIBC_SYSTEM_PROPERTIES and HAVE_SYSTEM_PROPERTY_SERVER. 2015-01-12 13:56:34 -08:00
qtaguid.c libcutils: turn on -Werror 2014-05-01 17:58:17 -07:00
record_stream.c HACK: cutils: restore record_stream temporarily 2013-06-04 17:40:28 +00:00
sched_policy.c HAVE_ANDROID_OS implies that you have <pthread.h> and <sched.h>. 2014-12-14 16:51:36 -08:00
socket_inaddr_any_server.c libcutils: win_sdk build issues 2014-05-05 10:29:56 -07:00
socket_local.h auto import from //depot/cupcake/@135843 2009-03-03 19:32:55 -08:00
socket_local_client.c Kill LOCAL_SOCKET_NAMESPACE. 2014-11-21 22:50:20 -08:00
socket_local_server.c Kill LOCAL_SOCKET_NAMESPACE. 2014-11-21 22:50:20 -08:00
socket_loopback_client.c libcutils: turn on -Werror 2014-05-01 17:58:17 -07:00
socket_loopback_server.c libcutils: win_sdk build issues 2014-05-05 10:29:56 -07:00
socket_network_client.c Libcutils: Remove unused variable 2014-11-24 10:04:56 -08:00
sockets.c libcutils: turn on -Werror 2014-05-01 17:58:17 -07:00
str_parms.c am a0a461d3: am 82e1b89f: am a32e01d2: Merge "libcutils: turn on -Werror" 2014-05-02 17:12:27 +00:00
strdup8to16.c auto import from //branches/cupcake_rel/...@138607 2009-03-13 13:04:37 -07:00
strdup16to8.c Fix a potential integer overflow bug that could result in memory overwrites. 2009-05-02 19:43:30 +02:00
threads.c libcutils: turn on -Werror 2014-05-01 17:58:17 -07:00
trace.c Do not inline rarely used trace function bodies. 2014-10-14 15:37:20 -07:00
uevent.c Extend to receive NFLOG packets. 2015-01-15 12:50:59 -08:00