From patchwork Fri Jun 22 21:29:47 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chris J Arges X-Patchwork-Id: 166678 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from chlorine.canonical.com (chlorine.canonical.com [91.189.94.204]) by ozlabs.org (Postfix) with ESMTP id B3C2FB6F62 for ; Sat, 23 Jun 2012 07:30:06 +1000 (EST) Received: from localhost ([127.0.0.1] helo=chlorine.canonical.com) by chlorine.canonical.com with esmtp (Exim 4.71) (envelope-from ) id 1SiBQN-0005wL-IS; Fri, 22 Jun 2012 21:29:51 +0000 Received: from youngberry.canonical.com ([91.189.89.112]) by chlorine.canonical.com with esmtp (Exim 4.71) (envelope-from ) id 1SiBQM-0005wG-7Z for kernel-team@lists.ubuntu.com; Fri, 22 Jun 2012 21:29:50 +0000 Received: from 65.106.201.147.ptr.us.xo.net ([65.106.201.147] helo=[192.168.11.48]) by youngberry.canonical.com with esmtpsa (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1SiBQM-0004Jc-1f for kernel-team@lists.ubuntu.com; Fri, 22 Jun 2012 21:29:50 +0000 Message-ID: <4FE4E3CB.3000904@canonical.com> Date: Fri, 22 Jun 2012 16:29:47 -0500 From: Chris J Arges User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:13.0) Gecko/20120615 Thunderbird/13.0.1 MIME-Version: 1.0 To: Ubuntu Kernel Team Subject: [quantal/precise][SRU][PATCH] bug #669641 - UBUNTU PACKAGING - systemtap fails to discover installed debug modules X-Enigmail-Version: 1.4.2 X-BeenThere: kernel-team@lists.ubuntu.com X-Mailman-Version: 2.1.13 Precedence: list List-Id: Kernel team discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: kernel-team-bounces@lists.ubuntu.com Errors-To: kernel-team-bounces@lists.ubuntu.com 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 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 ] Check that debug symbol ko exists before attempting to create .gnu_debuglink section. Signed-off-by: Peter Petrakis Signed-off-by: Chris J Arges --- 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