Linux Archive

Linux Archive (http://www.linux-archive.org/)
-   Ubuntu Kernel Team (http://www.linux-archive.org/ubuntu-kernel-team/)
-   -   bug #669641 - UBUNTU PACKAGING - systemtap fails to discover installed debug modules (http://www.linux-archive.org/ubuntu-kernel-team/675991-bug-669641-ubuntu-packaging-systemtap-fails-discover-installed-debug-modules.html)

Chris J Arges 06-22-2012 09:29 PM

bug #669641 - UBUNTU PACKAGING - systemtap fails to discover installed debug modules
 
This is a multi-part message in MIME format.BugLink: https://bugs.launchpad.net/bugs/669641

== Precise SRU Justification ==

Impact: When using systemtap with Ubuntu kernels, the proper debug
modules cannot be automatically discovered.

== Fix ==

This patch allows for the build system to insert the .gnu_debuglink
sections in the .ko files pointing to the full unstripped .ko in
/usr/lib/debug/.. in the dbgsym ddebs. In addition there are checks to
ensure the debug symbol actually exists before creating the
.gnu_debuglink section.

== Testcase ==

1) Install systemtap.
2) Run "stap -l 'module("serio_raw").function("*")'"
3) This should show list all the probe points for that module.

Thanks,
--chris j arges

Herton Ronaldo Krzesinski 06-25-2012 02:10 PM

bug #669641 - UBUNTU PACKAGING - systemtap fails to discover installed debug modules
 
On Fri, Jun 22, 2012 at 04:29:47PM -0500, Chris J Arges wrote:
> BugLink: https://bugs.launchpad.net/bugs/669641
>
> == Precise SRU Justification ==
>
> Impact: When using systemtap with Ubuntu kernels, the proper debug
> modules cannot be automatically discovered.
>
> == Fix ==
>
> This patch allows for the build system to insert the .gnu_debuglink
> sections in the .ko files pointing to the full unstripped .ko in
> /usr/lib/debug/.. in the dbgsym ddebs. In addition there are checks to
> ensure the debug symbol actually exists before creating the
> .gnu_debuglink section.
>
> == Testcase ==
>
> 1) Install systemtap.
> 2) Run "stap -l 'module("serio_raw").function("*")'"
> 3) This should show list all the probe points for that module.
>
> Thanks,
> --chris j arges

> From cf63b6edab8e47ecb09f1603e3a3d26fe3cda6c6 Mon Sep 17 00:00:00 2001
> From: John Rigby <john.rigby@linaro.org>
> Date: Thu, 14 Jun 2012 21:17:38 +0100
> Subject: [PATCH] UBUNTU: PACKAGING: add .gnu_debuglink sections to .ko files
>
> BugLink: http://launchpad.net/bugs/669641
>
> Kernel module .ko files now have .gnu_debuglink sections pointing
> to the full unstripped .ko in /usr/lib/debug/.. in the dbgsym ddebs.
>
> [Peter Petrakis <peter.petrakis@canonical.com>]
> Check that debug symbol ko exists before attempting to create
> .gnu_debuglink section.

Ack, it looks ok. Just one related suggestion (not a problem with this
change, could be a separate patch): we could use --only-keep-debug with
objcopy to strip the .ko from the dbgsym package also, if it isn't
stripped anywhere else already.

>
> Signed-off-by: Peter Petrakis <peter.petrakis@canonical.com>
> Signed-off-by: Chris J Arges <chris.j.arges@canonical.com>
> ---
> debian/rules.d/2-binary-arch.mk | 9 +++++++++
> 1 file changed, 9 insertions(+)
>
> diff --git a/debian/rules.d/2-binary-arch.mk b/debian/rules.d/2-binary-arch.mk
> index a2555ee..d3460bb 100644
> --- a/debian/rules.d/2-binary-arch.mk
> +++ b/debian/rules.d/2-binary-arch.mk
> @@ -168,6 +168,15 @@ ifneq ($(skipdbg),true)
> $(dbgpkgdir)/usr/lib/debug/boot/vmlinux-$(abi_release)-$*
> $(build_cd) $(kmake) $(build_O) modules_install
> INSTALL_MOD_PATH=$(dbgpkgdir)/usr/lib/debug
> + # Add .gnu_debuglink sections to each stripped .ko
> + # pointing to unstripped verson
> + find $(pkgdir) -name '*.ko' | sed 's|$(pkgdir)||'| while read module ; do
> + if [[ -f "$(dbgpkgdir)/usr/lib/debug/$$module" ]] ; then
> + $(CROSS_COMPILE)objcopy
> + --add-gnu-debuglink=$(dbgpkgdir)/usr/lib/debug/$$module
> + $(pkgdir)/$$module;
> + fi;
> + done
> rm -f $(dbgpkgdir)/usr/lib/debug/lib/modules/$(abi_release)-$*/build
> rm -f $(dbgpkgdir)/usr/lib/debug/lib/modules/$(abi_release)-$*/source
> rm -f $(dbgpkgdir)/usr/lib/debug/lib/modules/$(abi_release)-$*/modules.*
> --
> 1.7.9.5
>

> --
> kernel-team mailing list
> kernel-team@lists.ubuntu.com
> https://lists.ubuntu.com/mailman/listinfo/kernel-team


--
[]'s
Herton

--
kernel-team mailing list
kernel-team@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/kernel-team


All times are GMT. The time now is 09:08 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.