summaryrefslogtreecommitdiffstats
path: root/gnu/usr.bin/binutils/gdb/kvm-fbsd.c
Commit message (Collapse)AuthorAgeFilesLines
* Follow existing GDB style for frame_info vars.obrien2004-01-261-5/+5
|
* Remove trailing white space.obrien2004-01-261-5/+5
|
* Attempt to automatically read in kernel module symbols when a liveiedowse2003-03-211-1/+30
| | | | | | | | | | | | | | | | | | | | | | | | or dead kernel core is loaded into gdb. This extends gdb's existing shared library support, so the "info sharedlibrary", "sharedlibrary" and "nosharedlibrary" commands can be used to view and change the list of loaded symbol files. The current implementation is more than a kludge however, and it will not always manage to find the .ko.debug file corresponding to the loaded module. In particular, for modules whose build directory cannot be easily guessed from the module name such as all the netgraph modules, the debug version of the .ko will not be found automatically. The logic for finding the module file first attempts to guess at the module build directory by parsing the version[] string. Then using that directory ($DIR), it tries the following paths in turn: ./<module>.ko.debug ./<module>.ko $DIR/<module>.ko.debug $DIR/<module>.ko /boot/kernel/<module>.ko.debug /boot/kernel/<module>.ko Approved by: obrien, mp
* Add support for sparc64 kernel debugging.mp2002-10-211-5/+64
| | | | Submitted by: tmm
* Fix function parameter lists to be correct and eliminate compiler warnings.mp2002-10-121-3/+4
|
* Stop using 3 distinct and far varied coding styles in a single file.obrien2002-09-181-280/+277
| | | | Pretend to actually adhere to the GNU coding standards.
* Recognize frames for lcall_syscall and int0x80_syscall.peter2002-07-281-2/+4
| | | | Reminded by: bde
* Stop trying to reimplement libkvm on i386. Instead use it directly andobrien2002-07-101-824/+422
| | | | | | consistently on all platforms. Submitted by: gallatin
* Dike out bits specific to i386. This pretty much means no kgdb forobrien2002-06-301-10/+34
| | | | | | | non-i386 platforms. I would however like to see a shared file here. If a function or two cannot be shared we should create ${TARGET_ARCH}/kvm-fbsd-${TARGET_ARCH}.c.
* Bmake bits for GDB 5.2.obrien2002-06-291-3/+15
|
* phsyical -> physicalbde2002-05-271-1/+1
| | | | Submitted by: Andre Guibert de Bruet <andy@siliconlandmark.com>
* Add missing &peter2002-02-081-1/+1
|
* Make this part compile and try and use the p_threads tailq. It might workpeter2002-02-081-2/+7
| | | | but I am not sure, I haven't been able to compile the rest of gdb yet.
* Catch up to the globaldata -> pcpu changes.jhb2001-12-121-10/+10
|
* *** empty log message ***peter2001-12-111-4/+22
|
* Compensate for "Compensate for header dethreading" by backing it out.bde2001-10-101-1/+0
|
* Remove the Xresume* labels from the i386 interrupt handlers; theiedowse2001-10-091-2/+5
| | | | | | | | | | | | | | | | | | code in ipl.s and icu_ipl.s that used them was removed when the interrupt thread system was committed. Debuggers also knew about Xresume* because these labels hide the real names of the interrupt handlers (Xintr*), and debuggers need to special-case interrupt handlers to get the interrupt frame. Both gdb and ddb will now use the Xintr* and Xfastintr* symbols to detect interrupt frames. Fast interrupt frames were never identified correctly before, so this fixes the problem of the running stack frame getting lost in a ddb or gdb trace generated from a fast interrupt - e.g. when debugging a simple infinite loop in the kernel using a serial console, the frame containing the loop would never appear in a gdb or ddb trace. Reviewed by: jhb, bde
* Catch up with the SMPng reduced interrupt frame size. The correspondingiedowse2001-10-081-1/+1
| | | | | | change was made to DDB months ago (i386/i386/db_trace.c revision 1.37). Reviewed by: bde
* Don't try to dereference a kernel pointer in userland; use offsetof()fenner2001-09-191-1/+1
| | | | | | | | to get the right address. This fixes kernel GDB after KSE2. Reviewed by: jhb, jake
* KSE Milestone 2julian2001-09-121-5/+9
| | | | | | | | | | | | | | Note ALL MODULES MUST BE RECOMPILED make the kernel aware that there are smaller units of scheduling than the process. (but only allow one thread per process at this time). This is functionally equivalent to teh previousl -current except that there is a thread associated with each process. Sorry john! (your next MFC will be a doosie!) Reviewed by: peter@freebsd.org, dillon@freebsd.org X-MFC after: ha ha ha ha
* Dynamically adapt to kernbase changes on crashdumps, falling back topeter2001-08-241-1/+19
| | | | KERNBASE if the "kernbase" symbol is not present on older kernels.
* Define _KERNEL as this grubs around where no userland should go.obrien2001-08-161-0/+2
|
* Compensate for dethreaded headers.markm2001-05-011-0/+1
| | | | (I have no religion about how this was done. Follow-up commits welcome)
* - Add #defines for the symbol names of the kernel interrupt, systemjake2001-01-101-29/+47
| | | | | | | | | | call and trap entry points so they're easy to find and change - Use the cpuhead and allcpu list to locate globaldata for the current cpu, rather than SMP_prvspace or __globaldata - Use offsets into struct globaldata directly to find per-cpu variables, rather than symbols in globals.o Glanced at by: peter
* Fix gdb -k after jake's most recent commit. The gd_XXX symbols are nowpeter2001-01-071-1/+1
| | | | | offsets in all cases, and we have to find the base address (&__globaldata) ourselves for the UP case as well as SMP.
* Use macro API to <sys/queue.h>phk2000-12-311-1/+1
| | | | | Submitted by: Dima Dorfman <dima@unixfreak.org> Reviewed by: phk
* Catch up to the new kinfo_proc.jhb2000-12-121-2/+2
|
* Add `_PATH_DEVZERO'.obrien2000-12-091-1/+4
| | | | Use _PATH_* where where possible.
* * Add bmake framework for using gdb alongside binutils. The old bmakedfr1999-05-021-42/+19
| | | | | framework was repository copied from gnu/usr.bin/gdb. * Add alpha support.
* Make gdb work with kernel after the SMP vmspace sharing changes.luoqi1999-04-281-12/+73
|
* Fixed printf format errors.bde1998-06-301-2/+2
|
* Don't attempt to read process context from the kernel when (thebde1998-05-121-2/+2
| | | | | | kernel's) curproc is null. This fixes endless recursion in xfer_umem() for attempts to read from user addresses, in particular for attempts to read %fs and %gs from the pcb for `info reg'.
* Fixed printing of %fs and %gs for live kernels.bde1998-02-131-6/+8
| | | | | Only print the current pcb on startup. Printing it every time a utility routine was called messed up the register dump for live kernels.
* Fixed accesses to addresses between VM_MAXUSER_ADDRESS (normallybde1998-01-191-12/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | 0xefbfe000) and kernel_start (normally 0xf0100000). Things are unnecessarily (?) difficult because procfs is used to access user addresses in the live-kernel case although we must have access to /dev/mem to work at all, and whatever works for the dead-kernel case should work in all cases (modulo volatility of live kernel variables). We used the wrong range [0, kernel_start) for user addresses. Procfs should only work up to VM_MAXUSER_ADDRESS, but it bogusly works for reads up to the address 2 pages higher (the user area, including the kernel stack, is mapped to where the user area used to be (WTUAUTB)). Procfs can not work at all for addresses between WTUAUTB and kernel_start. Now we use procfs only to access addresses up to VM_MAXUSER_ADDRESS. Higher addresses are translated normally using kvtophys(), so the user ptd is used for addresses below the real kernel start (0xf0000000; see INKERNEL()) and nothing is found WTUAUTB. Strange accesses that cross the user-kernel boundary are now handled, but such ranges are currently always errors because they necessarily overlap the hole WTUAUTB. Short reads are still not handled.
* Removed `kstack' and associated mistranslations in kvtophys().bde1998-01-191-18/+1
| | | | | | | | | | | | | | | Correct translations would have been null. However, kstack was the top of the kernel stack instead of the base of the kernel stack like it was when the kernel exported it, so the area above the kernel stack was mistranslated and the kernel stack was not translated. This bug was depended on to compensate for the wrong value of kstack - to read the pcb, instead of just using the address of the pcb, we used the mistranslated address of kstack, which happened to be the same (curpcb = kstack - 0x2000). This area is simpler than it used to be now that the kernel stack address is per-process. The code still seems to be more complicated than necessary - the `found_pcb == 0' case seems to be unused.
* Fixed endless loop for `p/x *(int *)0xf0000000'. kvm_uread() inbde1998-01-181-7/+10
| | | | | | | | | | gdb was cloned from the buggy version of kvm_uread() in libkvm and had the same bugs. It looped endlessly on EOF and checked errno without setting it in the lseek() error check. The first bug caused gdb to loop endlessly for reads from addresses between the end of the user area and the start of the kernel text. kvm_uread() should not be used for addresses beyond the end of the user area, but is due to bugs elsewhere.
* Don't override FRAME_CHAIN(). If the current frame is valid, thenbde1998-01-181-38/+0
| | | | | | | | | | | | | | | | | | the previous frame is in the usual place even for traps, interrupts and syscalls in the kernel, because the assembly language stubs don't change the frame pointer. The previous frame is just not for the calling function. We may as well depend on this as on magic to determine the trap frame address. The magic is in FRAME_SAVED_PC() which elides the correct number of stubs (1) to go back to a pc that matches the previous frame. Removing fbsd_kern_frame_chain() fixes bugs in it. Xsyscall was misspelled as _Xsyscall (gdb removes one leading underscore), so the tf_syscall frame type was never found. This was harmless because tf_normal works in all cases in fbsd_kern_frame_chain() and Xsyscall is spelled correctly in fbsd_kern_frame_saved_pc() where it matters. There were style bugs on almost every line, starting with a primary indent of 7.
* Pass the system name to dmesg. Rev.1.7 only works when the symbols inbde1998-01-171-2/+9
| | | | /kernel aren't too different form those in the kernel being debugged.
* Exec dmesg and awk to print everything in the message bufferbde1997-12-191-1/+10
| | | | | | | | following "panic:" or "Fatal trap". `panicstr' is still printed, although it is redundant if there is a valid message buffer and incomplete if it contains `%'s. I think the awk command belongs here and not in a script since a standard format with complete messages is good for bug reports.
* #include <machine/tss.h> explicitlypeter1997-10-101-0/+1
|
* Support 4MB pages.bde1997-07-271-8/+23
|
* Support reading and writing of %fs and %gs (except from core files).bde1997-06-071-1/+3
|
* Fetch the registers from struct members in the pcb instead ofbde1997-04-301-28/+19
| | | | | | | | | | | | | | | punning the pcb to an array of ints and using magic indices to access values in it. This should prevent silent breakage from changes in the pcb. Supply 0 for unavailable registers instead of punning the tss to an array of ints and using magic indices to access garbage values in it. (The registers are in the pcb; there is nothing interesting in the tss. This should change someday. At least for dumps, all the registers should be saved, and common_tss is a good place to put them.) Removed ancient wrong (disabled) method for reading eip.
* change kvm-fbsd.c so that kernel debugging works again.gj1997-04-271-8/+19
| | | | | | document the -k and -wcore options in the manpage. change Makefile to use a local copy of the manpage.
* changes required in the gdb directory for making gdbgj1997-01-151-0/+941
using the sources in /usr/src/contrib/gdb. This is based on /usr/ports/devel/gdb. 2.2 candidate ?
OpenPOWER on IntegriCloud