]> git.ipfire.org Git - thirdparty/grub.git/commit
gdb: Add gdbinfo command for printing the load address of the EFI application
authorGlenn Washburn <development@efficientek.com>
Thu, 1 Jun 2023 04:25:55 +0000 (23:25 -0500)
committerDaniel Kiper <daniel.kiper@oracle.com>
Thu, 1 Jun 2023 10:10:04 +0000 (12:10 +0200)
commitc016a969d1eb59701face9ba14c19d67540f7037
tree3ff5dcd90f31253a1b02381793b135dca7d24e71
parentdb1d70f2f3039e9fad1ad18bd466799d76b1ccc3
gdb: Add gdbinfo command for printing the load address of the EFI application

EFI firmware determines where to load the GRUB EFI at runtime, and so the
addresses of debug symbols are not known ahead of time. There is a command
defined in the gdb_grub script which will load the debug symbols at the
appropriate addresses, if given the application load address for GRUB.
So add a command named "gdbinfo" to allow the user to print this GDB command
string with the application load address on-demand. For the outputted GDB
command to have any effect when entered into a GDB session, GDB should have
been started with the script as an argument to the -x option or sourced into
an active GDB session before running the outputted command.

Documentation for the gdbinfo command is also added.

Co-developed-by: Peter Jones <pjones@redhat.com>
Signed-off-by: Peter Jones <pjones@redhat.com>
Signed-off-by: Glenn Washburn <development@efficientek.com>
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
docs/grub.texi
grub-core/Makefile.core.def
grub-core/kern/efi/debug.c [new file with mode: 0644]
grub-core/kern/efi/efi.c
grub-core/kern/efi/init.c
include/grub/efi/debug.h [new file with mode: 0644]
include/grub/efi/efi.h