Many targets, such as EFI, load GRUB at addresses that are determined at
runtime. So the load addresses in kernel.exec will almost certainly be
wrong. Given the address of the start of the text segment, these
functions will tell GDB to load the symbols at the proper locations. It
is left up to the
There are broadly two classes of targets to consider when loading symbols
for GRUB, targets that determine where to load GRUB at runtime
(dynamically positioned) and those that do not (statically positioned).
For statically poisitioned targets, symbol loading is determined at link
time, so nothing
On some platforms, notably x86, software breakpoints set in GDB before
the GRUB image is loaded will be cleared when the image is loaded. This
is because the breakpoints work by overwriting the memory of the break-
point location with a special instruction which when hit will cause the
debugger to
An error in any GDB command causes it to immediately abort with an error,
this includes any command that calls that command. This leads to an issue
in dump_module_sections where an error causes the command to exit without
turning off file redirection. The user then ends up with a GDB command
line w
This prevents load_all_modules from failing when called before any
modules have been loaded. Failures in GDB user-defined functions cause
any function which called them to also fail.
Signed-off-by: Glenn Washburn
---
grub-core/gdb_grub.in | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
If the configure option --enable-efi-debug is given, then enable the
printing early in EFI startup of the command needed to load symbols for
the GRUB EFI kernel. This is needed because EFI firmware determines where
to load the GRUB EFI at runtime, and so the relevant addresses are not
known ahead o
Debugging GRUB can be tricky and require arcane knowledge. This will
help those unfamiliar with the process to get started debugging GRUB
with less effort.
Signed-off-by: Glenn Washburn
---
docs/grub-dev.texi | 233 +
1 file changed, 233 insertions(+)
This series has been substantially rewritten since v4, although a large
minority of the patches haven't changed much. The biggest change is
that the implementation has been converted to Python instead of what was
done in shell script. I have always felt it should be done in Python, but
it seemed da
Add symbols for boot.image, disk.image, and lzma_decompress.image if the
target is i386-pc. This is only done for i386-pc because that is the only
target that uses the images. By loading the symbols for these images,
these images can be more easily debugged by allowing the setting of break-
points
Remove gmodule.pl and rewrite as a python in gdb_helper.py. This removes
PERL dependency for the GRUB GDB script, but adds Python as a dependency.
This is more desirable because Python is tightly integrated with GDB and
can do things not even available to GDB native scripting language. GDB must
be
By moving this code into a function, it can be run re-utilized while gdb is
running, not just when loading the script. This will also be useful in
some following changes which will make a separate script path for targets
which statically vs dynamically position GRUB code.
Signed-off-by: Glenn Wash
The gdb_grub script was originally meant to be run once when GDB first
starts up via the -x argument. So it runs commands unconditionally
assuming that the script has not been run before. Its nice to be able
to source the script again when developing the script to modify/add
commands. So only run t
A new command, run_on_start, for things to do when just before GRUB starts
executing. Currently, this is setting up the loading of module symbols as
they are loaded and allowing user-defined script to be run if a command
named "onstart" exists. A thbreak, temporary hardware breakpoint, is used
beca
This will let users know that the GDB session is using the GRUB gdb scripts.
Signed-off-by: Glenn Washburn
---
grub-core/gdb_helper.py.in | 4
1 file changed, 4 insertions(+)
diff --git a/grub-core/gdb_helper.py.in b/grub-core/gdb_helper.py.in
index 8d5ee1d292..5ed9eab0f5 100644
--- a/grub
GDB logging is redirected to write .segments.tmp, which means that GDB
will wrap lines longer than what it thinks is the screen width
(typically 80 characters). When wrapping does occur it causes gmodule.pl
to misbehave. So disable line wrapping by using GDB's "with" command so
that its guaranteed
On Fri, 23 Dec 2022 19:54:47 -0600
Glenn Washburn wrote:
> On Fri, 02 Dec 2022 17:11:23 +
> Maxim Fomin wrote:
>
> > --- Original Message ---
> > On Friday, December 2nd, 2022 at 0:00, Glenn Washburn
> > wrote:
> > > I'm now compiling this patch and found a few compile issues below
On Fri, 02 Dec 2022 17:11:23 +
Maxim Fomin wrote:
> --- Original Message ---
> On Friday, December 2nd, 2022 at 0:00, Glenn Washburn
> wrote:
> > I'm now compiling this patch and found a few compile issues below.
> > You're compile testing this right?
>
> First versions of the patch
On Thu, 22 Dec 2022 19:17:31 +0100
Daniel Kiper wrote:
> On Wed, Dec 21, 2022 at 11:57:33AM -0600, Glenn Washburn wrote:
> > On Wed, 21 Dec 2022 16:20:17 +0100
> > Daniel Kiper wrote:
> >
> > > Adding Robbie...
> > >
> > > Please CC him next time when you post these patches. I would want
> > > t
On 2022/12/24 00:44, Zhang Boyang wrote:
- || grub_dl_check_version (mod, e)
+ || (1||grub_dl_check_version (mod, e))
Oh, there is a small error, it should be:
- || grub_dl_check_version (mod, e)
+ || (0 && grub_dl_check_version (mod, e))
Best Regards,
Zhang Boyang
__
Hi,
On 2022/12/23 21:07, Pete Batard wrote:
On 2022.12.23 07:18, Zhang Boyang wrote:
This feature is implemented in kern/dl.c in core.img, which is UNDER
YOUR CONTROL.
Let me analyze the worst case from your perspective:
1) Every distro is enforcing version check, even in BIOS mode.
2) Beca
On 2022.12.23 07:18, Zhang Boyang wrote:
This feature is implemented in kern/dl.c in core.img, which is UNDER
YOUR CONTROL.
Let me analyze the worst case from your perspective:
1) Every distro is enforcing version check, even in BIOS mode.
2) Because this check is in kern/dl.c, there is no su
Hi,
On 2022/12/22 14:31, Glenn Washburn wrote:
On Wed, 21 Dec 2022 20:11:57 +0800
Zhang Boyang wrote:
+ grub_printf_ (N_("warning: module %.63s has incorrect version:
%.63s != %s\n"),
+ mod->name, modver, PACKAGE_VERSION);
I don't quite like this, but I could live with
22 matches
Mail list logo