Commit graph

249 commits

Author SHA1 Message Date
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
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
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
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
7110f241ab Fix extra/missing : in path setup.
Change-Id: I4d95efc781c58af704012922d95841e009bf6286
2014-05-20 14:09:36 -07:00
Ji-Hwan Lee
9f5d3dde17 Put prebuilt emulator path after host output
So that built emulator is used instead of prebuilt one when
BUILD_EMULATOR=true.

Change-Id: I67dfbfc2c3bf9bf051e56de425caa07b08d4b2e4
2014-05-15 22:03:08 +09:00
David 'Digit' Turner
94d16e5a0f envsetup.sh: Use prebuilt emulator binaries if available.
This patch changes the setpaths() function in envsetup.sh to probe
for prebuilts/android-emulator/<host>/, and prepend it to PATH if
it exists.

See https://android-review.googlesource.com/#/c/93399/
for a related patch that adds the binaries.

BUG=13747402

Change-Id: I30794ea52f6dfc58908e6271f2c0da8e2f0b68e8
2014-05-09 15:32:32 +02:00
Jason Parks
30cfbd756b Use java_home to determine jdk location.
Specifying the major version rather than hard coding
to a minor version.

(cherry-picked from commit 13b2e19ef2)

Change-Id: Ie2c08d35fcff2129b26c1dfa8a2e5cd7b19c4b49
2014-04-30 11:43:00 +01:00
Torne (Richard Coles)
f24c356a96 Fix PATH setup for arm64.
On architectures other than "arm", the combination of
ANDROID_KERNEL_TOOLCHAIN_PATH being empty, and CODE_REVIEWS being empty,
leads to adding a :: into the user's PATH, which is highly undesirable.

Neither CODE_REVIEWS nor the mips toolchaindir is ever used, so just
remove them, and make sure we only include the extra colon when setting
the kernel toolchain path to a non-empty value.

Change-Id: I2dfa7d3a322b56b6abbc47476082dc6ae4dd6a82
2014-04-28 15:25:21 +01:00
Colin Cross
84480ad0ee gdbclient: use 64-bit suffix for all library symbols
Correct the solib-search-path for 64-bit to look in /system/lib64
for all libraries including those in subdirectories.

Change-Id: I606a0eae1137a857564facc79306ad83097d9659
2014-04-10 12:51:39 -07:00
Narayan Kamath
c84889b80a Build with java7 by default.
All introduce a flag LEGACY_USE_JAVA6 to force java6 builds.
This is an unsupported configuration, and provided temporarily
to iron out regressions and compare build output (if required.).

- Increment the version check sequence number.
- Move a more specific check (OpenJDK vs non OpenJDK) after
  the more general version check.
- Update the link in the version check error message to the
  "initializing" page instead of the "download" page. The latter
  talks about repo, mainly.

bug: 8992787

Change-Id: I313e17b1911768d4f3bc318c4162c53dec6eaf0d

Conflicts:
	core/main.mk
2014-04-04 18:44:47 -07:00
Ben Cheng
d8ce7d8fd6 OProfile is no longer compiled now.
BUG: 13249790
Change-Id: I2d4fd8f888823687ea41ddbee1f7ce2a7ebc99f7
2014-03-05 16:59:41 -08:00
Andrew Hsieh
6808c2608f Merge "Use analyzer at new location: prebuilts/misc/{linux-x86,darwin-x86}/analyzer" 2014-03-04 01:06:04 +00:00
Primiano Tucci
368faf835b Merge "Add usage comment to explain how to limit modules in mmm." 2014-03-03 17:49:06 +00:00
Andrew Hsieh
c4f7fbae02 Use analyzer at new location: prebuilts/misc/{linux-x86,darwin-x86}/analyzer
Analyzer needed by WITH_STATIC_ANALYZER and WITH_SYNTAX_CHECK is
moved from prebuilts/clang/{linux-x86,darwin-x86}/host/3.3 to
prebuilts/misc/{linux-x86,darwin-x86}/analyzer

See https://android-review.googlesource.com/#/c/83852/

BUG=13243591

Usage:

"WITH_SYNTAX_CHECK=1 make ..." instructs build system to invoke "clang -fsyntax-only"
to utilize clang's better diagnostics before calling LOCAL_CC/LOCAL_CXX for code generation.
The compilation time is slightly longer, and the generated object file should be the same as
w/o WITH_SYNTAX_CHECK

"WITH_STATIC_ANALYZER=1 m/mm/mmm/mma/mmma ..." instructs build system to run static
analyzer via "clang --analyze" on a successful build.  If analyzer finds any issue, instruction
to open report is displayed. See http://clang-analyzer.llvm.org/scan-build.html for details.

WITH_STATIC_ANALYZER trumps WITH_SYNTAX_CHECK if both exist.  Project use lots of GCC extensions
(eg. nested function) not supported by clang may opt out by adding LOCAL_NO_STATIC_ANALYZER:=true

