Hello, all. Looking though archives I found old script by Lubomir Rintel for gdb. I integrated it into our build system and committed, now you just have to run gdb -x gdb_grub from grub-core directory. It's limited to platforms with predefined load address, so *-efi is excluded but all others platforms should work, didn't test it with anything else than i386-pc though. At first I wanted to install it as well but then I noticed that it has an important problem: - It uses insecure temporary files. While fine if you own current directory (like grub-core), it has to use mktemp if to be installed globally. - I don't know how to implement the logic "check if kernel.exec is in ., if so use it, otherwise use @platformdir@/kernel.exec" in gdb scripts. Note: @platformdir@ is expanded by automake. Also I would prefer script to be less chatty and use python but it's not very important. I attach a simple patch to install those scripts if needed. Also there is a serial-gdb patch in same series, while also interesting it would need more work (and can be integrated with my another work for backtracing on grub_fatal and exceptions)
-- Regards Vladimir 'φ-coder/phcoder' Serbinenko
=== modified file 'conf/Makefile.common'
--- conf/Makefile.common 2011-05-15 00:23:36 +0000
+++ conf/Makefile.common 2011-11-13 22:10:21 +0000
@@ -152,6 +152,8 @@
grubconf_SCRIPTS =
noinst_LIBRARIES =
dist_noinst_DATA =
+platform_SCRIPTS =
+platform_PROGRAMS =
TESTS =
EXTRA_DIST =
=== modified file 'gentpl.py'
--- gentpl.py 2011-10-16 09:53:27 +0000
+++ gentpl.py 2011-11-13 22:10:21 +0000
@@ -356,7 +356,7 @@
def module(platform):
r = set_canonical_name_suffix(".module")
- r += gvar_add("noinst_PROGRAMS", "[+ name +].module")
+ r += gvar_add("platform_PROGRAMS", "[+ name +].module")
r += gvar_add("MODULE_FILES", "[+ name +].module$(EXEEXT)")
r += var_set(cname() + "_SOURCES", platform_sources(platform) + " ## platform sources")
@@ -384,7 +384,7 @@
def kernel(platform):
r = set_canonical_name_suffix(".exec")
- r += gvar_add("noinst_PROGRAMS", "[+ name +].exec")
+ r += gvar_add("platform_PROGRAMS", "[+ name +].exec")
r += var_set(cname() + "_SOURCES", platform_startup(platform))
r += var_add(cname() + "_SOURCES", platform_sources(platform))
r += var_set("nodist_" + cname() + "_SOURCES", platform_nodist_sources(platform) + " ## platform nodist sources")
@@ -409,7 +409,7 @@
def image(platform):
r = set_canonical_name_suffix(".image")
- r += gvar_add("noinst_PROGRAMS", "[+ name +].image")
+ r += gvar_add("platform_PROGRAMS", "[+ name +].image")
r += var_set(cname() + "_SOURCES", platform_sources(platform))
r += var_set("nodist_" + cname() + "_SOURCES", platform_nodist_sources(platform) + "## platform nodist sources")
r += var_set(cname() + "_LDADD", platform_ldadd(platform))
=== modified file 'grub-core/Makefile.core.def'
--- grub-core/Makefile.core.def 2011-11-13 21:59:46 +0000
+++ grub-core/Makefile.core.def 2011-11-13 22:11:07 +0000
@@ -19,13 +19,13 @@
};
script = {
- installdir = noinst;
+ installdir = platform;
name = gmodule.pl;
common = gmodule.pl.in;
};
script = {
- installdir = noinst;
+ installdir = platform;
name = gdb_grub;
common = gdb_grub.in;
};
signature.asc
Description: OpenPGP digital signature
_______________________________________________ Grub-devel mailing list [email protected] https://lists.gnu.org/mailman/listinfo/grub-devel
