aboutsummaryrefslogtreecommitdiff
path: root/gnu/usr.bin/gdb
Commit message (Collapse)AuthorAgeFilesLines
...
| * | Sync: merge r215273 through r215318 from ^/head.Dimitry Andric2010-11-142-2/+2
| |\ \ | | | | | | | | | | | | Notes: svn path=/projects/binutils-2.17/; revision=215320
| * \ \ Sync: merge r214895 through r215140 from ^/head.Dimitry Andric2010-11-116-23/+51
| |\ \ \ | | | | | | | | | | | | | | | Notes: svn path=/projects/binutils-2.17/; revision=215143
| * | | | Fix warnings in fbsd-threads.c.Dimitry Andric2010-11-011-2/+6
| | | | | | | | | | | | | | | | | | | | Notes: svn path=/projects/binutils-2.17/; revision=214645
| * | | | For stuff under gnu/usr.bin/gdb, search contrib/binutils/include beforeDimitry Andric2010-11-011-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | contrib/gdb/include, since that contains newer versions of the same files. Notes: svn path=/projects/binutils-2.17/; revision=214644
* | | | | Use string literal format strings to quiet clang warnings.Ed Maste2011-01-231-2/+2
| | | | | | | | | | | | | | | | | | | | Notes: svn path=/head/; revision=217749
* | | | | Retire TARGET_ABI.Warner Losh2011-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. Notes: svn path=/head/; revision=217123
* | | | Add the ability for GDB to printout the thread name along with otherAttilio Rao2010-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 Notes: svn path=/head/; revision=215679
* | | Add missing '/'.Yoshihiro Takahashi2010-11-142-2/+2
| | | | | | | | | | | | Notes: svn path=/head/; revision=215292
* | | We need to add powerpc64->powerpc translations (I knew I hated copyingWarner Losh2010-11-142-2/+2
| |/ |/| | | | | | | | | | | | | | | | | | | this code in the first place). Also MACHINE_ARCH powerpc is 32-bit, not MACHINE_CPUARCH == powerpc. Submitted by: nathanw Notes: svn path=/head/; revision=215276
* | Complete the integration of tbemd branch into head.Warner Losh2010-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. Notes: svn path=/head/; revision=215082
* | Fix cross-debugger buildOleksandr Tymoshenko2010-11-071-0/+8
| | | | | | | | Notes: svn path=/head/; revision=214962
* | Fix initialization order:_initialize_svr4_solib shouldOleksandr Tymoshenko2010-11-071-2/+2
| | | | | | | | | | | | | | be called before _initialize_thread_db Notes: svn path=/head/; revision=214960
* | - Use proper constant for accessing PCB intead of hardcoded numbersOleksandr Tymoshenko2010-11-071-15/+18
| | | | | | | | | | | | | | - Minor clean-up Notes: svn path=/head/; revision=214952
* | Link threads support to the buildOleksandr Tymoshenko2010-11-072-1/+2
|/ | | | Notes: svn path=/head/; revision=214951
* Move test for zero bufp or size before rseq and wseq calculation. ThisEd Maste2010-09-221-1/+3
| | | | | | | | avoids spinning in an infinite loop for some (possibly corrupt?) core files at work. Notes: svn path=/head/; revision=213013
* MFtbemd:Warner Losh2010-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. Notes: svn path=/head/; revision=211725
* Fix buildworld -DNO_CLEAN when using with Perforce, which marks files asWill Andrews2010-08-121-2/+2
| | | | | | | | | | read-only by default, meaning files copied can't be overwritten next time. Reviewed by: imp Approved by: ken (mentor) Notes: svn path=/head/; revision=211243
* Change kgdb_lookup() to resolve symbols via GDB instead of via libkvm(3).John Baldwin2010-08-043-29/+23
| | | | Notes: svn path=/head/; revision=210852
* Give kgdb(1) a chance to take a look at FPU state.Jung-uk Kim2010-08-021-0/+1
| | | | Notes: svn path=/head/; revision=210778
* kgdb: correctly map sections to addresses in elf object modules (amd64)Andriy Gapon2010-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 Notes: svn path=/head/; revision=210424
* Teach our toolchain how to generate 64-bit PowerPC binaries. This fixesNathan Whitehorn2010-07-104-0/+989
| | | | | | | | | | | 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
* For "thread signal" command, print some information from siginfo whenKonstantin Belousov2010-07-041-0/+37
| | | | | | | | | | available. Suggested by: davidxu MFC after: 2 weeks Notes: svn path=/head/; revision=209690
* Make this directory more regular. Since it is one we control, use theWarner Losh2010-04-144-14/+3
| | | | | | | | | | freebsd-based names for filenames. This allows us to eliminate almost all of the uses of ${MACHINE_ARCH} here to do special things, and instead we use it to include filenames. This makes new architectures easier to support. Notes: svn path=/head/; revision=206624
* mdoc: order prologue macros consistently by Dd/Dt/OsUlrich Spörlein2010-04-141-1/+1
| | | | | | | | | | | Although groff_mdoc(7) gives another impression, this is the ordering most widely used and also required by mdocml/mandoc. Reviewed by: ru Approved by: philip, ed (mentors) Notes: svn path=/head/; revision=206622
* Simplify how we select which architectures to add gdbserver for. IfWarner Losh2010-04-121-2/+1
| | | | | | | the MD files exist, compile it, otherwise omit it. Notes: svn path=/head/; revision=206530
* Allow building a cross-kgdb for ia64.Marcel Moolenaar2010-03-262-1/+8
| | | | Notes: svn path=/head/; revision=205711
* Handle cross-builds for gdbserver.Marcel Moolenaar2010-03-261-1/+3
| | | | Notes: svn path=/head/; revision=205710
* Fix typo in commentWarner Losh2010-03-191-1/+1
| | | | Notes: svn path=/head/; revision=205310
* Initial gdbserver support for amd64.Jung-uk Kim2010-02-254-3/+319
| | | | Notes: svn path=/head/; revision=204335
* These contain JC's patch to get gdb sort of workingRandall Stewart2010-02-203-14/+17
| | | | | | | | | | | | | | | 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
* Compile fbsd-threads.c. Threading & TLS support is working just fine.Marcel Moolenaar2010-02-162-1/+3
| | | | Notes: svn path=/head/; revision=203960
* kgdb: initialize n_type field of nlist entry for kvm_nlist callAndriy Gapon2010-02-131-0/+1
| | | | | | | | | | | | | | kvm_nlist skips lookup for entries that have n_type != N_UNDF. N_UNDF happens to be zero, so n_type typically has a correct value by accident, but not always. Note: jhb has a patch that replaces kvm_nlist use with direct gdb parsing. MFC after: 5 days X-MFC-Note: unless jhb commits kvm_nlist => kgdb_parse change Notes: svn path=/head/; revision=203823
* Initial gdbserver support for PowerPC.Rafal Jaworowski2009-02-234-1/+274
| | | | | | | Obtained from: Juniper Networks, Semihalf Notes: svn path=/head/; revision=188941
* Initial gdbserver support for ARM.Rafal Jaworowski2008-11-174-4/+226
| | | | | | | Obtained from: Juniper Networks, Semihalf Notes: svn path=/head/; revision=185023
* Document what the sed trick is for.David E. O'Brien2008-10-162-4/+5
| | | | | | | Remove an embedded <TAB>, and use same style for both files. Notes: svn path=/head/; revision=183957
* Oops, initialize sections and sections_end to NULL.John Baldwin2008-10-021-1/+1
| | | | | | | | Submitted by: Navdeep Parhar MFC after: 1 week Notes: svn path=/head/; revision=183556
* Differentiate between interrupt frames, trap interrupt frames and timerKonstantin Belousov2008-09-271-3/+33
| | | | | | | | | | | | frame in the kgdb, to allow it to properly backtrace over the interrupt stacks. Noted and reviewed by: tegge Tested by: pho MFC after: 1 week Notes: svn path=/head/; revision=183414
* Use existing GDB routines for parsing the section table of klds inJohn Baldwin2008-09-251-36/+23
| | | | | | | | | the 'add-kld' command instead of doing it more by hand. MFC after: 1 week Notes: svn path=/head/; revision=183359
* Widen psaddr_t from uintptr_t to uint64_t. This results in anMarcel Moolenaar2008-09-141-6/+7
| | | | | | | | | | | | | | | | | | ABI change on ILP32 platforms and relating to events. However it's harmless on little-endian ILP32 platforms in the sense that it doesn't cause breakages. Old ILP32 thread libraries write a 32-bit th_p and new thread libraries write a 64-bit th_p. But due to the fact that we have an unused 32-bit data field right after th_p and that field is always initialized to zero, little-endian ILP32 machines effectively have a valid 64-bit th_p by accident. Likewise for new thread libraries and old libthread_db: little endian ILP32 is unaffected. At this time we don't support big-endian threaded applications in GDB, so the breakage for the ILP32 case goes unnoticed. Notes: svn path=/head/; revision=183023
* Unbreak the arm build, by spelling LIBSRCS correctly.Olivier Houchard2008-08-021-1/+1
| | | | Notes: svn path=/head/; revision=181167
* Do not build fbsd-threads.c if we're building a cross-debugger.Olivier Houchard2008-08-021-1/+4
| | | | | | | MFC after: 3 days Notes: svn path=/head/; revision=181148
* Catch up to recentish kgdb changes:John Baldwin2008-06-181-1/+6
| | | | | | | | | | | - Use ptid_get_pid() rather than ptid_get_tid() (part of the changes to let 'tid' work for remote kgdb). - Add a stub kgdb_trgt_new_objfile() hook. Silence from: obrien, mips@ Notes: svn path=/head/; revision=179859
* Add Juniper's copyright.David E. O'Brien2008-05-201-0/+1
| | | | Notes: svn path=/head/; revision=179162
* MIPS arch target kgdb(1) support.David E. O'Brien2008-05-201-0/+207
| | | | | | | Obtained from: Juniper Networks. Notes: svn path=/head/; revision=179161
* Trim unneeded header.John Baldwin2008-05-091-1/+0
| | | | Notes: svn path=/head/; revision=178880
* - Change how the vmcore target maps FreeBSD thread IDs to GDB ptids. WeJohn Baldwin2008-05-018-47/+40
| | | | | | | | | | | | | | | | | now only use the TID and ignore the PID and use pid_to_ptid() to build a ptid treating the TID as a PID. The benefit of this is that the vmcore target now uses the same scheme as GDB's remote targets. As a result, the 'tid' command now works for remote targets (however, it only accepts TIDs and not addresses of 'struct thread' objects). - Use gdb_thread_select() to do the actual thread switch for the 'tid' and 'proc' commands. This now gives the same UI feedback when switching threads as the GDB 'thread' command rather than providing no visual output at all. MFC after: 1 week Notes: svn path=/head/; revision=178713
* Rework how kgdb manages kernel and vmcore files to be a bit more gdb-ishJohn Baldwin2008-04-2911-184/+338
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | so that kgdb can be used more like a normal gdb: - Load the kernel via the standard 'exec' target and allow it to be changed via the 'file' command. - Instead of explicitly loading the kernel file as the mail symbol file during startup, just pass it to gdb_main() as the executable file. - Change the kld support (via shared libraries) to cache the address of the linker_files and linker_kernel_file variables in addition to the offsets of various members in 'struct linker_file'. - When a new symbol file is loaded, recompute the addresses and offsets used by the kld support code. - When a new symbol file is loaded, recalculate the ofs_fix variable to account for the different ways a trapframe can be passed to trap frame handlers in i386. This is done by adding a MD kgdb_trgt_new_objfile() hook that is empty on all but i386. - Don't use the directory name of the kernel specified on the command line to find kernel modules in the kld support code. Instead, extract the filename of the current executable via exec_bfd. Now the 'kernel' variable is private to main.c again. - Make the 'add-kld' command explicitly fail if no executable is loaded. - Make the support for vmcores a real core-dump target that opens the kernel and vmcore on open and closes the kvm connection when closed, etc. - The 'core' command can now be used to select a vmcore to use, either a crash dump file or /dev/mem for live debugging. - The 'detach' command can be used to detach from a vmcore w/o attaching to a new one. - kgdb no longer explicitly opens a core dump during startup and no longer has to use an atexit() hook to close the kvm connection on shutdown. - Symbols for kld's are automatically loaded anytime a core is opened. Also, the unread portion of dmesg is dumped just as it was done on kgdb startup previously. - Don't require either a remote target or core dump if a kernel is specified. You can now just run 'kgdb kernel' similar to running gdb on an executable and later connect to a remote target or core dump. - Use a more relaxed way to verify remote targets specified via -r. Instead of explicitly allowing a few non-file target specifications, just assume that if stat() on the arg and on "/dev/" + arg both fail that is some non-file target and pass it to gdb. - Don't use a custom interpreter. The existing kgdb_init() hook and the target_new_objfile() hook give us sufficient hooks during startup to setup kgdb-specific behavior now. - Always add the 'proc', 'tid', and 'add-kld' commands on startup and not just if we have a core dump. Currently the 'proc' and 'tid' commands do not work for remote targets (I will fix at least 'tid' in the next round of changes though). However, the 'add-kld' command works fine for loading symbols for a kernel module on a remote target. - Always setup the 'kld' shared library target operations instead of just if we have a core dump. Although symbols for kernel modules are not automatically loaded when connecting to a remote target, you can do 'info sharedlibrary' after connecting to the remote target and kgdb will find all the modules. You can then use the 'sharedlibrary' command to load symbols from the module files. - Change kthr_init() to free the existing list of kthr objects before generating a new one. This allows it to be invoked multiple times w/o leaking memory. MFC after: 1 week Notes: svn path=/head/; revision=178670
* - Add a global variable 'fbsdcoreops_suppress_target' that can be set toJohn Baldwin2008-04-291-2/+11
| | | | | | | | | | | | | | | | | force the FreeBSD multithreaded core target to not register any target for handling core dumps. This is analogous to the 'coreops_suppress_target' variable that GDB provides for suppressing the default core dump target. KGDB will use this new variable so it can provide its own core dump target that uses libkvm to work with vmcore files. - Adjust the long name and documentation of the FreeBSD multithreaded core dump target so it better matches what GDB's core dump target uses. MFC after: 1 week Reviewed by: davidxu, marcel Notes: svn path=/head/; revision=178666
* Use kgdb_parse() instead of libkvm(3) to read the first instruction fromJohn Baldwin2008-04-281-16/+9
| | | | | | | | | | "calltrap" to see which method is used to pass trap frames. This seg faulted on remote gdb connections (where libkvm isn't used). MFC after: 3 days Notes: svn path=/head/; revision=178638
* Remove the 'add_kld_command' arg from load_kld(). It is always true sinceJohn Baldwin2008-04-281-12/+5
| | | | | | | | | | the auto-loading of kld's switched to hooking into gdb's shared library support. MFC after: 1 week Notes: svn path=/head/; revision=178634