summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2019-08-27[NDK] Remove old gdb build scriptndk-r21-rc1ndk-r21-beta2ndk-r21-beta1ndk-r21sparse-6113669-L69200000513850779Haibo Huang
Test: build Change-Id: If722b485870c9fce253237707e8f4d7a106dc215
2019-07-03Merge "Cherry-pick more 7.11 changes to 8.3"Treehugger Robot
2019-07-03Cherry-pick more 7.11 changes to 8.3Haibo Huang
Cherry-picked commits: b711aa8: Add Unix domain socket support to gdbserver 7.9.1. The upstream domain socket change actually get reverted. Original upstream change: f19c7ff839d7a32ebb48482ae7d318fb46ca823d Reverted in: 80e24d09860dbeba7d435b4a4f0990f85dbc084e Test: build Bug: 62547070 Change-Id: I574cc11792fac018453e05d82fd835c4d45de7c1
2019-07-03[NDK] fix gdb 8.3 build for windowsHaibo Huang
a) can not override operator new for libc++ for windows. b) libc++ needs libucrt but clang didn't add that automatically. Bug: 135839860 Bug: 62547070 Test: build Change-Id: I11b2fad66e2a66214c9a92b2b2cb32b9eba3de54
2019-07-02Cherry-pick 7.11 changes to 8.3Haibo Huang
Cherry-picked commits: c64829b: Fallback to open if multifs_open fails. 2177073: Fix gdbserver process interruption. 35ee683: Remove gdb hack. 78af0f6: Handle cross compile for locale configuration 5cbd102: Specify osabi in arm/aarch64 tdescs. dfc5ca4: Set the default gdb osabi to GNU/Linux. Bug: 62547070 Test: build Change-Id: I00a97aa866255ed853c13b8f11dc1a996ea810f2
2019-07-02Add gdb 8.3Haibo Huang
Bug: 62547070 Test: build Change-Id: I3cbf926ca52f3bd7cb151153e01357750acdb9d1
2019-03-22Adapt to ndk.hosts changes.Dan Albert
Test: ndk/checkbuild.py Bug: None Change-Id: I74e02a15a320a6f452c0d45d6ce7b8707e51a409
2019-02-05Make libthread-db.h file only be compiled with Cndk-r20bndk-r20-beta3ndk-r20-beta2ndk-r20-beta1ndk-r20ndk-release-r20Zhizhou Yang
GDB 8.2 will use C++ to compile in Android, and it will cause the problem that extern variables from libthread_db will be compiled into C++ symbols and cause a linker error. Fixed this by adding a macro to check whether we are using C++. Bug: 123031421 Test: GDB 8.2 linked correctly. Change-Id: I660147a4199e88f394ad0fbe365960f4691678d8
2019-02-05Cherry-pick 7.11 changes to 8.2Zhizhou Yang
Cherry-picked commits: c64829b: Fallback to open if multifs_open fails. 2177073: Fix gdbserver process interruption. b711aa8: Add Unix domain socket support to gdbserver 7.9.1. 35ee683: Remove gdb hack. 78af0f6: Handle cross compile for locale configuration a7e49fd: bfd: add experimental support for SHT_RELR sections. 689b53d: Fix debugging of stripped PIE executables with padded PT_TLS Fixed transport_is_reliable variable in b711aa8 so that it is consistent with 8.2 changes. Bug:62547070 Change-Id: I14a6b819cc0590dc11853dbce91111adfe2cb489
2018-12-12Add gdb-8.2.Elliott Hughes
Bug: http://b/62547070 Test: N/A Change-Id: I30b3c9fd63e15a31e7d2d7d2cb59e9eddc77addf
2018-08-20Fix debugging of stripped PIE executables with padded PT_TLSndk-r19cndk-r19bndk-r19-beta2ndk-r19-beta1ndk-r19ndk-release-r19Michael Spang
Certain PIE executables produced by gold cannot be debugged by gdb after being stripped. GDB requires program headers of PIE executables to match, and those checks may fail due to adjustments made during stripping. One case of this occurs because strip recomputes the memsz of PT_TLS and does not add alignment, while gold does. This is another variant of PR 11786, so apply the same fix of relaxing the program header matching. gdb/ChangeLog: PR gdb/11786 * solib-svr4.c (svr4_exec_displacement): Ignore memsz fields for PT_TLS segments. gdb/testsuite/ChangeLog: PR gdb/11786 * gdb.base/gcore-tls-pie.c: New file. * gdb.base/gcore-tls-pie.exp: New file. (cherry picked from commit be2d111a878e1422c921226bc7714131a5c470fa) Change-Id: I33ea8f871d74f8822f5c836c1edcafb53cfc7beb
2018-05-01bfd: add experimental support for SHT_RELR sections.ndk-r18bndk-r18-beta2ndk-r18-beta1ndk-release-r18Rahul Chaudhry
This change adds experimental support for SHT_RELR sections, proposed here: https://groups.google.com/forum/#!topic/generic-abi/bX460iggiKg This is a subset of the change that was merged into the aosp/binutils repo (https://android-review.googlesource.com/572669). It contains the definitions for the new section type / dynamic tags, and support in bfd for recognizing the new section type. Gdb uses bfd to read the program binary, and without this support, it fails to detect some architecture related settings. Bug: https://bugs.chromium.org/p/chromium/issues/detail?id=836845 Test: Built gdb inside a Chrome OS chroot. Verified that architecture auto-detection works for an x86_64 binary containing a '.relr.dyn' section. The message "don't know how to handle section `.relr.dyn'" is no longer printed. Change-Id: Id199a7201d4750d2c6cb41a0c1a811777c322621
2017-10-24Merge "Fix dwarf2_string_attr for -gsplit-dwarf"ndk-r17bndk-r17-beta2ndk-r17-beta1ndk-r17ndk-release-r17Treehugger Robot
2017-10-24Fix dwarf2_string_attr for -gsplit-dwarfYunlian Jiang
This cherrypicks the upstream commit: commit 16eb6b2db49e6cf2fdca56efd37689fcc170cd37 Author: Leszek Swirski <leszeks@google.com> Date: Mon Aug 7 16:40:38 2017 +0200 Fix dwarf2_string_attr for -gsplit-dwarf The dwarf2_string_attr did not allow DW_FORM_GNU_str_index as a form for string types. This manifested as null strings in the namespace_name lookup (replaced with "(anonymous namespace)") when debugging Fission-compiled code. Change-Id: I81ead0d0cad0dce5d40b6d4efa08af60606ef560
2017-10-18Fix a segmenation fault when python evironment changes.Yunlian Jiang
This is a follow up CL for commit: e24220e: disable python when python is not available. BUG: None TEST: Build gdb inside ChromeOS chroot and run gdb outside it. There is no crash. Change-Id: I922c5dbac51b1e2808775f7b24edca63fc19d013
2017-10-16cherrypick a patch from 7.11Yunlian Jiang
This cherrypicks the commit: 78af0f6: Handle cross compile for locale configuration BUG=None TEST=./checkbuild.py on linux x86 Change-Id: I55ab0c97771b5efc3c317c20e7704bd94cb21a25
2017-10-13gdb: cherry-pick osabi patches from 7.11 to 8.0.1Yunlian Jiang
Cherry-picked commits: dfc5ca4 Set the default gdb osabi to GNU/Linux. 5cbd102 Specify osabi in arm/aarch64 tdescs. Change-Id: I787f5cafd4bb216934c3cf71aba6f77492c436bc
2017-10-12Cherry-pick 7.10 changes to 8.0.1.Yunlian Jiang
Cherry-picked commits: e24220e gdb: disable python when python is not available. d73c546 use snprintf instead of strlcpy for portablitly c64829b Fallback to open if multifs_open fails. 2177073 Fix gdbserver process interruption. b711aa8 Add Unix domain socket support to gdbserver 7.9.1 Test: build.py passes with gdb 8.0.1.
2017-10-11gdb: pull upstream gdb-8.0.1Yunlian Jiang
This pulls upstream gdb-8.0.1 to our repository. It does not affect current gdb builds. BUG=None TEST=gdb still builds gdb 7.11
2017-09-14Fix more TMPDIR issues in build-gdb.sh.Dan Albert
Test: TMPDIR=foo ndk/checkbuild.py --module host-tools Bug: None Change-Id: I214561f6fec21cfb8d6d8522421e1d8deae00a00
2017-09-14Don't use TMPDIR when building GDB.Dan Albert
Test: TMPDIR=foo ndk/checkbuild.py --module host-tools Bug: None Change-Id: Ia37d62443f59015be4d9aa00d535dfe750caa76d
2017-05-03Merge "gdb: backport an upstream patch to support fission with split debug."ndk-r16-beta2ndk-r16-beta1ndk-r16ndk-release-r16ndk-r16-releaseTreehugger Robot
2016-10-27Handle cross compile for locale configurationndk-r15-beta2ndk-r15-beta1ndk-r14-beta2ndk-r14-beta1ndk-r14ndk-r15-releasendk-r14-releaseMike Stroyan
Make gdb-7.11/gdb/gnulib/configure always check cross_compiling. Four locale checks were running executables to discover that. Running android executables on linux can hang a build. Test: ./checkbuild.py on linux x86 Bug: http://b/31347799 Change-Id: I3ca8977eb4b226c74c9d822033c733314cd7ed59
2016-09-16Prevent segfault in GDB when searching for architecture matchesBhushan Attarde
Cherry-picked from upstream: https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;a=commit;h=5d9bbb73c1df68741048c3d0f837b50c289ea608 This fixes gdb host crash when trying to read symbols from target. While patch is arch-neutral, we could only reproduce the issue for mips. * format.c (struct bfd_preserve): New "build_id" field. (bfd_preserve_save): Save "build_id". (bfd_preserve_restore): Restore "build_id". From https://sourceware.org/ml/gdb-patches/2016-09/msg00070.html : Currently the "build_id" field of "struct bfd" is not preserved by "struct bfd_preserve" when "bfd_check_format_matches" is going through all target vectors trying to find a compatible target vector. This leads to a segmentation fault in GDB. Consider a case where one compatible target vector has already been found (so the subset of bfd state is saved in struct bfd_preserve) and then an attempt to find a better match fails after it has modified bfd's build_id pointer. Since this attempt is failed, all its side effects will be undone and all memory allocations done by this vector will be free'd. This will eventually free the memory block that build_id pointer is pointing to. This free'd block then gets reallocated and used for storing something else -- leaving build_id pointing to incorrect contents. This patch adds "build_id" pointer to "struct bfd_preserve" so that it will be preserved on success which can then be recoverable on failure. Change-Id: I3e81c3a8a1d25869659bbf99bebe8b00062cea72
2016-07-01[mips] Add support for mips r6, microMIPS r6 and MSAndk-r13-beta2ndk-r13ndk-r13-releaseJaydeep Patil
Verified for all mips archs (mips32, mips32r6. mips64r6). Patch is a rebased version of: https://android-review.googlesource.com/153821 Change-Id: I60f576cc44571afd0000ddec4716e1fb0d02d660
2016-06-24Define DT_MIPS_RLD_MAP_REL in code, until renamed in sysrootndk-r13-beta1Nikola Veljkovic
Gdbserver is using prebuilts/ndk sysroot, where we haven't updated the tag. There we have old DT_MIPS_RLD_MAP2 tag defined (just a different name, same value). Until sysroot used to build gdbserver is fixed, we need to define the tag directly in the source code. Updating the tag is the job of: https://android-review.googlesource.com/233345. Workaround is based on change: I4dd0969c1a6f847fd5b11b1206c7bd6ef1f30137 Verified on: mips, mips64, arm, arm64 emulators. Change-Id: I552654458d506e219d19c7345d127c6bb2337997
2016-05-11gdb: fix "optimized out" error with debug fission.Yunlian Jiang
This patch comes from https://sourceware.org/ml/gdb-patches/2016-04/msg00658.html The bug entry is https://sourceware.org/bugzilla/show_bug.cgi?id=19999 This patch fixes symtab/19999. The problem here is that while we don't want to add the DWARF "base address" for DWO files (where addresses come from .debug_addr where the base address has already been added), we still need to add base_offset for PIE. Regression tested on amd64-linux. 2016-04-29 Doug Evans <dje@google.com> PR symtab/19999 * dwarf2loc.c (dwarf2_find_location_expression): For DWO files still add base_offset. testsuite/ * lib/dwarf.exp (build_executable_from_fission_assembler): Pass $options when building executable. * gdb.dwarf2/fission-loclists-pie.S: New file. * gdb.dwarf2/fission-loclists-pie.exp: New file. BUG=chromium:439320 TEST=the unittest in the patch passe
2016-05-05gdb: backport an upstream patch to support fission with split debug.Yunlian Jiang
The upstream patch was commit 6c4474237ab3356b100ebbdd6ff1a8839745023d Author: Doug Evans <dje@google.com> Date: Tue May 3 16:30:58 2016 -0700 PR symtab/19914 fix handling of dwp + split debug PR symtab/19914 * dwarf2read.c (open_and_init_dwp_file): Look at backlink if objfile is separate debug file. testsuite/ * gdb.dwarf2/dwp-sepdebug.c: New file. * gdb.dwarf2/dwp-sepdebug.exp: New file. TEST=build chrome with debug fission and put the .dwp file in the debug dir. gdb can read debug information from there.
2016-05-02Actually don't build lzma on windows.ndk-r12bndk-r12-beta2ndk-r12-releaseJosh Gao
Change-Id: I539f78c2d8d32ab7561b6f8eab8ff56d7000fb47
2016-04-29Don't build lzma on Windows.Josh Gao
Change-Id: I4a1a3dbba6ea09e97d65c4468033153eac3c86e7
2016-04-29Handle darwin's crappy touch(1).Josh Gao
Change-Id: I35549f7dc21399d6a7be786ef087557dc2990f8e
2016-04-28Make sure autoconf doesn't try to regenerate.Josh Gao
Bug: http://b/27926543 Change-Id: Ib6f0cb7bc08b4979ca7bcc1677e6c7c67f583601
2016-04-28Build and use liblzma in gdb.Josh Gao
Bug: http://b/27926543 Change-Id: If8d689b68c0a274d3cf6011be3a56a4bbfe70603
2016-03-31Set the default gdb osabi to GNU/Linux.ndk-r12-beta1Josh Gao
Bug: http://b/27926981 Change-Id: I9d8da00f74272e4cdcb9bb55d4b0c87411c87d02
2016-03-31Specify osabi in arm/aarch64 tdescs.Josh Gao
Upstream probably won't like this. Presumably, the correct fix is to add a new -linux version of each of these. Bug: http://b/27926981 Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=19895 Change-Id: I1eb1d821b027e18c152f025768e2c4d24f3d2729
2016-03-31Remove gdb hack.Josh Gao
Change-Id: I4b5ba65af700126048ef0dfa802c08db4ef66031
2016-03-31Cherry-pick 7.10 changes to 7.11.Josh Gao
Cherry-picked commits: e24220e gdb: disable python when python is not available. d73c546 use snprintf instead of strlcpy for portablitly c64829b Fallback to open if multifs_open fails. 2177073 Fix gdbserver process interruption. b711aa8 Add Unix domain socket support to gdbserver 7.9.1 Change-Id: I2cba7ae5c05503afb81f732cbd78440ebd2c45e8
2016-03-31Import gdb-7.11.Josh Gao
Change-Id: Id0a4b1d9275bb8988c45ef5b39ceef43ddc069ac
2016-03-01Merge "gdb: disable python when python is not available."Yunlian Jiang
2016-02-26gdb: disable python when python is not available.Yunlian Jiang
The patch checkes whether the python executable is available at runtime. If it is not available, it disables python at run_time. This backports a local patch from ChromeOS. The bug entry for the ChromeOS is at crbug.com/248605 This CL also check some pre defines to include unistd.h and call the function fork(). BUG: crbug.com/248605
2016-02-25use snprintf instead of strlcpy for portablitlyYunlian Jiang
This uses snprintf instead of strlcpy to make it build on ChromeOS.
2016-02-16Merge "Revert "gdb: disable python when python is not available.""Dan Albert
2016-02-16Revert "gdb: disable python when python is not available."Dan Albert
This has left the build broken since it was submitted. This reverts commit 31fd543e7333d4a2589e4f57be22f021159130f1. Change-Id: I220db7ba8418d7063b958f84a34e2accd0e3e278
2016-02-11Merge "gdb: disable python when python is not available."Yunlian Jiang
2016-02-03gdb: disable python when python is not available.Yunlian Jiang
The patch checkes whether the python executable is available at runtime. If it is not available, it disables python at run_time. This backports a local patch from ChromeOS. The bug entry for the ChromeOS is at crbug.com/248605 BUG: crbug.com/248605
2016-02-01Add host tag to Python install path.Josh Gao
Bug: http://b/26875911 Change-Id: I8962c551c90b101460fc217ccb5dbfed78c7ceb2
2016-01-12Install GDB to OUT_DIR, not DIST_DIR.Dan Albert
This is repackaged as host-tools for the released module. Change-Id: I4d28d7063085fbd01de1903c06555bb7b437e2b4
2015-11-17Fix GDB host tools install location.Dan Albert
Forgot to submit this with the ndk/ half of the patch :( Bug: Bug: http://b/25454836 Change-Id: I3329ee82e83864a3151f9a3387ec75979735757c
2015-10-13Don't use readlink to find gdb's location.Josh Gao
readlink isn't in POSIX, and the one available in on OS X does not support the -f option. Use $(cd $(dirname $0) && pwd) instead. Bug: http://b/24776250 Change-Id: Ia3b42b4cecd0b39d4dd5af15b2afe9bb1da6893a
2015-09-18Assume that Python is in the same dir as gdb.Josh Gao
Needed to share gdb with platform, since gdb will be in prebuilts/gdb/linux-x86, not prebuilts/linux-x86. Bug: http://b/21920612 Change-Id: I94577cc4895f27316a0a26cb8e47d30a7c7c7b4b