Commit graph

302 commits

Author SHA1 Message Date
Iliyan Malchev
248f4d53b3 envsetup.sh: add functions to enable and generate core dumps
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>
2014-10-31 13:50:58 -07:00
Jeff Hamilton
5069bd6bfa Add a density axis to tapas.
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)
2014-10-23 18:30:01 +00:00
Christopher Ferris
855d27f629 Call art-on only when debugging ART processes.
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
2014-10-05 10:41:41 -07:00
David 'Digit' Turner
d036711427 Merge "envsetup.sh: Fix handling of emulator prebuilts path." into lmp-dev 2014-09-16 19:33:37 +00:00
David 'Digit' Turner
50d5ccc1b2 envsetup.sh: Fix handling of emulator prebuilts path.
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
2014-09-16 21:23:12 +02:00
Brian Carlstrom
0c837a093e Merge "Fix mma/mmma by making gettop canonicalize TOP when set" into lmp-dev 2014-09-12 16:36:21 +00:00
Brian Carlstrom
a5c4f178ae Fix mma/mmma by making gettop canonicalize TOP when set
Bug: 17253957
Change-Id: Ifd6d5984f63981e1f99b6ae6f9459c2801588459
2014-09-12 00:33:25 -07:00
Dan Albert
b7af531ecc Remove the vbox target from the build system.
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)
2014-09-11 13:48:15 -07:00
Ying Wang
ed21d4c016 Allow to overrde command make in envsetup.sh.
To override define function get_make_command() in vendor's
vendor-envsetup.sh.

Change-Id: I553e60816eb789750ccd16110f2e82a5087587e8
2014-08-24 22:14:57 -07:00
Jeff Brown
e29069dc0e Merge "Tweak sgrep to add cc and aidl files." into lmp-dev 2014-08-14 16:46:52 +00:00
Duane Sand
3c4fcd8451 [MIPS] Unite mipsel and mips64el 4.9 gcc toolchains
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
2014-08-05 12:28:44 -07:00
Jeff Brown
46cbd20098 Tweak sgrep to add cc and aidl files.
Also add it to the help list since it was missing.

Change-Id: I11403e63bc421fd146ad88452eac05043eacabc3
2014-07-26 15:19:21 -07:00
Nick Kralevich
9948b1e9ed runhat: use /data/local/tmp
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
2014-07-18 15:45:38 -07:00
Ying Wang
703709dba4 am baad790d: am f27e3fb4: am c35cc93d: Merge "Allow symlinks to device or vendor tree in envsetup.sh."
* commit 'baad790de671f680d6584edc4712a9cde823f49c':
  Allow symlinks to device or vendor tree in envsetup.sh.
2014-07-10 00:42:52 +00:00
Ying Wang
baad790de6 am f27e3fb4: am c35cc93d: Merge "Allow symlinks to device or vendor tree in envsetup.sh."
* commit 'f27e3fb4cf1d51f3abd5261d5626997c71df22b7':
  Allow symlinks to device or vendor tree in envsetup.sh.
2014-07-10 00:16:48 +00:00
Ying Wang
506410a549 Allow symlinks to device or vendor tree in envsetup.sh.
Change-Id: I1190a0b1c84fa17b3692427eb6071ffbe84bc529
2014-07-09 15:37:34 -07:00
Ying Wang
dcc8b3729d Use "$@" to preserve argument word breaks
This fixes mmma broken due to quotes stripped in the argument passing.

Change-Id: I6095c7ccf0660ba7b17a659f5df29b05e50e6303
2014-07-01 10:58:10 -07:00
Ying Wang
3e164be71d am 556efe00: am 9e05c9e4: am dc58c2a6: Merge "Remove nonexistent from /buildbot/automergers/mirror-aosp-master-to-stage-aosp-master/.repo/repo:/buildbot/automergers/mirror-aosp-master-to-stage-aosp-master/.repo/repo:/buildbot/automergers/mirror-aosp-master-to-stage-a
* commit '556efe002f852dfa5ca5331e92b1d65a32339f26':
  Remove nonexistent $ANDROID_QTOOLS from $PATH.
