From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from list by lists.gnu.org with archive (Exim 4.71) id 1RPiNe-0004Pg-Qo for mharc-grub-devel@gnu.org; Sun, 13 Nov 2011 17:18:26 -0500 Received: from eggs.gnu.org ([140.186.70.92]:41551) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RPiNb-0004PV-OE for grub-devel@gnu.org; Sun, 13 Nov 2011 17:18:24 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RPiNa-0000Yi-Gl for grub-devel@gnu.org; Sun, 13 Nov 2011 17:18:23 -0500 Received: from mail-bw0-f41.google.com ([209.85.214.41]:41780) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RPiNa-0000SF-7A for grub-devel@gnu.org; Sun, 13 Nov 2011 17:18:22 -0500 Received: by bke17 with SMTP id 17so4910164bke.0 for ; Sun, 13 Nov 2011 14:18:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:subject :x-enigmail-version:content-type; bh=XlZ/tJTjqBtNQihLBjSFAcNtfapJlMG/eRkSu9d4JH0=; b=VgAJYnZFgPlwD2tBImuFrViMh+mwEFsH1DkYd0hVG9UOMxcBoAEq1Ii6m/sl6LbF36 EcLkTaorNA2KEb6C7jRL9SxD1R+l1Cg6e3LczRVt3iP3INj5ZSBSR5ElFrIhlQ9xfV8w +XZzBj4sXtB3zWtxMSrulDmlPL7wZUym8a1v0= Received: by 10.204.143.148 with SMTP id v20mr8859310bku.104.1321222700513; Sun, 13 Nov 2011 14:18:20 -0800 (PST) Received: from debian.x201.phnet (251-51.62-81.cust.bluewin.ch. [81.62.51.251]) by mx.google.com with ESMTPS id e8sm27929895bkd.7.2011.11.13.14.18.17 (version=TLSv1/SSLv3 cipher=OTHER); Sun, 13 Nov 2011 14:18:19 -0800 (PST) Message-ID: <4EC04228.6020906@gmail.com> Date: Sun, 13 Nov 2011 23:18:16 +0100 From: =?UTF-8?B?VmxhZGltaXIgJ8+GLWNvZGVyL3BoY29kZXInIFNlcmJpbmVua28=?= User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.23) Gecko/20111010 Iceowl/1.0b2 Icedove/3.1.15 MIME-Version: 1.0 To: The development of GRUB 2 , Lubomir Rintel Subject: gdb script merged X-Enigmail-Version: 1.1.2 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="------------enig8FFB24CCBA9BBAEB8277C9A2" X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 209.85.214.41 X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: The development of GNU GRUB List-Id: The development of GNU GRUB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 13 Nov 2011 22:18:24 -0000 This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig8FFB24CCBA9BBAEB8277C9A2 Content-Type: multipart/mixed; boundary="------------010108030502070203090502" This is a multi-part message in MIME format. --------------010108030502070203090502 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable 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) --=20 Regards Vladimir '=CF=86-coder/phcoder' Serbinenko --------------010108030502070203090502 Content-Type: text/x-diff; name="gdb-install.diff" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="gdb-install.diff" =3D=3D=3D 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 =3D noinst_LIBRARIES =3D dist_noinst_DATA =3D +platform_SCRIPTS =3D +platform_PROGRAMS =3D =20 TESTS =3D EXTRA_DIST =3D =3D=3D=3D 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 =3D set_canonical_name_suffix(".module") =20 - r +=3D gvar_add("noinst_PROGRAMS", "[+ name +].module") + r +=3D gvar_add("platform_PROGRAMS", "[+ name +].module") r +=3D gvar_add("MODULE_FILES", "[+ name +].module$(EXEEXT)") =20 r +=3D var_set(cname() + "_SOURCES", platform_sources(platform) + " = ## platform sources") @@ -384,7 +384,7 @@ =20 def kernel(platform): r =3D set_canonical_name_suffix(".exec") - r +=3D gvar_add("noinst_PROGRAMS", "[+ name +].exec") + r +=3D gvar_add("platform_PROGRAMS", "[+ name +].exec") r +=3D var_set(cname() + "_SOURCES", platform_startup(platform)) r +=3D var_add(cname() + "_SOURCES", platform_sources(platform)) r +=3D var_set("nodist_" + cname() + "_SOURCES", platform_nodist_sou= rces(platform) + " ## platform nodist sources") @@ -409,7 +409,7 @@ =20 def image(platform): r =3D set_canonical_name_suffix(".image") - r +=3D gvar_add("noinst_PROGRAMS", "[+ name +].image") + r +=3D gvar_add("platform_PROGRAMS", "[+ name +].image") r +=3D var_set(cname() + "_SOURCES", platform_sources(platform)) r +=3D var_set("nodist_" + cname() + "_SOURCES", platform_nodist_sou= rces(platform) + "## platform nodist sources") r +=3D var_set(cname() + "_LDADD", platform_ldadd(platform)) =3D=3D=3D 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 @@ }; =20 script =3D { - installdir =3D noinst; + installdir =3D platform; name =3D gmodule.pl; common =3D gmodule.pl.in; }; =20 script =3D { - installdir =3D noinst; + installdir =3D platform; name =3D gdb_grub; common =3D gdb_grub.in; }; --------------010108030502070203090502-- --------------enig8FFB24CCBA9BBAEB8277C9A2 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iF4EAREKAAYFAk7AQigACgkQNak7dOguQgkLjAEAg2mDc9jIN/dwEjoeOauCRWYQ ojkEsBhoHF6HtrNWsWMA/iWOh3EbzXYxZDAZs8QOy++38h+47kwChbIeRrmC8Shm =JYIR -----END PGP SIGNATURE----- --------------enig8FFB24CCBA9BBAEB8277C9A2--