aboutsummaryrefslogtreecommitdiff
path: root/devel/gdb/Makefile
Commit message (Collapse)AuthorAgeFilesLines
* Upgrade to 8.2.John Baldwin2018-09-241-12/+3
| | | | | | | | | | | | | | - Remove patches for upstream commits in 8.2. - Add an upstream patch to include NT_PROCSTAT_AUXV, NT_PROCSTAT_PS_STRINGS, and NT_PROCSTAT_VMMAP notes in core dumps generated by 'gcore'. - Update kgdb for changes in 8.2. - Add 'USES=gettext-runtime' Reviewed by: pizzamig (maintainer) Differential Revision: https://reviews.freebsd.org/D17085 Notes: svn path=/head/; revision=480613
* devel/gdb: Update to 8.1.1Luca Pizzamiglio2018-08-111-6/+13
| | | | | | | | | | | A bunch of bug fixes and support to Pythong 3.7 fixed PR: 230494 Reported by: Yasuhiro KIMURA <yasu@utahime.org> Sponsored by: Essen Hackathon Notes: svn path=/head/; revision=476883
* devel/gdb: Fix iconv supportLuca Pizzamiglio2018-07-281-2/+2
| | | | | | | | | | | Fix iconv support. Bump portrevision. PR: 230036 Reported by: Gleb Popov <arrowd@FreeBSD.org> Notes: svn path=/head/; revision=475518
* devel/gdb: add support to UTF-8 charsetLuca Pizzamiglio2018-07-271-3/+8
| | | | | | | | | | | Introduced a new option, enabled on default, to use libiconv, that provide wchar_t support and allow to use UTF-8 charset in gdb PR: 230036 Reported by: Gleb Popov <arrowd@FreeBSD.org> Notes: svn path=/head/; revision=475441
* Fixes for kgdb including initial FreeBSD/arm support.John Baldwin2018-07-251-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Improve fallback handling for the read of pcb_size. If for some reason kgdb has only the kernel's debug info, a read of pcb_size will simply return 0, resulting in an exception when unwinding the stack of a thread that was on a CPU at the time the dump was created. In this case, fall back to using sizeof(struct pcb). - Always supply a value for the PC register on x86. A thread's PCB may have been swapped out, and a dummy value ensures that we don't get an exception while enumerating threads in a dump. - Mark all 64-bit address bits as valid for aarch64 kernels. ARMv8 supports pointer tagging in which case the upper 8 bits of VAs are ignored, but FreeBSD kernels are linked such that they depend on those upper 8 bits being set to 1. GDB was stripping those bits by default causing KVAs to be mapped to invalid addresses. - Rework kgdb -w support to only open /dev/mem writable. Don't depend on the gdb global 'write_files' option which tries to rewrite the kernel binary on close which can crash. Instead, add an optional '-w' flag to 'target vmcore' which opens the vmcore with O_RDWR instead of O_RDONLY. Change the kgdb '-w' option to set this flag in the nested 'target vmcore' command rather than passing the global '-w' option to gdb. - Garbage collect old code for reading dumptid. - First cut at FreeBSD/arm kernel support. Tested on live kernel on my RPi, but not against a crashdump, and only trapframes from userland, not a nested trap. Submitted by: markj (1, 2) Approved by: kan Differential Revision: https://reviews.freebsd.org/D16013 Notes: svn path=/head/; revision=475318
* devel/gdb: Add mpfr as dependencyLuca Pizzamiglio2018-05-021-1/+2
| | | | | | | | | | | | Add mpfr as dependency to emulate target floating-point arithmetic during expression evaluation when the target uses different floating-point formats than the host PR: 227798 Reported by: philippe.michel7@sfr.fr Notes: svn path=/head/; revision=468827
* devel/gdb: fix a typo in the MakefileLuca Pizzamiglio2018-03-171-1/+1
| | | | Notes: svn path=/head/; revision=464813
* devel/gdb: fix build on currentLuca Pizzamiglio2018-03-161-1/+3
| | | | | | | | | | | | | Clang 6 doesn't allow negative numbers to be implicitely converted to unsigned types. This patch explicits all casts. While I'm here, add an option to silent tons of warning messages PR: 226644 Reported by: rakuco@ Notes: svn path=/head/; revision=464688
* devel/gdb: Update to version 8.1Luca Pizzamiglio2018-03-141-22/+11
| | | | | | | | | | | | | | | The official annoucement is available here: https://www.gnu.org/software/gdb/download/ANNOUNCEMENT Moreover: * support for 'info proc' is added (jhb@) * update kgdb to use gdb 8.1 Reviewed by: jhb@ Differential Revision: https://reviews.freebsd.org/D14148 Notes: svn path=/head/; revision=464493
* KGDB fixes for amd64 and aarch64.John Baldwin2018-01-261-1/+1
| | | | | | | | | | | | | | | | | | | | | - Update the amd64 kernel support to recognize mchk_calltrap as a trapframe generator. - Remove some unneeded headers from fbsd-kld.c. - Various fixes to get stack traces working for aarch64 kernels: - Map the LR register from the PCB to PC instead of LR. - Skip the PC register from the PCB as it isn't initialized to anything. - Correct the register cache map for the PCB. The old one had the offsets of pcb_sp and pcb_pc reversed. - Don't map all of the saved general purpose registers in a trapframe to X1 rather than X0 .. X29. - Use correct name for el0 trapframe entry points. Reviewed by: pizzamig (maintainer) MFH: 2018Q1 Differential Revision: https://reviews.freebsd.org/D13977 Notes: svn path=/head/; revision=460050
* Merge in updates for mipsn32 and 32-bit arm.John Baldwin2017-10-131-1/+7
| | | | | | | | | | | | | | | | | - Brings in upstream commits to fix debugging on mipsn32 (properly parsing registers and signal information in core dumps as well as unwinding across signal frames) - Brings in upstream commits for reworked ARM support. Compared to the existing patch-armfbsd, this version includes generic FreeBSD target support (auxv, thread names from cores, $_siginfo, syscall names, etc.) as well as VFP support and an unwinder for signal frames. Reviewed by: pizzamig (maintainer) MFH: 2017Q4 Differential Revision: https://reviews.freebsd.org/D12630 Notes: svn path=/head/; revision=452019
* For ports that are explicitly enabled on armv6, also enable themMark Linimon2017-10-101-1/+1
| | | | | | | | | | on armv7. This has not been tested with an -exp run but should "do no harm". PR: 221894 (partial) Notes: svn path=/head/; revision=451721
* devel/gdb: Update to gdb 8.0.1Luca Pizzamiglio2017-09-291-5/+5
| | | | | | | | | | | | | | Resolve tons of warnings. Fix the type of literal string as char const * Fix Makefile's variables order and adding the license file Rework patches to make portlint happy Reviewed by: jhb Approved by: lme (mentor) Differential Revision: https://reviews.freebsd.org/D12525 Notes: svn path=/head/; revision=450895
* devel/gdb: Fix build on MIPS and powerpcLuca Pizzamiglio2017-09-131-1/+2
| | | | | | | | | | | | Fixing build on big-endian 64bit platforms, like MIPS and powerpc Submitted by: jhb Reviewed by: andreast Approved by: olivier (mentor) Differential Revision: https://reviews.freebsd.org/D12182 Notes: svn path=/head/; revision=449795
* Bump PORTREVISION for ports depending on the canonical version of GCCGerald Pfeifer2017-09-101-1/+1
| | | | | | | | | | | | | | | | | (via Mk/bsd.default-versions.mk and lang/gcc) which has moved from GCC 5.4 to GCC 6.4 under most circumstances. This includes ports - with USE_GCC=yes or USE_GCC=any, - with USES=fortran, - using Mk/bsd.octave.mk which in turn features USES=fortran, and - with USES=compiler specifying openmp, nestedfct, c++11-lib, c++11-lang, c++14-lang, c++0x, c11, or gcc-c++11-lib. PR: 219275 Notes: svn path=/head/; revision=449591
* Change MAINTAINER email to my new FreeBSD emailLuca Pizzamiglio2017-08-291-1/+1
| | | | | | | | | Approved by: lme (mentor) Approved by: olivier (mentor) Differential Revision: https://reviews.freebsd.org/D12150 Notes: svn path=/head/; revision=448911
* Add aarch64 support to GDB.John Baldwin2017-08-231-2/+2
| | | | | | | | | | | | | | This includes support for cross-debugging aarch64 process cores and kernels as well as native support for aarch64 processes. Hardware single stepping is supported, but hardware watchpoints are not yet supported. Reviewed by: luca.pizzamiglio@gmail.com (maintainer) Approved by: az (implicit) Differential Revision: https://reviews.freebsd.org/D12074 Notes: svn path=/head/; revision=448627
* Backport support for fs_base/gs_base and $_siginfo from GDB master.John Baldwin2017-08-041-1/+15
| | | | | | | | | | | | | | | | | | | | | Bring in two patchsets committed to GDB master along with a few other commits those patchsets depend on. - Add support for examining $_siginfo. When a thread has valid signal information, report the current information in a $_siginfo variable. For live processes the values are extracted via the PT_LWPINFO ptrace request. The values are also extracted from process core dumps that include NT_LWPINFO notes (currently only present in FreeBSD 12-current). - Add support for the $fs_base and $gs_base registers on amd64. This only works for live processes via the PT_{GET,SET}{FS,GS}BASE ptrace requests. FreeBSD currently does not store these values in core dumps, so they are not available from core dumps. Reviewed by: luca.pizzamiglio@gmail.com (maintainer) Approved by: az, imp Differential Revision: https://reviews.freebsd.org/D11813 Notes: svn path=/head/; revision=447377
* Upgrade to GDB 8.0.John Baldwin2017-07-281-5/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Commit b5430a3ced fixes parsing of 32-bit MIPS process cores. - kgdb has been ported to 8.0 including renaming the new OSABI constant, using gdb_bfd_openr, new return type of ldirname, and solib_add changed. - GDB 8.0 requires C++11, however the port is marked as requiring C++14 as a workaround for bugs in clang 10.3. - patch-armfbsd is updated for the new OSABI constant names (a.out was removed in 8.0) and new filename convention (arm-fbsd-*) - patch-gdb-amd64-bsd-nat.c (renamed from patch-gdbamd64-bsd-nat.c) is simplified to just store the r_flags value before collecting registers from the register cache rather than a full copy of the entire register set. - patch-gdb-corelow.c has been removed. It isn't really correct and if arm cores still cause core dumps the error is in arm-fbsd-tdep.c. - patch-gdb-i386-fbsd-nat.c renamed to account for rename of patched file. - patch-gdb-x86bsd-nat.c has been removed. The file was renamed, but the stock file also compiled fine for me on i386. PR: 221025 (exp-run for 10.3) Submitted by: luca.pizzamiglio@gmail.com (original version) Reviewed by: luca.pizzamiglio@gmail.com (maintainer) Approved by: brooks Differential Revision: https://reviews.freebsd.org/D11465 Notes: svn path=/head/; revision=446852
* Permit building GDB with python 3.John Baldwin2017-07-101-1/+1
| | | | | | | | | | | | | The python support in GDB works with either python 2 or python 3. There is no reason to restrict it to python 2 only. PR: 219844 Submitted by: mi Approved by: luca.pizzamiglio@gmail.com (maintainer) MFH: 2017Q3 Notes: svn path=/head/; revision=445441
* Update devel/readline to 7.0 patch 3Sunpoet Po-Chuan Hsieh2017-06-271-1/+1
| | | | | | | | | | | | | | - Bump PORTREVISION for shlib change Changes: https://cnswww.cns.cwru.edu/php/chet/readline/CHANGES https://lists.gnu.org/archive/html/bug-bash/2016-09/msg00107.html https://lists.gnu.org/archive/html/bug-readline/2017-01/msg00002.html Differential Revision: https://reviews.freebsd.org/D11172 PR: 219947 Exp-run by: antoine Notes: svn path=/head/; revision=444463
* Sort ARCHS. Pet portlint.Mark Linimon2017-06-261-1/+2
| | | | | | | Approved by: portmgr (tier-2 blanket) Notes: svn path=/head/; revision=444433
* Begin deorbit burn of ia64. We have not attempted to build packages forMark Linimon2017-06-251-1/+1
| | | | | | | | | | | it for many years. While here, alphabetize ARCHs, pet portlint, and modernize usages. Approved by: portmgr (tier-2 blanket) Notes: svn path=/head/; revision=444251
* Fix several issues with kgdb:John Baldwin2017-05-081-0/+3
| | | | | | | | | | | | | | | | | | - The kld parsing code in kgdb was using basename() and dirname() which ended up being broken by the recent changes to make dirname() modify its input buffer. Modify fbsd-kld.c to use the lbasename() and ldirname() wrappers in gdb. - Add the kgdb.1 manpage from base and install it as 'kgdbNNN.1' which is helpful since stock HEAD no longer ships a kgdb manpage. - Link libkvm into mips binaries so that the vmcore target links. - Bump PORTREVISION. PR: 219028 Reviewed by: luca.pizzamiglio@gmail.com (maintainer) Approved by: rene Notes: svn path=/head/; revision=440447
* Update to 7.12.1Olivier Cochard2017-02-141-6/+5
| | | | | | | | | | | | | | | | | | Updating gdb to the last stable version and cleaning it up. PR: 217090 Submitted by: luca.pizzamiglio@gmail.com (maintainer) PR: 216027 - Recognizing the compiler to adopt options properly Reported by: julian@FreeBSD.org PR: 216132 - Fixing the segmentation fault, but arm core dump not yet usable Reported by: Mark Millard Notes: svn path=/head/; revision=434072
* Extract do-patch into a separate script.Mathieu Arnold2017-01-161-1/+1
| | | | | | | | | | | PR: 215761 Submitted by: mat Exp-run by: antoine Sponsored by: Absolight Differential Revision: https://reviews.freebsd.org/D9029 Notes: svn path=/head/; revision=431680
* Add MIPS support and other fixesOlivier Cochard2017-01-121-9/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | PR: 215938 - Main PR that merge all Submitted by: luca.pizzamiglio@gmail.com (maintainer) PR: 215783 - Add MIPS support Submitted by: jhb Sponsored by: DARPA / AFRL PR: 215868 - Fix build on powerpc architecture Reported by: Mark Millard PR: 212607 - Add a workaround to mitigate gdb hangs under some circumstances with multi-threaded applications (thanks to misc-freebsd-bugzilla@talk2dom.com) Reported by: tijl PR: 215578 - Fix build by removing option to use system readline Reported by: rozhuk.im@gmail.com Notes: svn path=/head/; revision=431323
* - Remove always-true/false conditions after FreeBSD 9, 10.1, 10.2 EOLDmitry Marakasov2017-01-091-7/+0
| | | | | | | Approved by: portmgr blanket Notes: svn path=/head/; revision=430947
* Fix build with BUNDLED_READLINE option.Tijl Coosemans2016-12-191-1/+1
| | | | | | | Reported by: gahr Notes: svn path=/head/; revision=428922
* Update to 7.12.Tijl Coosemans2016-12-181-29/+12
| | | | | | | | PR: 214927 Submitted by: luca.pizzamiglio@gmail.com (maintainer) Notes: svn path=/head/; revision=428876
* A few more recent patches that were merged to upstream GDB:John Baldwin2016-07-231-2/+12
| | | | | | | | | | | | | | | | | - Handle version 1a of NT_PRPSINFO notes which include the pr_pid field. - Replace patch-sigev with upstream version. Note that upstream GDB doesn't define SIGLIBRT on older OS versions, so do that in the port Makefile instead. - Use PT_GET_EVENT_MASK/PT_SET_EVENT_MASK (new in 12). - Fix a bug where fork and LWP events weren't enabled in new child processes when following child processes after a fork. - Handle "real" vfork done events via PTRACE_VFORK (new in 12). PR: 211254 Approved by: luca.pizzamiglio@gmail.com (maintainer) Notes: svn path=/head/; revision=418964
* Import several patches recently merged upstream.John Baldwin2016-07-151-2/+20
| | | | | | | | | | | | | | | | | | | | | - Fix fork following to honor 'detach-on-fork' - Fix vfork following to post a fake vfork_done event to fix breakpoints in vfork parents (a real vfork_done event is pending but requires kernel changes currently in review). - Fix x86 debug registers to work with multiple threads (PR 157755) - Add support for 'info auxv' on both live processes and cores. - Add support for 'catch syscall'. Note that catching system calls by names requires parsing an XML file mapping system call names to numbers. The port now installs the XML syscall files to the data directory. In addition, the EXPAT option is now enabled by default as expat is used to parse the XML files. - Bump PORTREVISION. PR: 157755, 210874 Approved by: luca.pizzamiglio@gmail.com (maintainer), bdrewery Notes: svn path=/head/; revision=418566
* Enable PYTHON option by defaultPawel Pekala2016-06-241-2/+2
| | | | | | | | PR: 210497 Submitted by: maintainer Notes: svn path=/head/; revision=417443
* Update to upstream release 7.11.1Thomas Zander2016-06-051-2/+2
| | | | | | | | | | | | Includes several runtime fixes, e.g. crashes on reverse-stepi and use-after-free errors, see https://www.gnu.org/software/gdb/news/ PR: 209935 Submitted by: luca.pizzamiglio@gmail.com (maintainer) MFH: 2016Q2 Notes: svn path=/head/; revision=416392
* Fix build with libreadline from base system (via BASE_READLINE OPTION)Thomas Zander2016-05-141-2/+3
| | | | | | | | | PR: 209431 Submitted by: luca.pizzamiglio@gmail.com (maintainer) MFH: 2016Q2 (ports secteam build fix blanket) Notes: svn path=/head/; revision=415176
* Fix an issue with gdb triggering assertions in kgdb on i386.John Baldwin2016-04-271-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | The kgdb targets use runtime assertions on native targets to verify that the helper arrays documenting the layout of things like the PCB and trapframe structures match. Ideally these asserts would be compile time assertions, but they cannot be checked at compile time. Instead, they are checked at runtime during gdb startup. However, the layout of the i386 PCB changed when the AVX changes were merged to i386. The constants in the i386 target assume the post-AVX layout, but gdb packages on stable branches might be built against pre-AVX worlds. In that case, those gdb binaries will trigger these assertions on every invocation. As a workaround, disable the PCB-related assertions on pre-AVX worlds. If kgdb is run against a pre-AVX kernel it will not be able to parse the PCB correctly, but userland debugging should work fine. kgdb built against a pre-AVX world but run against an AVX kernel should work fine. PR: 209061 Reported by: trasz Approved by: luca.pizzamiglio@gmail.com (maintainer), swills Notes: svn path=/head/; revision=414115
* Remove ${PORTSDIR}/ from dependencies, categories d, e, f, and g.Mathieu Arnold2016-04-011-3/+3
| | | | | | | | With hat: portmgr Sponsored by: Absolight Notes: svn path=/head/; revision=412346
* Update devel/gdb to 7.11 which includes new thread support implementedTijl Coosemans2016-03-141-18/+7
| | | | | | | | | | by jhb. Special thanks to jhb for the amazing work on gdb! PR: 207972 Submitted by: luca.pizzamiglio@gmail.com (maintainer) Notes: svn path=/head/; revision=411099
* Add support for armv6 native debugging (no crossdebugging yet)Oleksandr Tymoshenko2016-03-061-1/+1
| | | | | | | | PR: 205468 Approved by: luca.pizzamiglio@gmail.com (maintainer) Notes: svn path=/head/; revision=410229
* Various fixes to kgdb. Port revision bumped since kgdb is enabled byJohn Baldwin2016-01-111-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | default. - kgdb -n now permits any valid string to be used instead of only permitting numbers. In particular, this allows 'kgdb -n last' to be used to open the most recent vmcore. - kgdb will now try to determine the list of kernel modules even if the kernel binary does not include debug symbols. This works fine in kernels that have the changes in r290728. - Mark trapframes as "signal trampoline frames". GDB assumes that "normal" frames will never call into a NULL PC. Instead, it assumes that calling a NULL PC will result in an exception (and thus a signal being posted resulting in a signal frame). A trap for a NULL function pointer would thus stop unwinding once it hit the frame with a NULL PC. Marking the trapframes as a signal frame tells GDB it is ok to unwind past a NULL PC. One side effect is that frames in the asm handler now display as "signal handler called" instead of the raw line in assembly. Perhaps at some point it would be nice to mark these up the way ddb does with the trap number, etc. but GDB's stack code doesn't support custom frame printers. PR: 206044 Reviewed by: luca.pizzamiglio@gmail.com (maintainer) Approved by: koobs Notes: svn path=/head/; revision=405792
* Partially revert r401242 to fix build with PYTHON option turned on. NoteJung-uk Kim2015-12-041-1/+2
| | | | | | | | | | | | | | it is not possible to use PYTHON_CMD like this because it is resolved too late and configure script fails like this: checking whether to use python... checking for ... missing configure: error: unable to find python program MFH: 2015Q4 Notes: svn path=/head/; revision=403011
* - Pass --without-guile to configure when GUILE option is offTijl Coosemans2015-11-111-5/+3
| | | | | | | | | - Use CONFIGURE_WITH for other options as well PR: 204041 Notes: svn path=/head/; revision=401242
* Enable regression testsTijl Coosemans2015-11-111-0/+3
| | | | | | | | PR: 200610 Submitted by: luca.pizzamiglio@gmail.com (maintainer) Notes: svn path=/head/; revision=401237
* - Fix a potential parallel build issueTijl Coosemans2015-11-051-1/+1
| | | | | | | | | | | - Fix a regression when debugging a threaded process that forks (like r399623, but for vfork(2)) PR: 203661 Submitted by: luca.pizzamiglio@gmail.com (maintainer) Notes: svn path=/head/; revision=400860
* Don't look up thread names when examining core files. The names are onlyTijl Coosemans2015-10-191-1/+1
| | | | | | | | | | | available when a process is running. PR: 201291 Submitted by: Eric Badger <eric@badgerio.us> Approved by: luca.pizzamiglio@gmail.com (maintainer) Notes: svn path=/head/; revision=399717
* Fix a regression when debugging a threaded process that forks.Tijl Coosemans2015-10-181-1/+1
| | | | | | | | PR: 203661 Submitted by: luca.pizzamiglio@gmail.com (maintainer) Notes: svn path=/head/; revision=399623
* Enable KGDB by default.John Baldwin2015-10-161-1/+2
| | | | | | | | PR: 203782 Approved by: luca.pizzamiglio@gmail.com (maintainer), koobs Notes: svn path=/head/; revision=399525
* Add a new KGDB option to the devel/gdb port. This adds a forward portJohn Baldwin2015-10-061-3/+22
| | | | | | | | | | | | | of the kernel-specific bits of kgdb to recent gdb. It only supports amd64, i386, powerpc, powerpc64, and sparc64. PR: 203299 Reviewed by: bdrewery Glanced at by: emaste, jilles, luca.pizzamiglio@gmail.com (maintainer) Differential Revision: https://reviews.freebsd.org/D3727 Notes: svn path=/head/; revision=398712
* Update gdb to 7.10John Baldwin2015-09-181-25/+12
| | | | | | | | | | | | | | | * Removing patches from the port already committed in upstream * Adopting the new OPTION dependent targets (like do-install-PYTHON-on:) * Enable support for 64-bit targets on 32-bit systems (e.g. allow the i386 gdb to debug an amd64 binary). * Now supports fork and exec tracing. PR: 203170 Submitted by: luca.pizzamiglio@gmail.com (maintainer) Approved by: tijl Notes: svn path=/head/; revision=397259
* - Update to 7.9.1Tijl Coosemans2015-06-041-1/+1
| | | | | | | | | | | - Fix crash on some core files - Fix plist PR: 200001, 200011, 200638 Submitted by: luca.pizzamiglio@gmail.com (maintainer) Notes: svn path=/head/; revision=388538