2014-06-30 17:39:28 +00:00
Ying Wang
556efe002f am 9e05c9e4: am dc58c2a6: Merge "Remove nonexistent from /buildbot/automergers/mirror-aosp-master-to-stage-aosp-master/.repo/repo:/buildbot/automergers/mirror-aosp-master-to-stage-aosp-master/.repo/repo:/buildbot/automergers/mirror-aosp-master-to-stage-aosp-master/.r
* commit '9e05c9e4e642673dc6d9104c44d26810773c382d':
  Remove nonexistent $ANDROID_QTOOLS from $PATH.
2014-06-30 17:36:39 +00:00
Ying Wang
2a859d5a62 Remove nonexistent $ANDROID_QTOOLS from $PATH.
Bug: 15983070
Change-Id: Id3807a6dabd616ae06aafc2b894c1858e4400e26
2014-06-30 10:25:33 -07:00
Ed Heyl
c6d11f8c66 no color output, thanks Mac; better callback to real make
Change-Id: Iff2a15ed8aad28c264209b26a33d1206ec80b794
2014-06-27 14:19:51 -07:00
Colin Cross
a58f8e04c9 build: fix vendor symbols in gdb
Set TARGET_OUT_VENDOR_SHARED_LIBRARIES_UNSTRIPPED
Append '64' for 64-bit libraries

Change-Id: Ief289bb23950d4bed84cf616cff6038fbd8caf95
2014-06-27 10:48:22 -07:00
Michael Wright
49753f8fa1 am e75101af: am e49d461a: am b0c6ea9f: Merge "Invoke debuggerd64 when appropriate with stacks."
* commit 'e75101afdfc528aed486adbc0170964d1b32a91d':
  Invoke debuggerd64 when appropriate with stacks.
2014-06-25 01:42:54 +00:00
Michael Wright
e75101afdf am e49d461a: am b0c6ea9f: Merge "Invoke debuggerd64 when appropriate with stacks."
* commit 'e49d461a8f713e61ad39ba20b48d2b5fee7beafe':
  Invoke debuggerd64 when appropriate with stacks.
2014-06-25 01:36:16 +00:00
Michael Wright
b0c6ea9f29 Merge "Invoke debuggerd64 when appropriate with stacks." 2014-06-23 21:50:22 +00:00
Michael Wright
aeed721fcc Invoke debuggerd64 when appropriate with stacks.
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
2014-06-24 18:06:11 -07:00
Elliott Hughes
7df87a04f9 am dde1a37e: am fbc6f257: am c04b4455: Merge "Updated gdbclient path support."
* commit 'dde1a37eb61a807af666c2adcfcb7c197465da90':
  Updated gdbclient path support.
2014-06-23 19:54:11 +00:00
Elliott Hughes
dde1a37eb6 am fbc6f257: am c04b4455: Merge "Updated gdbclient path support."
* commit 'fbc6f25712362b1f9b7b8970a96833ed0be0f12c':
  Updated gdbclient path support.
2014-06-23 19:48:57 +00:00
Ying Wang
267a928deb am e9ef4005: am cd66e5ca: am 6a8b3b43: Merge " delete duplicate variable definition"
* commit 'e9ef4005ea41b757bf1381236acaae124110d9fb':
  delete duplicate variable definition
2014-06-23 17:01:38 +00:00
Ying Wang
e9ef4005ea am cd66e5ca: am 6a8b3b43: Merge " delete duplicate variable definition"
* commit 'cd66e5ca0a8ab3235b5a49c904a692ff9142999e':
  delete duplicate variable definition
