GDB Macros to ease debugging modules
PATCH 1/1 GDB Macros to ease debugging modules
Hi,
So these files are meant to be in conjunction with either QEMU or GDB. They provide macros that will help mapping symbol files to appropriate addresses. The grub.gdb file contains inline documentation, I plan on either updating wiki documentation [1] or texinfo documentation in case anyone's already working on it.
[1] http://grub.enbug.org/DebuggingWithGDB
For now, given the GDB's way of to looking up symbol files and ability I am aware of and missing abilities to pass the resolved paths to the program that's exec'd, gmodule.pl has to reside at the same directory as symbol files and that should be GDB's working directory as well. That directory is the build directory, which is often the source directory.
Needless to say, this needs preservance of unstripped elf files, which means these [2] modifications to genmk.rb.
[2] http://lists.gnu.org/archive/html/grub-devel/2008-04/msg00080.html
2008-05-06: Lubomir Rintel <[email protected]>
* .gdbinit: New file.
* grub.gdb: New file.
* gmodule.pl: New file.
Signature · 2 lines
Lubomir Rintel (Was: Kundrak) http://v3.sk/~lkundrak/
2008-05-06: Lubomir Rintel <[email protected]>
* .gdbinit: New file.
* grub.gdb: New file.
* gmodule.pl: New file.
.gdbinit new file +2 -0
@@ -0,0 +1,2 @@ +# Put your GDB initialization commands here +source grub.gdb
grub.gdb new file +109 -0
109 lines not on this page · raw message
gmodule.pl new file +52 -0
52 lines not on this page · raw message
Review
Quoted 2 lines · Lubomir Rintel
(quoted diff) +2
-0+# GRUB -- GRand Unified Bootloader +# Copyright (C) 2003,2004,2005,2006,2007,2008 Free Software Foundation, Inc.
Where does this code originate? I don't recall seeing any perl in GRUB before. GDB maybe?
Signature · 5 lines
Robert Millan <GPLv2> I know my rights; I want my phone call! <DRM> What use is a phone call… if you are unable to speak? (as seen on /.)
Quoted 6 lines · Robert Millan
Review
Quoted 2 lines · Lubomir Rintel
(quoted diff) +2
-0+# GRUB -- GRand Unified Bootloader +# Copyright (C) 2003,2004,2005,2006,2007,2008 Free Software Foundation, Inc.Where does this code originate? I don't recall seeing any perl in GRUB before. GDB maybe?
I just blindly copied that and forgot to adjust the years. It is my original work. Fixed.
Signature · 2 lines
Lubomir Rintel (Was: Kundrak) http://v3.sk/~lkundrak/