aboutsummaryrefslogtreecommitdiff
path: root/gnu/usr.bin/gdb
Commit message (Collapse)AuthorAgeFilesLines
...
* Unwind across trap frames. Handles all entry points, except the EPCMarcel Moolenaar2005-09-111-47/+201
| | | | | | | | | syscall. This is an entry from userland anyway. MFC after: 1 week Notes: svn path=/head/; revision=149967
* Unwind across trapframes. All kernel entries are handled.Marcel Moolenaar2005-09-101-11/+94
| | | | | | | MFC after: 1 week Notes: svn path=/head/; revision=149965
* Unwind across trap frames. This adds most of the meat. The snifferMarcel Moolenaar2005-09-101-1/+93
| | | | | | | | | | just needs to be taught about all the other entry points and the unwinder needs to be taught about the frame variation between them. MFC after: 1 week Notes: svn path=/head/; revision=149961
* Unwind across trap frames. This adds most of the meat. The snifferMarcel Moolenaar2005-09-101-10/+95
| | | | | | | | | | just needs to be taught about all the other entry points and the unwinder needs to be taught about the frame variation between them. MFC after: 1 week Notes: svn path=/head/; revision=149957
* Unwind across trap frames. This adds most of the meat. The snifferMarcel Moolenaar2005-09-101-6/+86
| | | | | | | | | | just needs to be taught about all the other entry points and the unwinder needs to be taught about the frame variation between them. MFC after: 1 week Notes: svn path=/head/; revision=149955
* Add a kluge to allow kgdb(1) to inject its own frame sniffer in theMarcel Moolenaar2005-09-1011-13/+188
| | | | | | | | | | | | | | | | | | | | list of frame sniffers so that trapframes can be detected. The kluge is needed because this version of gdb only supports appending a sniffer to the list of sniffers and the moment kgdb gets a chance to add its own frame sniffer, the target's default frame sniffer is already in the list. Since the default frame sniffer claims any frame thrown at it, kgdb's frame sniffer never gets to smell (a process much akin to tasting, but with lesser chance of hurling :-) This commit adds dummy frame sniffers that never claim a frame and as such don't fix anything yet. However, we now have frame sniffers and they are being called, so it's just a matter of adding meat to the bones and we'll be able to properly unwind across trapframes. MFC after: 1 week Notes: svn path=/head/; revision=149954
* Fix backtraces. Supply registers from the register window.Marcel Moolenaar2005-08-161-16/+7
| | | | | | | MFC after: 3 days Notes: svn path=/head/; revision=149119
* o Remove the obscure tid command, because it does what the threadMarcel Moolenaar2005-08-061-100/+41
| | | | | | | | | | | | | | | | | | | | | | | | | | command does, but worse. o Remove the obscure proc command, because it does what the thread command does, but not unambigously. o Move the PID to the extra thread info, where it makes sense and where it doesn't confuse users. The extra thread info holds some process information, to which the PID belongs. o Implement the to_find_new_threads target method by having it call the target beneath us if we're not using KVM. This makes sure that new threads are found when using the remote target. o Fix various core dump scenarios: - Implement the to_files_info target method. Previously the 'info target' command would cause a NULL pointer dereference. - Don't assume there's a current thread. We're not initialized in all cases. This prevents a NULL pointer dereference. - When we're not ussing KVM, have the to_xfer_memory target method call the target beneath us. This avoids calling into KVM with a NULL pointer. MFC after: 1 week Notes: svn path=/head/; revision=148802
* o As mentioned in the previous commit: make the KVM error bufferMarcel Moolenaar2005-08-061-6/+58
| | | | | | | | | | | | | | | static. o Register a function with atexit(3) to close the KVM object if we have one open. o Show the unread portion of the kernel's message buffer before presenting the prompt. It's bound to provide some useful info. o Don't call kgdb_target() twice. It results in having all threads listed twice. MFC after: 1 week Notes: svn path=/head/; revision=148801
* Spell "currently" correctly.Giorgos Keramidas2005-07-281-1/+1
| | | | Notes: svn path=/head/; revision=148485
* kvm_openfiles() uses the supplied buffer for storing error messagesPeter Wemm2005-06-241-1/+0
| | | | | | | | | | | | in future calls, so we can't free it here. The right place to free the buffer would be to be after kvm_close(), but we don't do that yet. A static buffer would work too. Reviewed by: marcel (who has other plans for this anyway) Approved by: re Notes: svn path=/head/; revision=147570
* Add support for XMM registers in GDB for x86 processors that supportDoug Rabson2005-05-312-12/+112
| | | | | | | | | | SSE (or its successors). Reviewed by: marcel, davidxu MFC After: 2 weeks Notes: svn path=/head/; revision=146818
* Don't try to enable event reporting for core file, it is not writable.David Xu2005-05-061-0/+2
| | | | Notes: svn path=/head/; revision=145960
* Report events from thread library.David Xu2005-04-121-16/+210
| | | | Notes: svn path=/head/; revision=144923
* Print thread address.David Xu2005-04-051-4/+4
| | | | | | | PR: threads/76821 Notes: svn path=/head/; revision=144664
* Implement and document the -q and -f options with their correspondingMarcel Moolenaar2005-03-022-6/+46
| | | | | | | | | | long form (-quiet and -fullname resp.) Bump documentation date. PR: bin/78031 MFC after: 5 days Notes: svn path=/head/; revision=143046
* .It the -v option.David E. O'Brien2005-03-011-1/+1
| | | | Notes: svn path=/head/; revision=142954
* Restore r1.2 change to use TARGET_ARCH.Alexander Kabaev2005-02-201-1/+1
| | | | | | | Submitted by: kris Notes: svn path=/head/; revision=142154
* Attempt to make kgdb little more useful and easy to use. Properly initializeAlexander Kabaev2005-02-2010-25/+218
| | | | | | | | | | | it to recognise what ABI to use on amd64 (and possibly others) platform. Display PID and process name as a part of the 'info threads' output, TIDs alone are too confusing. Introduce new commmands 'tid <tid>' and 'proc <pid>' to accompany gdb's default 'thread <thread num>' to make the task of switching between different contexts easier. Notes: svn path=/head/; revision=142151
* Remove mention of the -k and -wcore options because they don'tMarcel Moolenaar2005-02-151-14/+0
| | | | | | | | | | | exist anymore. PR: doc/70943 Submitted by: Jun <junsu at delphij dot net> Reviewed by: delphij Notes: svn path=/head/; revision=141941
* Use the system gnuregex library vs. building GNU regex bits into libibertyDavid E. O'Brien2005-02-144-6/+11
| | | | | | | | | | and using them. Reviewed by: marcel,imp Desired by: ache Notes: svn path=/head/; revision=141911
* Markup nits.Ruslan Ermilov2005-01-131-4/+3
| | | | Notes: svn path=/head/; revision=140175
* When grabbing registers for an lwp, fake the inferior's pid using thePeter Edwards2005-01-111-2/+6
| | | | | | | | | | | | | | | | lwp ID before invoking the underlying target operation. For corefiles, we rely on gdb internals to do this, and it uses the pid as an index, rather than the lwpid, so previously, backtraces for multithreaded core files wasn't working correctly. For processes, we currently use ptrace directly, so fixup that code to also use the pid directly. Discussed With: marcel, davidxu MFC After: 4 days Notes: svn path=/head/; revision=140071
* Start the dreaded NOFOO -> NO_FOO conversion.Ruslan Ermilov2004-12-212-2/+2
| | | | | | | OK'ed by: core Notes: svn path=/head/; revision=139103
* Source changes to allow building a cross-debugger. Move solib.c andMarcel Moolenaar2004-12-0516-5/+29
| | | | | | | | | | | solib-svr4.c to the MD makefiles because they are native files for alpha and sparc64, but target files for amd64, i386 and ia64. Note that kgdb(1) does not yet build as a cross-debugger due to libkvm. Notes: svn path=/head/; revision=138383
* Fix previous commit. GDB_CROSS_DEBUGGER needs to be defined for allMarcel Moolenaar2004-12-052-9/+5
| | | | | | | subdirectories. Notes: svn path=/head/; revision=138380
* Makefile (only) changes to allow building a cross debugger.Marcel Moolenaar2004-11-3010-21/+50
| | | | Notes: svn path=/head/; revision=138215
* s/MACHINE_ARCH/TARGET_ARCH/. We use TARGET_ARCH to pick the MD filesMarcel Moolenaar2004-11-301-1/+1
| | | | | | | for libgdb and should do so here as well. Notes: svn path=/head/; revision=138213
* [Sorry, forgot to commit my source changes in my previous commit.]Joerg Wunsch2004-11-221-2/+5
| | | | | | | | | | | | | | | | | Document all options and general usage. Implement the -a option to bump the annotation_level. This improves the Emacs gud behaviour. You can now supply the following function (defun gud-gdb-massage-args (file args) (cons "-a" args)) (e.g. by evaluating it from the *scratch* buffer) and get the normal jump to the source window when browsing the stack. We should probably eventually supply our own kgdb submode to gud.el. Notes: svn path=/head/; revision=137993
* Document all options and general usage.Joerg Wunsch2004-11-221-0/+67
| | | | | | | | | | | | | | | Implement the -a option to bump the annotation_level. This improves the Emacs gud behaviour. You can now supply the following function (defun gud-gdb-massage-args (file args) (cons "-a" args)) (e.g. by evaluating it from the *scratch* buffer) and get the normal jump to the source window when browsing the stack. We should probably eventually supply our own kgdb submode to gud.el. Notes: svn path=/head/; revision=137992
* Fix the abuse of Ar macros for designating flag options, use Fl instead.Joerg Wunsch2004-11-221-4/+4
| | | | Notes: svn path=/head/; revision=137990
* Always set current thread when activating thread debugger,David Xu2004-11-151-1/+1
| | | | | | | | the current thread may already be added by fbsd_find_new_threads, this can result that current thread is not set correctly. Notes: svn path=/head/; revision=137731
* Whitespace fix.Marcel Moolenaar2004-11-091-1/+1
| | | | Notes: svn path=/head/; revision=137441
* Prepare for a subsequent import: If the first letter of the filenameMarcel Moolenaar2004-11-091-35/+43
| | | | | | | | | | | | | | changes, start on a new line. Insertion of a filename will keep the diff limited to the block of filenames that have the same first letter instead of creating a huge diff. While here, move remote.c after the remote-*.c files and move tui.c after the tui-*.c files. This matches the order of ls(1) and makes it easier to compare object files created by a stock gdb(1) build with the list of files we have here. This is a non-functional change only. Notes: svn path=/head/; revision=137440
* For variables that are only checked with defined(), don't provideRuslan Ermilov2004-10-242-2/+2
| | | | | | | any fake value. Notes: svn path=/head/; revision=136910
* Update to readline 5.0Andrey A. Chernov2004-10-181-3/+7
| | | | Notes: svn path=/head/; revision=136661
* If the argument to the -r flag starts with a ':' or a '|', don't try toBrooks Davis2004-09-031-1/+1
| | | | | | | | | | | | make sure it is a device. GDB special cases these prefixes and treats :#### as a tcp port on localhost and executes what ever follows '|'. This allows kgdb to debug via dconschat. Discussed with: marcel Notes: svn path=/head/; revision=134686
* Only compile fbsd-thread.c on amd64 and i386, other architecturesDavid Xu2004-08-221-1/+5
| | | | | | | have not been tested yet. Notes: svn path=/head/; revision=134154
* Fix comments, most are style fix.David Xu2004-08-221-21/+11
| | | | Notes: svn path=/head/; revision=134152
* Fix some text messages.David Xu2004-08-221-2/+2
| | | | Notes: svn path=/head/; revision=134149
* Add code to support statically linked binary and .core file of threadedDavid Xu2004-08-221-177/+367
| | | | | | | program. Notes: svn path=/head/; revision=134147
* Improve the usage. Without any arguments, kgdb(1) works on /dev/memMarcel Moolenaar2004-08-152-49/+126
| | | | | | | | | | | | with the currently running kernel image. Otherwise, one of -c, -n or -r is expected for working on a particular core file (-c), working on a saved dump (-n) or working remotely (-r). When working on a saved dump, a kernel may be omitted. For a remote debugging session (-r), kgdb(1) will use the specified device. Notes: svn path=/head/; revision=133739
* Initialize thread_db module.David Xu2004-08-101-0/+2
| | | | Notes: svn path=/head/; revision=133432
* Initialize thread_db module.David Xu2004-08-081-0/+2
| | | | Notes: svn path=/head/; revision=133346
* 1. Add some code check if thread suspending or resuming is failed.David Xu2004-08-082-4/+80
| | | | | | | 2. Add code to retrieve thread tls address. Notes: svn path=/head/; revision=133345
* Hook kgdb into the build.Marcel Moolenaar2004-07-251-1/+1
| | | | Notes: svn path=/head/; revision=132625
* Add the beginnings of kernel debugging support. the kgdb(1) toolMarcel Moolenaar2004-07-2511-0/+1089
| | | | | | | | | | | | | | | | | | | | | | | | is basicly a shell on top of libgdb that knows about kernel threads, kernel modules and kvm(3). As the word "beginnings" implies, not all of the features have been implemented yet. The tool is useful and I'd like feedback on the taken route. The simplest way to debug a kernel core file is: kgdb -n 0 This opens /var/crash/vmcore.0 with the corresponding kernel in the object directory (kernel.debug is used if it exists). Typical things that need to be added are: o Auto loading of kernel modules, o Handling of trapframes so that backtraces can be taken across them, o Some fancy commands to extract useful information out of a core file, o Various (probably many) other things. Notes: svn path=/head/; revision=132624
* o ps_pd{read|write} and ps_pt{read|write} are obsolete interfaceMarcel Moolenaar2004-07-171-22/+2
| | | | | | | | functions. Only ps_p{read|write} remains. o Remove ps_getpid. We don't need it now. Notes: svn path=/head/; revision=132300
* ptrace's first parameter is command not pid. pointy hat to me.David Xu2004-07-161-2/+6
| | | | Notes: svn path=/head/; revision=132244
* Update config.h to account for the prgregset_t and psaddr_t typesMarcel Moolenaar2004-07-165-10/+10
| | | | | | | | | that have been added to <sys/procfs.h>. This change has no effect because the source file that would be affected is not compiled on FreeBSD. Hence, this is for completeness only. Notes: svn path=/head/; revision=132238