2014-06-23 16:57:53 +00:00
Ed Heyl
cc6be0a369 wrap make and print success/failure message, more later
Change-Id: I48a4687d81bc4b950a1be42b34d2f0d76733574a
2014-06-23 15:10:49 +00:00
Elliott Hughes
c04b445568 Merge "Updated gdbclient path support." 2014-06-20 21:00:34 +00:00
Brigid Smith
7a569a6282 Updated gdbclient path support.
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
2014-06-20 14:12:42 -07:00
Ying Wang
6a8b3b43bb Merge " delete duplicate variable definition" 2014-06-20 21:00:34 +00:00
Elliott Hughes
1a03ddb805 am 09a4cac1: am 7cc3174d: Merge "Removed /system/bin prefix from gdbclient."
* commit '09a4cac12e3b040fb6d18490ff444b2fdd6cb451':
  Removed /system/bin prefix from gdbclient.
2014-06-18 00:55:33 +00:00
Elliott Hughes
9b0bae3b37 am 1a03ddb8: am 09a4cac1: am 7cc3174d: Merge "Removed /system/bin prefix from gdbclient."
* commit '1a03ddb805f2efc45345aa545d1d724e75972ae7':
  Removed /system/bin prefix from gdbclient.
2014-06-18 01:54:56 +00:00
Brigid Smith
0a2712d349 Removed /system/bin prefix from gdbclient.
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
2014-06-17 15:42:54 -07:00
Andrey Belous
a2b0f685bb delete duplicate variable definition
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>
2014-06-11 14:00:55 -04:00
Ying Wang
21e9474252 am b541ab6c: Support to build 64-bit unbundled binaries.
* commit 'b541ab6c51734530ed615e307f8912f32e616967':
  Support to build 64-bit unbundled binaries.
2014-05-30 01:02:44 +00:00
Ying Wang
b541ab6c51 Support to build 64-bit unbundled binaries.
Change-Id: I4656c983d60aaf535ce4d14528c28ae8cef98fd8
2014-05-29 17:57:40 -07:00
Ed Heyl
d9686fbb8c Revert, strange side affects to other (like lunch) commands.
This reverts commit 6acfdd62de.

Change-Id: Ic0a84700912570ddec70d152767a9d40f8fa71b0
2014-05-28 19:32:45 +00:00
Ed Heyl
6acfdd62de wrap make and print success/failure message, more later
Change-Id: I7debc62babcd855a2d6355dddd00f4531050151c
2014-05-28 11:14:35 -07:00
Colin Cross
949ed75bb9 am 423242b5: am 828b5183: am e45c8607: Merge changes Ibc943b75,Ib4ccf373,I30ff439b,I7bde0130
* 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
2014-05-22 19:40:46 +00:00
Colin Cross
423242b59e am 828b5183: am e45c8607: Merge changes Ibc943b75,Ib4ccf373,I30ff439b,I7bde0130
* 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
2014-05-22 19:36:15 +00:00
Colin Cross
3655a68565 add vendor directories to gdb shared library search path
Change-Id: Ib4ccf3739d6b2f14597605ce06f00e4776f67976
2014-05-22 12:01:06 -07:00
Colin Cross
6a5fa0684a add 2nd arch gcc to the path
Add the 2nd arch gcc to the path so users can manually run gdb,
addr2line, objdump, etc.

Change-Id: I30ff439bb6548b897d13bfa87151991d5f2948b3
2014-05-22 12:01:06 -07:00
Colin Cross
03b424a50b 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
2014-05-22 12:01:06 -07:00
Christopher Ferris
5b7030390f am bcbf9ae4: am 965f3919: am a2cd924b: Merge "Fix extra/missing : in path setup."
* commit 'bcbf9ae4de41b2cd98ef96f61066496030ef31a1':
  Fix extra/missing : in path setup.
2014-05-21 00:01:44 +00:00
Christopher Ferris
bcbf9ae4de am 965f3919: am a2cd924b: Merge "Fix extra/missing : in path setup."
* commit '965f39190cb50d97b98d47ba8ca205661cfa2c3d':
  Fix extra/missing : in path setup.
2014-05-20 23:40:00 +00:00
Christopher Ferris
7110f241ab Fix extra/missing : in path setup.
Change-Id: I4d95efc781c58af704012922d95841e009bf6286
2014-05-20 14:09:36 -07:00