aboutsummaryrefslogtreecommitdiff
path: root/contrib/gdb
Commit message (Collapse)AuthorAgeFilesLines
* Remove unused contrib/gdbEd Maste2020-12-31850-487696/+0
| | | | | | | | As of 1c0ea326aa6d in-tree gdb is not used. Clean up the contrib directory. Reported by: kib Sponsored by: The FreeBSD Foundation
* [PPC64] Fix GDB sigtramp detectionLeandro Lupori2019-11-011-2/+8
| | | | | | | | | | | | | | Current implementation of ppcfbsd_pc_in_sigtramp() seems to take only 32-bit PowerPC in account, as on 64-bit PowerPC most kernel instruction addresses will be wrongly reported as in sigtramp. This change adds proper sigtramp detection for PPC64. Reviewed by: jhibbits Differential Revision: https://reviews.freebsd.org/D22199 Notes: svn path=/head/; revision=354239
* Remove usesless readline compat includes which will reinclude readline.hBaptiste Daroussin2019-09-125-5/+0
| | | | | | | | | itself. This simplifies the upcoming update to newer libedit. Notes: svn path=/head/; revision=352242
* Commit forgotten change in gdb allowing to use libeditBaptiste Daroussin2018-02-061-1/+1
| | | | Notes: svn path=/head/; revision=328927
* Fix KGDB backtrace on ARMWojciech Macek2016-04-203-1/+9
| | | | | | | | | | | | | | | | | | | | Modify trapframe decoding to properly analyze trapframe. Provide method for fixup_pc. It happens, that in some kernel functions, the GDB stack frame decoder cannot determine both func name and frame size. This is because these functions either contain invalid instruction, or their format does not match standard schema. Detect that scenarios and move PC accordingly to jump into known function schema, which GDB is able to parse. Obtained from: Semihalf Sponsored by: Juniper Networks Reviewed by: kib, zbb Differential Revision: https://reviews.freebsd.org/D5976 Notes: svn path=/head/; revision=298358
* Workaround KGDB issues on ARM by ignoring ARM EABI version higher than 5Zbigniew Bodek2015-10-301-0/+15
| | | | | | | | | | | | | | | | | | | To make KGDB working, it needs to understand kernel ELF image. By default it is compiled using EABI_5, which is not supported on the gdb-6. As a workaround, treat these images as EABI_2 because they share a lot of things in common. This workaround does not guarantee ALL funtionalities to work. Submitted by: Wojciech Macek <wma@semihalf.com> Reviewed by: jhb Obtained from: Semihalf Sponsored by: Juniper Networks Inc. Differential Revision: https://reviews.freebsd.org/D4012 Notes: svn path=/head/; revision=290192
* Update intree gdb/kgdb to handle 2 dwarf types:Sean Bruno2015-05-177-4/+171
| | | | | | | | | | | | | | | | | | DW_OP_GNU_uninit DW_OP_piece This squashes the warnings about type 0x93 not known in kgdb when opening a kernel crash dump. Upstream refs: https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;a=commit;h=87808bd699575a850139a1f916512ab7a47fd496 https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;a=commit;h=42be36b328ae784ae6981da7c7cab95b67ed7737 https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;a=commit;h=23572ecadc89af384c1804ad7692f32c55fbfc80 Differential Revision: https://reviews.freebsd.org/D2534 Reviewed by: emaste, jhb, davide Notes: svn path=/head/; revision=283029
* MFV r277658:Pedro F. Giffuni2015-01-241-3/+4
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | GDB: Replace use of sprintf. 2005-03-17 Mark Kettenis <kettenis@gnu.org> * corelow.c (get_core_register_section): Replace usage of sprintf and strcpy with xstrprintf and xstrdup. Sourceware commit: 3ecda4574edb38ad12fb491ccaf6d9b0caa3a07a CID: 1006819 MFC after: 4 days Notes: svn path=/head/; revision=277659
* | MFV: r277654Pedro F. Giffuni2015-01-241-0/+2
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | gdb: Add missing break statements 2004-05-21 Jim Blandy <jimb@redhat.com> * dwarf2expr.c (execute_stack_op): Add 'break' statements after cases for DW_OP_div and DW_OP_shr. (Thanks to Reva Cuthbertson.) Sourceware commit 99c87dab95747d380392a3698740507a21ad3236 CID: 1008254 MFC after: 4 days Notes: svn path=/head/; revision=277656
* | MFV r277607:Pedro F. Giffuni2015-01-232-4/+4
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | GDB: Fix memset thinkos. 2005-03-25 Anthony Green <green@redhat.com> * remote.c (remote_store_registers): Fix memset usage. * std-regs.c (value_of_builtin_frame_reg): Ditto. (value_of_builtin_frame_fp_reg): Ditto. (value_of_builtin_frame_reg): Ditto. Reported by: Dirk Engling CID: 604160, 604161, 604162, 604163 MFC after: 5 days Notes: svn path=/head/; revision=277608
| * Flatten the dist tree.Ed Maste2009-04-07843-486048/+0
| | | | | | | | Notes: svn path=/vendor/gdb/dist/; revision=190788
* | recognize the FreeBSD ARCH tag that is put on binaries like on armebJohn-Mark Gurney2014-02-121-4/+18
| | | | | | | | | | | | | | | | | | EABI binaries... MFC after: 1 week Notes: svn path=/head/; revision=261787
* | Use sysctl KERN_PROC_SIGTRAMP to retrieve the signal trampolineKonstantin Belousov2013-11-261-12/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | location for the native amd64 ABI. This fixes unwinding over the signal frame after trampoline was moved to the shared page. The code would be more correct if using sysctl for the target process instead of inspecting gdb' own trampoline, but the current change is least intrusive and currently, we always initialize the native ABI sysvec first, which means that trampoline location for FreeBSD/amd64 ABI is relatively stable. Similar change will benefit libunwind. Analyzed by: avg Sponsored by: The FreeBSD Foundation MFC after: 1 week Notes: svn path=/head/; revision=258663
* | Fold in frame-unwind patchEd Maste2013-06-171-0/+4
| | | | | | | | | | | | | | | | After moving to svn there's no need to avoid pulling files off a vendor branch. Notes: svn path=/head/; revision=251858
* | Include die tag in error messageEd Maste2013-06-171-2/+2
| | | | | | | | Notes: svn path=/head/; revision=251844
* | Handle DW_TAG_unspecified_typeEd Maste2013-06-121-0/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | 2011-11-14 Jim Ingham <jingham@apple.com> * dwarf2read.c (read_type_die): Handle DW_TAG_unspecified_type. (read_tag_unspecified_type): New function, add a type for the DW_TAG_unspecified_type die. Obtained from: Apple, gdb-1752 Notes: svn path=/head/; revision=251667
* | Handle DW_TAG_rvalue_reference_typeEd Maste2013-06-121-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2012-05-21 Jim Ingham <jingham@apple.com> * dwarf2read.c (process_die): Handle DW_TAG_rvalue_reference_type. (read_type_die): Ditto. (dwarf_tag_name): Ditto. * elf/dwarf2.h: Add DW_TAG_rvalue_reference_type. Obtained from: Apple, gdb-1820 Notes: svn path=/head/; revision=251665
* | Fix the value of NT_FREEBSD_TAG to be the same as ABI_NOTRTYPE in lib/csu.Andrew Turner2013-04-181-0/+6
| | | | | | | | | | | | | | | | Add NT_FREEBSD_NOINIT_TAG for the value of CRT_NOINIT_NOTETYPE. Check for both of these when detecting a FreeBSD binary in gdb. Notes: svn path=/head/; revision=249603
* | Extend GDB to check the value in the .note.tag section along with theAndrew Turner2013-02-041-0/+14
| | | | | | | | | | | | | | | | | | | | | | .note.ABI-tag section. This helps on ARM EABI where the OS/ABI field is zero. It would be better to use the NOTES program header however this would require a more invasive change. Notes: svn path=/head/; revision=246312
* | Clean some 'svn:executable' properties in the tree.Pedro F. Giffuni2013-01-2614-0/+0
| | | | | | | | | | | | | | | | Submitted by: Christoph Mallon MFC after: 3 days Notes: svn path=/head/; revision=245952
* | Support restrict qualifier in dwarf debug infoEd Maste2012-12-196-28/+71
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Newer clang/llvm emit DW_TAG_restrict_type, which wasn't handled by gdb. Import support from Apple's gdb-1822: | 2009-03-24 Jason Molenda (jmolenda@apple.com) | | * gdbtypes.c (make_cv_type): Rename this function to make_cvr_type to | also handle restrict qualifiers. | (check_typedef): Handle TYPE_RESTRICT. | * gdbtypes.h (TYPE_FLAG_RESTRICT, TYPE_RESTRICT): New. | * hpread.c (hpread_type_lookup): Update to use make_cvr_type. | * stabsread.c (read_type): Pass the restrict qualifiers along. | * parse.c (follow_types): Pass the restrict qualifiers along. | * dwarf2read.c (read_tag_const_type): Call make_cvr_type. | (read_tag_volatile_type): Same. | (read_tag_restrict_type): New function. | (read_type_die): Handle DW_TAG_restrict_type. Obtained from: Apple Sponsored by: ADARA Networks Notes: svn path=/head/; revision=244437
* | Do not unwind past a zero PC frame.Ed Maste2012-11-131-0/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This improves GDB usability when debugging code compiled with optimization. Upstream GDB revision f0031b6d3ae9b164b3747986ab898190bd4dcf8c (prior to GDB's switch to GPLv3), with frame_debug_got_null_frame expanded inline. | 2004-12-12 Andrew Cagney <cagney@gnu.org> | | * frame.c (get_prev_frame): When unwinding normal frames, check | that the PC isn't zero. Sponsored by: ADARA Networks MFC After: 1 month Notes: svn path=/head/; revision=242943
* | Set optimized_out instead of reporting an error.Ed Maste2012-11-1311-77/+95
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This provides a better display when debugging code compiled with optimization on. GDB git revision e8395b4efd184f745070afb953f451f99e922be7 (prior to GDB's switch to GPLv3), modified for the interfaces provided by GDB 6.1.1. 2005-02-28 Daniel Jacobowitz <dan@codesourcery.com> * dwarf2loc.c (loclist_read_variable): Set optimized_out instead of reporting an error. * valprint.c (value_check_printable): New function. (common_val_print): New function. Use value_check_printable. (value_print): Use value_check_printable. * value.h (common_val_print): Add prototype. * c-valprint.c (c_val_print): Use common_val_print. * cp-valprint.c (cp_print_value_fields): Likewise. (cp_print_hpacc_virtual_table_entries): Likewise. * f-valprint.c (f_val_print): Likewise. * jv-valprint.c (java_value_print, java_print_value_fields): Likewise. * scm-valprint.c (scm_value_print): Likewise. * stack.c (print_frame_args): Likewise. * varobj.c (c_value_of_variable): Likewise. * p-valprint.c (pascal_val_print, pascal_value_print): Likewise. (pascal_object_print_value_fields): Likewise. Update call to pascal_object_print_static_field. (pascal_object_print_static_field): Remove TYPE argument. Use common_val_print. Sponsored by: ADARA Networks MFC after: 1 month Notes: svn path=/head/; revision=242936
* | Fix "Corrupted DWARF expression" from (k)gdb.Ed Maste2012-09-061-2/+2
| | | | | | | | | | | | | | | | | | | | Google turned up Debian bug 405116, which describes the problem in sufficient detail to identify the overflowing variables. MFC after: 1 week Notes: svn path=/head/; revision=240163
* | Teach gdb about the DW_FORM_flag_present dwarf attribute, so it doesn'tDimitry Andric2012-08-291-0/+6
| | | | | | | | | | | | | | | | | | | | error out on files that contain it. (This attribute can be emitted by newer versions of clang.) MFC after: 2 weeks Notes: svn path=/head/; revision=239870
* | fix ABI detection logic: for 64-bit elf objects set default ABI to n64.Oleksandr Tymoshenko2012-03-191-0/+7
| | | | | | | | Notes: svn path=/head/; revision=233159
* | Pull in a fix (still under GPLv2) for a double free in gdb, leading toDimitry Andric2012-03-131-0/+7
| | | | | | | | | | | | | | | | | | | | | | an assert, which can occur if you repeatedly dlopen() and dlclose() a .so file in a tight loop. This was reported on freebsd-current@ by Alexandre Martins, with a sample to reproduce the behaviour. Obtained from: http://sourceware.org/git/?p=gdb.git;a=commit;h=a6f2cbb341520f8e100f4b8305979dd6207a79e8 Notes: svn path=/head/; revision=232934
* | Note two shortcomings of GDB on MIPS that should be addressed.Juli Mallett2012-03-131-0/+2
| | | | | | | | Notes: svn path=/head/; revision=232910
* | Implement functions necessary for compiling fbsd-threads.c.Marius Strobl2011-08-062-0/+61
| | | | | | | | | | | | | | | | | | Reviewed by: marcel Approved by: re (kib) MFC after: 1 week Notes: svn path=/head/; revision=224686
* | - Check on target wordsize instead of compile time define if we build onAndreas Tobler2011-06-141-61/+319
| | | | | | | | | | | | | | | | | | | | | | | | 64-bit PowerPC or 32-bit PowerPC. - Make gdb work on powerpc64, the code for this is obtained from ppc-linux-tdep.c. - Remove non-elf core read functionality. Implement core read functionality similar like other FreeBSD targets. - Set long double limitations. Notes: svn path=/head/; revision=223082
* | Remove stray semicolon. This fix appears in later upstream gdb versions.Ed Maste2011-03-091-1/+1
| | | | | | | | | | | | | | Submitted by: eadler Notes: svn path=/head/; revision=219418
* | Merge binutils 2.17.50 to head. This brings a number of improvements toDimitry Andric2011-02-1810-72/+101
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | x86 CPU support, better support for powerpc64, some new directives, and many other things. Bump __FreeBSD_version, and add a note to UPDATING. Thanks to the many people that have helped to test this. Obtained from: projects/binutils-2.17 Notes: svn path=/head/; revision=218822
| * \ Sync: merge r215464 through r215708 from ^/head.Dimitry Andric2010-11-221-0/+5
| |\ \ | |/ / |/| | | | | Notes: svn path=/projects/binutils-2.17/; revision=215710
| * | Sync: merge r214895 through r215140 from ^/head.Dimitry Andric2010-11-113-9/+14
| |\ \ | | | | | | | | | | | | Notes: svn path=/projects/binutils-2.17/; revision=215143
| * \ \ Sync: merge r214649 through r214894 from ^/head.Dimitry Andric2010-11-062-1/+11
| |\ \ \ | | | | | | | | | | | | | | | Notes: svn path=/projects/binutils-2.17/; revision=214895
| * | | | Fix gdb compilation with new binutils:Dimitry Andric2010-10-2210-34/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | bfd_get_section_size_before_reloc() has been renamed to bfd_get_section_size(). Notes: svn path=/projects/binutils-2.17/; revision=214212
* | | | | Add the ability for GDB to printout the thread name along with otherAttilio Rao2010-11-221-0/+5
| |_|/ / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | thread specific informations. In order to do that, and in order to avoid KBI breakage with existing infrastructure the following semantic is implemented: - For live programs, a new member to the PT_LWPINFO is added (pl_tdname) - For cores, a new ELF note is added (NT_THRMISC) that can be used for storing thread specific, miscellaneous, informations. Right now it is just popluated with a thread name. GDB, then, retrieves the correct informations from the corefile via the BFD interface, as it groks the ELF notes and create appropriate pseudo-sections. Sponsored by: Sandvine Incorporated Tested by: gianni Discussed with: dim, kan, kib MFC after: 2 weeks Notes: svn path=/head/; revision=215679
* | | | Change register numbers according to current struct reg andOleksandr Tymoshenko2010-11-072-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | struct fpreg in src/sys/mips/include/reg.h Notes: svn path=/head/; revision=214949
* | | | Calculate offset from frame top for registers saved on a stack frame.Oleksandr Tymoshenko2010-11-071-6/+11
| |/ / |/| | | | | | | | Notes: svn path=/head/; revision=214947
* | | - Add ELF core for FreeBSD/mipsOleksandr Tymoshenko2010-11-021-0/+10
| | | | | | | | | | | | | | | | | | | | | - Register all known cores in init function Notes: svn path=/head/; revision=214652
* | | Fix reading of .debug_line on MIPS64, big-endian:Oleksandr Tymoshenko2010-11-021-1/+1
|/ / | | | | | | | | | | | | | | | | | | | | read_initial_length detects pointer size by checking first 4 bytes of .debug_line and stores it in struct comp_unit_head * passed to it as second argument. By passing NULL to a read_initial_length we ignore actual pointer size (8 bytes) and use default (4 bytes) which results in wrong offsets of header fields. Notes: svn path=/head/; revision=214651
* | Teach our toolchain how to generate 64-bit PowerPC binaries. This fixesNathan Whitehorn2010-07-102-7/+13
| | | | | | | | | | | | | | | | | | | | | | a variety of bugs in binutils related to handling of 64-bit PPC ELF, provides a GCC configuration for 64-bit PowerPC on FreeBSD, and associated build systems tweaks. Obtained from: projects/ppc64 Notes: svn path=/head/; revision=209867
* | Adds the missing mips gdb files that IRandall Stewart2010-02-215-0/+818
| | | | | | | | | | | | | | | | | | | | foobar'd on my last commit.. Sorry about that JC.. my fault. Obtained from: JC Notes: svn path=/head/; revision=204174
* | These contain JC's patch to get gdb sort of workingRandall Stewart2010-02-201-0/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | on mips. Its not fully done yet but its a start. Obtained from: JC - c.jayachandran@gmail.com M gnu/usr.bin/gdb/kgdb/trgt_mips.c M gnu/usr.bin/gdb/arch/mips/init.c M gnu/usr.bin/gdb/arch/mips/Makefile M gnu/usr.bin/Makefile M contrib/gdb/gdb/mips-tdep.h Notes: svn path=/head/; revision=204138
* | gdb: make 'thread apply all bt' always work on all threadsAndriy Gapon2009-06-121-2/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | even if some appear to have (partially) corrupted stack traces. E.g. kernel crashdumps typically have stack weirdness at userland-kernel boundary. Obtained from: vendor/upstream (CVS rev 1.118 of stack.c) Reviewed by: emaste Approved by: jhb Notes: svn path=/head/; revision=194061
* | - Use gdb-* glob instead of gdb-6.1.1, to simplify future imports.Ed Maste2009-04-071-54/+65
| | | | | | | | | | | | | | | | - Add a few entries for additional files from later gdb releases that should also be ignored. Notes: svn path=/head/; revision=190827
* | gdb: Remove arm_pc_is_thumb_dummy() and related code.Rafal Jaworowski2008-11-171-36/+1
| | | | | | | | | | | | | | | | | | This is basically an import of the following gdb change: http://sourceware.org/ml/gdb-cvs/2005-03/msg00143.html (which in effect fixes problems with gracefully closing down the non-Thumb program being debugged). Notes: svn path=/head/; revision=185024
* | This commit was generated by cvs2svn to compensate for changes in r173619,David E. O'Brien2007-11-141-1/+1
|\| | | | | | | | | | | | | which included commits to RCS files with non-trunk default branches. Notes: svn path=/head/; revision=173620
| * Bring in FSF revision 1.9 (Change type of ps_strings from int to u_long).David E. O'Brien2007-11-141-1/+1
| | | | | | | | | | | | | | | | | | | | This fixes a situation where GDB gives incorrect backtraces when a signal handler is in the call chain. Submitted by: Stu Grossman <grossman@juniper.net> Notes: svn path=/vendor/gdb/dist/; revision=173619
* | This commit was generated by cvs2svn to compensate for changes in r169185,Marcel Moolenaar2007-05-011-0/+12
|\| | | | | | | | | | | | | which included commits to RCS files with non-trunk default branches. Notes: svn path=/head/; revision=169186