Change-Id: Ib3dda3ffb0fd3aaf2eadec867a966d1dd2868fb1
2014-03-03 18:47:02 +08:00
Ben Cheng
fba67bf896 Make gdbclient smarter for gdb[server] setup.
It can detect and support 3 different scenarios:

- 32-bit exe / 32-bit OS
- 64-bit exe / 64-bit OS
- 32-bit exe / 64-bit OS

Change-Id: I799a91277a5e2331aebf4b2f031e9a79f7ab5bb0
2014-02-28 10:37:47 -08:00
Primiano Tucci
6a8069d8d6 Add usage comment to explain how to limit modules in mmm.
68895a96 has introduced the possibility to limit the modules being
built by mmm. In many occasions this can save a lot of developement
time since it allows to build one target without processing all the
makefiles in the Android tree. Unfortunatelly this nice feature is
undocumented. This CL adds the one line documentation.

Change-Id: I6ded32c4774047599e9c44e5ea71c07e65731cda
2014-02-26 11:19:58 +00:00
Ying Wang
872d3c2c6a Merge "gettop: fix symlink detection" 2014-02-14 21:20:17 +00:00
Chris Dearman
1efd9e462a [MIPS64] Add mips64 target
Change-Id: Ice1621101c0d5a3314db288542ca8020e3f406bf
Signed-off-by: Duane Sand <duane.sand@imgtec.com>
2014-02-05 19:07:57 -08:00
Serban Constantinescu
9b68fb2837 Add 64-bit gdbclients.
This patch adds gdbclient combo for arm64, mips64, and x86_64.

Change-Id: I659b662276c93e5cce92aadc203a4bc111f5c2af
Signed-off-by: Serban Constantinescu <serban.constantinescu@arm.com>
2014-01-30 13:55:46 -08:00
Colin Cross
4f0eb7d50c build: rename aarch64 target to arm64
Rename aarch64 build targets to arm64.  The gcc toolchain is still
aarch64.

Change-Id: Ia92d8a50824e5329cf00fd6f4f92eae112b7f3a3
2014-01-23 22:39:38 -08:00
Ying Wang
dbc9eacb27 Merge "Make jgrep, cgrep, resgrep not recurse into 'out' directory." 2014-01-22 20:30:06 +00:00
Narayan Kamath
9260bba06f Make envsetup.sh set JAVA_HOME correctly for java7.
Note that despite the location of this change, this function
is run only during "lunch" and not during ". build/envsetup.sh"

Also, make it easier to switch back and forth between java6 and 7
on the same session.

bug: 8992787

Change-Id: I56ec0ba8552b46c04204a8b96b9abc0180f7605f
2014-01-22 10:41:08 +00:00
Ben Cheng
89ccc4895d Add aosp_aarch64-eng to the default lunch menu.
Change-Id: I55f6ab6ea90670def30796fdce76c27031ecef01
2014-01-14 15:55:03 -08:00
Andrew Boie
6905e2163f envsetup.sh: cd to toplevel in get_build_var
dumpvar doesn't work right if we're not called from the toplevel;
due to the way the build system works internally, -C does not
suffice. This was already done in get_abs_build_var.

Redundant -C calls removed since we're at the toplevel already.

Change-Id: Iaaa48982547d099186922cc3ddc417a82c85e9a5
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2013-12-19 14:34:23 -08:00
Ben Cheng
a698dab816 am 0b42554f: am 12eeb000: Merge "Add generic aarch64 board config and build rules."
* commit '0b42554fd8c7a43ca45504e4586f1eef578308de':
  Add generic aarch64 board config and build rules.
2013-10-07 14:42:10 -07:00
Ben Cheng
db4fc200c4 Add generic aarch64 board config and build rules.
Change-Id: I8b4a377596705dfa0a3bd234162d183ec2ae9530
2013-10-07 13:58:27 -07:00
Ying Wang
6a6db9432f am ab7b53b8: am 5d92a933: Merge "x86_64: Adding new target"
* commit 'ab7b53b8e09e3d346384a5257e8f7a440a53dfc0':
  x86_64: Adding new target
2013-10-02 15:06:02 -07:00
Pavel Chupin
fd82a49e04 x86_64: Adding new target
Add x86_64 Android builds. Compiler is expected to be able to understand
-m64 code generation option.

Change-Id: I99e7337c5a5766afc5e528a481bd21631ff44dd5
Signed-off-by: Pavel Chupin <pavel.v.chupin@intel.com>
2013-10-02 20:58:54 +04:00
Ying Wang
c5c32d8f4a am fad629f4: am 7f2ad751: Merge "Switch x86 default compiler to multilib version"
* commit 'fad629f4dd07720b427c6a219ad93886e23ca277':
  Switch x86 default compiler to multilib version
