[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH] Remote GDB debugging stub (for i386)
From: |
Lubomir Rintel |
Subject: |
[PATCH] Remote GDB debugging stub (for i386) |
Date: |
Thu, 01 May 2008 15:12:25 +0200 |
Re-sending the GDB stub patch. The GDB protocol part, though being
largely rewritten, originates from GDB source tarball, which refers to
it as a Public Domain code.
Applies against today's CVS.
Is not much of use without debugging symbols, part 2 of patch [1]
preserves those. Neither is it of much use without being able to resolve
load addresses of modules, I will submit the GDB scripts shortly.
[1] http://lists.gnu.org/archive/html/grub-devel/2008-04/msg00080.html
Note that I found this hunk [2] lying around from 2006 when I wrote this
on NetBSD. I am not completely sure what does it do, but the changelog
from then suggests, that "grub_gdb_trapvec" from the gdb module was for
some reason resolved to 0 instead of its actual address. It might have
been dependent on the toolchain used, as I am not able to reproduce the
behavior on current Fedora 9.
[2] http://pastebin.com/f5c791966
2008-05-01: Lubomir Rintel <address@hidden>
* conf/i386-pc.rmk: Add gdb module to the list of modules to be built.
* term/i386/pc/serial.c (serial_hw_put): Let some useful serial
driver functions be exported.
(grub_serial_getkey): Likewise
* kern/dl.c (grub_dl_resolve_symbols): Let the trapvec symbol be
resolved correctly (instead of 0).
* kern/i386/pc/startup.S: (prot_idt) Add region descriptor to hold
protected mode IDT.
(real_idt) IDT region dsecriptor that works in real mode
(real_to_prot) Load protected mode idt IDT when returning to
protected mode.
* kern/i386/realmode.S: (prot_to_real) Save protected mode IDT and load
real mode one before switching to real mode.
* gdb/cstub.c: New file.
* gdb/gdb.c: New file.
* gdb/i386/idt.c: New file.
* gdb/i386/signal.c: New file.
* gdb/i386/machdep.S: New file.
* include/grub/gdb.h: New file.
* include/grub/i386/gdb.h: New file.
* include/grub/i386/pc/kernel.h: New file.
--
Lubomir Rintel (Was: Kundrak)
grub2-gdb-stub-v3.patch
Description: Text Data
- [PATCH] Remote GDB debugging stub (for i386),
Lubomir Rintel <=