* gdb script merged
@ 2011-11-13 22:18 Vladimir 'φ-coder/phcoder' Serbinenko
2011-11-14 22:08 ` Vladimir 'φ-coder/phcoder' Serbinenko
0 siblings, 1 reply; 2+ messages in thread
From: Vladimir 'φ-coder/phcoder' Serbinenko @ 2011-11-13 22:18 UTC (permalink / raw)
To: The development of GRUB 2, Lubomir Rintel
[-- Attachment #1.1: Type: text/plain, Size: 1211 bytes --]
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
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1.2: gdb-install.diff --]
[-- Type: text/x-diff; name="gdb-install.diff", Size: 2172 bytes --]
=== 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;
};
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 294 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: gdb script merged
2011-11-13 22:18 gdb script merged Vladimir 'φ-coder/phcoder' Serbinenko
@ 2011-11-14 22:08 ` Vladimir 'φ-coder/phcoder' Serbinenko
0 siblings, 0 replies; 2+ messages in thread
From: Vladimir 'φ-coder/phcoder' Serbinenko @ 2011-11-14 22:08 UTC (permalink / raw)
To: The development of GRUB 2, Lubomir Rintel
[-- Attachment #1: Type: text/plain, Size: 1486 bytes --]
I've created a branch "gdb" for gdb-serial stub. It doesn't all work
nice and round (especially if you connect debugger before launching
stub) but is useful
On 13.11.2011 23:18, Vladimir 'φ-coder/phcoder' Serbinenko wrote:
> 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
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 294 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2011-11-14 22:08 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-11-13 22:18 gdb script merged Vladimir 'φ-coder/phcoder' Serbinenko
2011-11-14 22:08 ` Vladimir 'φ-coder/phcoder' Serbinenko
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).