summaryrefslogtreecommitdiffstats
path: root/gnu/usr.bin/gdb
Commit message (Collapse)AuthorAgeFilesLines
* MFC 288371:jhb2015-11-051-1/+0
| | | | | | | | | | | | | | | | When XSAVE support was added on amd64, the FPU save area was moved out of 'struct pcb' and into a variable-sized region after the structure. The kgdb code currently only reads the pcb. It does not read in the FPU save area but instead passes stack garbage as the FPU's saved context. Fixing this would mean determining the proper size of the area and fetching it. However, this state is not saved for running CPUs in stoppcbs[], so the callback would also have to know to ignore those pcbs. Instead, just remove the call since it is of limited usefulness. It results in kgdb reporting the state of the FPU/SIMD registers in userland, not their current values in the kernel. In particular, it does not report the correct state for any code in the kernel which does use the FPU and would report incorrect values in that case.
* MFC r285041:kib2015-08-051-3/+3
| | | | | Use single instance of the identical INKERNEL() and PMC_IN_KERNEL() macros on amd64 and i386. On i386, correct the lowest kernel address.
* MFC r276187, r276190, r271422:ian2015-02-121-13/+5
| | | | | | | | | | Rename pmap_kenter_temp to pmap_kenter_temporary to be consistent with the other architectures with this function. Eliminate unnecessary references to pte.h internals by using the standard pmap_kenter_temporary() to map pages while dumping. Cleanup up ARM *frame structures.
* MFC r264400,r265836:ngie2014-12-312-2/+2
| | | | | | | | | | | | | | r264400: NO_MAN= has been deprecated in favor of MAN= for some time, go ahead and finish the job. ncurses is now the only Makefile in the tree that uses it since it wasn't a simple mechanical change, and will be addressed in a future commit. r265836: Remove last two NO_MAN= in the tree. In both of these cases, MAN= is what is needed.
* Fold in frame-unwind patchemaste2013-06-172-35/+2
| | | | | After moving to svn there's no need to avoid pulling files off a vendor branch.
* Add a new knob WITH_DEBUG_FILES to control the building of standaloneemaste2013-06-0710-24/+2
| | | | | | | | | | | | | | | | debug files for userland programs and libraries. The "-g" debug flag is automatically applied when WITH_DEBUG_FILES is set. The debug files are now named ${prog}.debug and ${shlib}.debug for consistency with other systems and documentation. In addition they are installed under /usr/lib/debug, to simplify the process of installing them if needed after a crash. Users of bsd.{prog,lib}.mk outside of the base system place the standalone debug files in a .debug subdirectory. GDB automatically searches both of these directories for standalone debug files. Thanks to everyone who contributed changes, review, and testing during development.
* Fix mips64 and mipsn32 bilds by using proper register names.imp2013-04-251-0/+11
|
* KGDB: Accept KLD symbol files with the ".symbols" extension.will2013-03-281-0/+1
| | | | | | | Submitted by: gibbs Approved by: ken (mentor) Sponsored by: Spectra Logic MFC after: 1 month
* KGDB: Allow modules to be loaded from the specified kernel's directory.will2013-03-281-1/+4
| | | | | | | | | | | | | | | | | | When looking up the absolute path for a kld, call find_kld_path() first. This enables locating the module in a different directory than the one stored in kernel memory. With this change, kgdb can now be run on a kernel & vmcore whose associated modules are located in the same directory as the kernel. This makes independent triaging of problems much easier. This change also does not break the normal kgdb use case where no arguments are specified; in that case kgdb loads the running kernel and its modules. Reviewed by: adrian Approved by: ken (mentor) Sponsored by: Spectra Logic MFC after: 1 month
* kgdb enhancements!adrian2013-02-192-10/+13
| | | | | | | | | * document the kgdb -b flag * better verify what's valid with -b * add more comprehensive command line help PR: kern/175743 Submitted by: Christoph Mallon <christoph.mallon@gmx.de>
* In kthr.c, obtain the address of the PCB for threads that were runningmarcel2013-02-1711-7/+75
| | | | | | | | | | | | | | | | | | | | on a core, when the core was stopped, by calling kgdb_trgt_core_pcb(). This has 2 advantages: 1. We don't need to include a machine-specific header anymore and as such kthr.c is truly machine independent. This allows the code to be used in a cross-debugger. 2. We don't need to lookup stoppcbs in generic code when it's an inherently target-spicific symbol. It does not exist for ia64. Implement kgdb_trgt_core_pcb() for all architectures, except ia64, by calling a common function called kgdb_trgt_stop_pcb(). This function differs from kgdb_trgt_core_pcb() in that it gets the size of the PCB structure as an argument and as such remains machine independent. On ia64 the PCB for stopped cores is in the PCPU structure itself. This for better scaling. The implementation of kgdb_trgt_core_pcb() for ia64 uses the cpuid_to_pcpu[] array to to obtain the address of the PCB structure.
* Add command-line support to kgdb to allow the baudrate to be set.adrian2013-01-211-1/+14
| | | | | | | | | This allows a remote session to be specified with '-r' as well as a non-default baudrate setting using '-b'. TODO: add to the kgdb manpage. MFC after: 2 weeks
* Fix typo. Not a win in terms of functionality but in terms of completeness.andreast2012-08-191-1/+1
|
* Merging of projects/armv6, part 3gonzo2012-08-152-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | r238211: Support TARGET_ARCH=armv6 and TARGET_ARCH=armv6eb This adds a new TARGET_ARCH for building on ARM processors that support the ARMv6K multiprocessor extensions. In particular, these processors have better support for TLS and mutex operations. This mostly touches a lot of Makefiles to extend existing patterns for inferring CPUARCH from ARCH. It also configures: * GCC to default to arm1176jz-s * GCC to predefine __FreeBSD_ARCH_armv6__ * gas to default to ARM_ARCH_V6K * uname -p to return 'armv6' * make so that MACHINE_ARCH defaults to 'armv6' It also changes a number of headers to use the compiler __ARM_ARCH_XXX__ macros to configure processor-specific support routines. Submitted by: Tim Kientzle <kientzle@freebsd.org>
* Print key value, an index, otherwise we don't know which key is allocated.davidxu2012-05-211-1/+1
|
* General mdoc(7) and typo fixes.gjb2012-05-101-2/+2
| | | | | | PR: 167696 Submitted by: Nobuyuki Koganemaru (kogane!jp.freebsd.org) MFC after: 3 days
* Allow building a powerpc cross-kgdb.marcel2012-04-271-0/+5
|
* Assume a big-endian default on MIPS and drop the "eb" suffix from MACHINE_ARCH.jmallett2012-03-292-2/+2
| | | | | | | | | | | | | | | This makes our naming scheme more closely match other systems and the expectations of much third-party software. MIPS builds which are little-endian should require and exhibit no changes. Big-endian TARGET_ARCHes must be changed: From: To: mipseb mips mipsn32eb mipsn32 mips64eb mips64 An entry has been added to UPDATING and some foot-shooting protection (complete with warnings which should become errors in the near future) to the top-level base system Makefile.
* Note two shortcomings of GDB on MIPS that should be addressed.jmallett2012-03-131-0/+3
|
* Adopt to new layout of struct pcb.kib2012-01-211-1/+1
| | | | MFC after: 1 month
* Add missing -w to kgdb(1)'s usage().rwatson2012-01-041-1/+1
| | | | | Sponsored by: Adara Networks, Inc. MFC after: 3 days
* Do not include <sys/ptrace.h> if we're building a cross-debugger, ptrace isn'tcognet2011-08-261-1/+1
| | | | | | | used anyway, and it breaks the build, since sys/ptrace.h now includes <machine/reg.h> Approved by: re
* Walk the zombproc list as well as the allproc list when enumerating threadsjhb2011-08-191-33/+48
| | | | | | | | | and processes in a kernel image. This allows examination of threads that have exited or are in the late stages of exiting. Tested by: avg Approved by: re (kib) MFC after: 1 week
* Compile fbsd-threads.c. Amongst others this is necessary for a workingmarius2011-08-062-0/+3
| | | | | | | | kgdb(1). Reviewed by: marcel Approved by: re (kib) MFC after: 1 week
* Revert r222363, as bde@ pointed out the initial solution was far moreattilio2011-05-311-1/+1
| | | | correct.
* Style fix: cast to size_t rather than u_long when comparing to sizeof()attilio2011-05-271-1/+1
| | | | | | rets. Requested by: kib
* Commit the support for removing cpumask_t and replacing it directly withattilio2011-05-051-7/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | cpuset_t objects. That is going to offer the underlying support for a simple bump of MAXCPU and then support for number of cpus > 32 (as it is today). Right now, cpumask_t is an int, 32 bits on all our supported architecture. cpumask_t on the other side is implemented as an array of longs, and easilly extendible by definition. The architectures touched by this commit are the following: - amd64 - i386 - pc98 - arm - ia64 - XEN while the others are still missing. Userland is believed to be fully converted with the changes contained here. Some technical notes: - This commit may be considered an ABI nop for all the architectures different from amd64 and ia64 (and sparc64 in the future) - per-cpu members, which are now converted to cpuset_t, needs to be accessed avoiding migration, because the size of cpuset_t should be considered unknown - size of cpuset_t objects is different from kernel and userland (this is primirally done in order to leave some more space in userland to cope with KBI extensions). If you need to access kernel cpuset_t from the userland please refer to example in this patch on how to do that correctly (kgdb may be a good source, for example). - Support for other architectures is going to be added soon - Only MAXCPU for amd64 is bumped now The patch has been tested by sbruno and Nicholas Esborn on opteron 4 x 12 pack CPUs. More testing on big SMP is expected to came soon. pluknet tested the patch with his 8-ways on both amd64 and i386. Tested by: pluknet, sbruno, gianni, Nicholas Esborn Reviewed by: jeff, jhb, sbruno
* Print the raw value of si_code, that is esp. useful for undecoded values.kib2011-03-261-3/+4
| | | | | Sponsored by: The FreeBSD Foundation MFC after: 1 week
* Merge binutils 2.17.50 to head. This brings a number of improvements todim2011-02-182-3/+7
|\ | | | | | | | | | | | | | | | | 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
| * Sync: merge r215464 through r215708 from ^/head.dim2010-11-221-3/+44
| |\
| * | Sync: merge r215273 through r215318 from ^/head.dim2010-11-142-2/+2
| | |
| * | Sync: merge r214895 through r215140 from ^/head.dim2010-11-116-23/+51
| |\ \
| * | | Fix warnings in fbsd-threads.c.dim2010-11-011-2/+6
| | | |
| * | | For stuff under gnu/usr.bin/gdb, search contrib/binutils/include beforedim2010-11-011-1/+1
| | | | | | | | | | | | | | | | | | | | contrib/gdb/include, since that contains newer versions of the same files.
* | | | Use string literal format strings to quiet clang warnings.emaste2011-01-231-2/+2
| | | |
* | | | Retire TARGET_ABI.imp2011-01-072-2/+2
| |_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Implement MACHINE_ARCH=mips64e[lb] to build N64 images. This replaces MACHINE_ARCH=mipse[lb] TARGET_ABI=n64. MACHINE_ARCH=mipsn32e[lb] has been added, but currently requires WITHOUT_CDDL due to atomic issues in libzfs. I've not investigated this much, but implemented this to preserve as much of the TARGET_ABI functionality that I could. Since its presence doesn't affect the working cases, I've kept it in for now. Added mips64e[lb] to make universe, so more kernels build. And I think this (finally) closes the curtain on the tbemd tree.
* | | Add the ability for GDB to printout the thread name along with otherattilio2010-11-221-3/+44
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | | Add missing '/'.nyan2010-11-142-2/+2
| | |
* | | We need to add powerpc64->powerpc translations (I knew I hated copyingimp2010-11-142-2/+2
| |/ |/| | | | | | | | | | | | | this code in the first place). Also MACHINE_ARCH powerpc is 32-bit, not MACHINE_CPUARCH == powerpc. Submitted by: nathanw
* | Complete the integration of tbemd branch into head.imp2010-11-103-5/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | TARGET_BIG_ENDIAN is now completely dead, except where it was originally supposed to be used (internally in the toolchain building). TARGET_ARCH has changed in three cases: (1) Little endian mips has changed to mipsel. (2) Big endian mips has changed to mipseb. (3) Big endian arm has changed to armeb. Some additional changes are needed to make 'make universe' work on arm and mips after this change, so those are commented out for now. UPDATING information will be forthcoming. Any remaining rough edges will be hammered out in -current.
* | Fix cross-debugger buildgonzo2010-11-071-0/+8
| |
* | Fix initialization order:_initialize_svr4_solib shouldgonzo2010-11-071-2/+2
| | | | | | | | be called before _initialize_thread_db
* | - Use proper constant for accessing PCB intead of hardcoded numbersgonzo2010-11-071-15/+18
| | | | | | | | - Minor clean-up
* | Link threads support to the buildgonzo2010-11-072-1/+2
|/
* Move test for zero bufp or size before rseq and wseq calculation. Thisemaste2010-09-221-1/+3
| | | | | avoids spinning in an infinite loop for some (possibly corrupt?) core files at work.
* MFtbemd:imp2010-08-232-5/+3
| | | | | Prefer MACHNE_CPUARCH to MACHINE_ARCH in most contexts where you want to test of all the CPUs of a given family conform.
* Fix buildworld -DNO_CLEAN when using with Perforce, which marks files aswill2010-08-121-2/+2
| | | | | | | read-only by default, meaning files copied can't be overwritten next time. Reviewed by: imp Approved by: ken (mentor)
* Change kgdb_lookup() to resolve symbols via GDB instead of via libkvm(3).jhb2010-08-043-29/+23
|
* Give kgdb(1) a chance to take a look at FPU state.jkim2010-08-021-0/+1
|
* kgdb: correctly map sections to addresses in elf object modules (amd64)avg2010-07-231-6/+28
| | | | | | | | | | | | | Unlike for modules with dso type, in elf object modules all the sections have virtual address of zero. So, it is insufficient to add module base address to section virtual address (as recorded in section header) to get section address in kernel memory. Instead, we should apply the same calculations that are performed by kernel loaders (in boot code and in kernel) when they lay out sections in memory. Discussed with: jhb, np MFC after: 3 weeks
OpenPOWER on IntegriCloud