Differences between this implementation and the old one:
1. Resolves symbols/gdb based on device information (lunch
target is irrelevant)
2. Works with downloaded from build-server symbols
3. Does not require user to specify exe file - detects it automatically
Bug: 18208329
(cherry picked from commit 9b8e4b3772)
Change-Id: I13ae2debb6e2d827b9aa55e93864b5d60c2bd32e
The shell functions in this patch enable crashing processes with the core limit
set correctly to dump core in directory /cores. They do so by remounting the
root partition, which is RAM-backed, and by creating the 0777-chmodded /cores
under it. They also set the core file pattern in /proc/sys/kernel/core_pattern
to be /cores/core.%p, such that a core dump will have the crashing process' PID
appended to it. You enable core-dump generation once per boot, as follows:
coredump-setup
If a process does not have its core-size rlimit set (as most do not), you can
either set it manually by typing "adb shell prlimit <pid> 4 -1 -1", or by
typing coredump-enable <name>, e.g.
coredump-enable $(pid mediaserver)
Alternatively, you can cause a running process to dump core by sending it a
SIGSEGV via the shell function core <name>, e.g.:
core $(pid mediaserver)
Change-Id: Ib174e7ee95515fb9866fa6bf0d5b5bf23f3ec61b
Signed-off-by: Iliyan Malchev <malchev@google.com>
It allows overriding the density the app
is built for. Currently only used in the
GMS core APK's gradle file.
Change-Id: I3606df313a3110208cd8e6acade5f558261c921f
(cherry picked from commit 7e3d2341570681e566872216796dc4f79c8695ef)
If you are debugging a native process, SIGSEGV gets ignored by default.
Make it so that the special ART gdb macro is only called when debugging
app_processXX.
Bug: 17815162
Change-Id: Idba86860dfd94e7483f2668beeb76b3e6032fb34
Due to a bad previous merge, everytime 'lunch' is called, a new
instance of prebuilts/android-emulator/<system>/ will be added
to your PATH.
This patch fixes the issue by removing the duplicate code that
should have been removed during the merge. Note that android-emulator
is still being added once to the PATH by code that appears before
in the script.
BUG=17524154
Change-Id: Iaa03159b0c81b15ef4c7c420e2f76e0a48aba789
I've been told this is no longer in use, and it's the only user of
external/grub, which is distressingly out of date.
Change-Id: I434a55e0d68f6db97fa71e294e983ff1802e9ba6
(cherry picked from commit de21059acf)
Use 4.9 mips64el toolchain for both 64- and 32-bit builds.
Tell ld when 32-bit links are required.
Override 4.9's changed defaults for mips floating point
register use, to get same assembler rules as 4.8 and earlier.
Also: drop unused soft-fp build targets, cleanout redundant
compiler options, and remove extraneous Android.mk file.
(cherry picked from commit 6670e24aed)
Change-Id: I34d2f8fc6113c9d1670e3acff1aff48634b9fe1b
Use /data/local/tmp for runhat reports, instead of the sdcard.
system_server isn't allowed to handle sdcard file descriptors, since
the sdcard could be ejected at any time, causing the kernel to kill the
system process.
This addresses the following SELinux denial:
W/main ( 9906): type=1400 audit(0.0:16): avc: denied { read write } for path="/mnt/shell/emulated/0/hprof-600" dev="fuse" ino=3077890536 scontext=u:r:system_server:s0 tcontext=u:object_r:fuse:s0 tclass=file
Bug: 16375996
Change-Id: I4c2053c327526c2f8e6812f4ed911a712ae9a9b8
Read out the ELF header to see if the executable is 64-bit or 32-bit,
then call the appropriate debuggerd. In bash. Ugh.
Change-Id: I6550fe92e775659cd0370bcb70f40dd59238ad8f
Now gdbclient accepts a fully qualified pathname for EXEs, which it will
not modify, or a relative pathname, to which it will prefix
"/system/bin". As an example, each of the following now works.
Fully qualified:
adb shell gdbserver :5039 /system/bin/ping
bg
gdbclient /system/bin/ping :5039 /system/bin/ping
Relative:
adb shell gdbserver :5039 /system/bin/ping
bg
gdbclient ping :5039 /system/bin/ping
Change-Id: I1e4c9fca64c4fbc52c255271cc7f83f35c258509
Now a program run through gdbclient will not automatically have
/system/bin added to its path, so programs not in /system/bin will no
longer need to be prefixed with ../../.
The following now works as an example:
adb shell gdbserver :5039 /system/xbin/crasher
bg
gdbclient /system/xbin/crasher :5039 /system/xbin/crasher
And the following now no longer works:
adb shell gdbserver :5039 /system/xbin/crasher
bg
gdbclient ../../system/xbin/crasher :5039 /system/xbin/crasher
Change-Id: I299b66d03915aeb1dc300e43a81c9a51f0bd7dec
CALLED_FROM_SETUP and BUILD_SYSTEM set in get_build_var before make execution
no need to set them before calling get_build_var function
Change-Id: Ia79e11e5e3aa5c7fd337b989c16d50750b6c1442
Signed-off-by: Andrey Belous <belous.andrey@gmail.com>
* commit '423242b59ea01dffbb7f79c7c045528f7c351c4b':
set a prebuilt directory name for the 2nd arch
add vendor directories to gdb shared library search path
add 2nd arch gcc to the path
fix paths when 2nd arch gcc is a different version
* commit '828b518377f69516ea6cbb9ad160d81ced6980d5':
set a prebuilt directory name for the 2nd arch
add vendor directories to gdb shared library search path
add 2nd arch gcc to the path
fix paths when 2nd arch gcc is a different version
arm64 is using gcc 4.9, arm is using gcc 4.8. Fix setpaths() to
get a separate version for the 2nd arch.
Change-Id: I7bde01308fc7718360e7d0fbd46b3ae8c5f55fa7