2013-09-14 13:49:15 -07:00
Ying Wang
7f2ad751ae Merge "Switch x86 default compiler to multilib version" 2013-09-14 20:45:00 +00:00
Andrew Hsieh
87ceb423a7 am 169395bf: am 0407e1a8: Merge "Rename bin/clang to bin/analyzer"
* commit '169395bf1a7378db1ffbb50f3c6461d9dab17596':
  Rename bin/clang to bin/analyzer
2013-09-13 10:37:00 -07:00
Andrew Hsieh
af738a4bdb Rename bin/clang to bin/analyzer
Change-Id: Ie77018e4943823f7d0f18e9249f973a98ee3652a
2013-09-13 15:49:39 +08:00
Andrew Hsieh
246daf755a resolved conflicts for merge of 2b5d2c55 to klp-dev-plus-aosp
Change-Id: Icd9d5eff3f9acba042c100f694309f902c9d56cf
2013-09-10 18:07:23 -07:00
Andrew Hsieh
906cb78168 Add "WITH_STATIC_ANALYZER=1 m/mm/mmm/mma/mmma ..."
The new option WITH_STATIC_ANALYZER=1 instructs build system to
run static analyzer via "clang --analyze" on a successful build.
If analyzer finds any issue, instruction to open report is displayed.
See http://clang-analyzer.llvm.org/scan-build.html for details.

WITH_STATIC_ANALYZER trumps WITH_SYNTAX_CHECK if both exist.

Project use lots of GCC extensions (eg. nested function) not supported
by clang may opt out by adding LOCAL_NO_STATIC_ANALYZER:=true

Change-Id: I9970560560bd52ce5f0fd7129c3488629627c735
2013-09-10 17:37:14 +08:00
Mathias Agopian
54a8173445 am 5a4cc0da: Merge "fix uses of grep in envsetup.h" into klp-dev
* commit '5a4cc0da02e2e2bfde7b07b612d57eecd8ade64e':
  fix uses of grep in envsetup.h
2013-08-27 15:11:10 -07:00
Mathias Agopian
4458327142 fix uses of grep in envsetup.h
make sure we don't use a grep alias if one exists.

Change-Id: Id8e394f5889d9a5f1d320ecb289c974da8f14207
2013-08-27 14:15:50 -07:00
Pavel Chupin
c1a5664ea3 Switch x86 default compiler to multilib version
Switch from gcc-4.7 32-bit only to gcc-4.7 multilib (32/x32/64) compiler.
Tested x86 image build on Linux and Darwin.

This bionic patch is required:
https://android-review.googlesource.com/#/c/64183

Change-Id: Ifc2c6c5d6a4a1b71a00a87af072bb7f67b1c284d
Signed-off-by: Pavel Chupin <pavel.v.chupin@intel.com>
2013-08-26 10:42:42 +04:00
Jeff Brown
e787eb6115 am 91efe6bb: Merge "Enhance \'stacks\' script to handle native processes." into klp-dev
* commit '91efe6bbb7bd05038b7ec4e713b70582b7dd53a2':
  Enhance 'stacks' script to handle native processes.
2013-08-20 17:32:45 -07:00
Jeff Brown
b12c2e531c Enhance 'stacks' script to handle native processes.
Automatically detects whether the process is native or managed
and dumps the stacks accordingly.

Change-Id: Ifba65279f1d1b9714b66aa6990bab05575871d28
2013-08-19 18:09:31 -07:00
Ying Wang
208c677263 am a7deb085: Add phony goal GET-INSTALL-PATH
* commit 'a7deb0857c4fc0799cd1ebb82ff79dcbe2745ec0':
  Add phony goal GET-INSTALL-PATH
2013-08-16 17:21:59 -07:00
Ying Wang
a7deb0857c Add phony goal GET-INSTALL-PATH
It can be used as a goal of mm/mmm.
It prints out modules' install paths, which can be used by the runtest
utility.

Change-Id: If113e4c990b672acbacf723104583c0157d43c3b
2013-08-16 13:24:47 -07:00
Ying Wang
6d98d3b942 am a4ad06ac: am 750e0c08: Merge "Prepare upcoming GCC 4.8 release."
* commit 'a4ad06ac1db1dfc041fe386b76b22233fdc54341':
  Prepare upcoming GCC 4.8 release.
2013-08-13 15:03:24 -07:00
Ben Cheng
aac3f81657 Prepare upcoming GCC 4.8 release.
o Add -Wno-unused-parameter -Wno-unused-but-set-parameter to suppress
  new warnings.
o Define GCC_COLORS to enable colorful diagnostic messages.

Change-Id: Icbd62300b0e6f39d4e514edec2431a06b4d72421
(cherry picked from internal commit ccd8e6082b)
2013-08-13 14:52:31 -07:00