OK, so I think you have a build issue, as I can add the run the objcopy line alone and verify the heading was added.
root@ubuntu:/usr/lib/debug# lsb_release -r Release: 12.04 root@ubuntu:/usr/lib/debug# uname -a Linux ubuntu 3.4.0-3-generic #7~lp669641v201205242144 SMP Thu May 24 21:45:43 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux
root@ubuntu:~# objcopy \ > --add-gnu-debuglink=/usr/lib/debug/lib/modules/3.4.0-3-generic/kernel/drivers/scsi/libiscsi.ko /lib/modules/3.4.0-3-generic/kernel/drivers/scsi/libiscsi.ko
root@ubuntu:~# objdump -h /lib/modules/3.4.0-3-generic/kernel/drivers/scsi/libiscsi.ko | grep -A2 debuglink 21 .gnu_debuglink 00000010 0000000000000000 0000000000000000 00009aae 2**0 CONTENTS, READONLY
but systemtap still fumbles over it, no entries found.
root@ubuntu:~# stap -l 'module("libiscsi").function("*")'
But strace confirms that the debug file was opened
stat("/lib/modules/3.4.0-3-generic/kernel/drivers/scsi/libiscsi.ko", {st_mode=S_IFREG|0644, st_size=87192, ...}) = 0 open("/lib/modules/3.4.0-3-generic/kernel/drivers/scsi/libiscsi.ko", O_RDONLY) = 4 fstat(4, {st_mode=S_IFREG|0644, st_size=87192, ...}) = 0 close(4) = 0 open("/lib/modules/3.4.0-3-generic/kernel/drivers/scsi/.debug/libiscsi.ko", O_RDONLY) = -1 ENOENT (No such file or directory) open("/usr/lib/debug/lib/modules/3.4.0-3-generic/kernel/drivers/scsi/libiscsi.ko", O_RDONLY) = 4 fstat(4, {st_mode=S_IFREG|0644, st_size=689768, ...}) = 0 fcntl(4, F_GETFL) = 0x8000 (flags O_RDONLY|O_LARGEFILE) fstat(4, {st_mode=S_IFREG|0644, st_size=689768, ...}) = 0 mmap(NULL, 689768, PROT_READ|PROT_WRITE, MAP_PRIVATE, 4, 0) = 0x7faaa4333000 munmap(0x7faaa4333000, 689768) = 0 close(4) = 0 close(4) = -1 EBADF (Bad file descriptor)
So what went wrong? When I go back and apply the script that creates the shadow links to the debug files the result is the same, no output, regardless of the module I choose to test.
I think your build is broken.
OK, so I think you have a build issue, as I can add the run the objcopy
line alone and verify the heading was added.
root@ubuntu: /usr/lib/ debug# lsb_release -r /usr/lib/ debug# uname -a 205242144 SMP Thu May 24 21:45:43 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux
Release: 12.04
root@ubuntu:
Linux ubuntu 3.4.0-3-generic #7~lp669641v201
root@ubuntu:~# objcopy \ debuglink= /usr/lib/ debug/lib/ modules/ 3.4.0-3- generic/ kernel/ drivers/ scsi/libiscsi. ko /lib/modules/ 3.4.0-3- generic/ kernel/ drivers/ scsi/libiscsi. ko
> --add-gnu-
root@ubuntu:~# objdump -h /lib/modules/ 3.4.0-3- generic/ kernel/ drivers/ scsi/libiscsi. ko | grep -A2 debuglink
CONTENTS, READONLY
21 .gnu_debuglink 00000010 0000000000000000 0000000000000000 00009aae 2**0
but systemtap still fumbles over it, no entries found.
root@ubuntu:~# stap -l 'module( "libiscsi" ).function( "*")'
But strace confirms that the debug file was opened
stat("/ lib/modules/ 3.4.0-3- generic/ kernel/ drivers/ scsi/libiscsi. ko", {st_mode= S_IFREG| 0644, st_size=87192, ...}) = 0 lib/modules/ 3.4.0-3- generic/ kernel/ drivers/ scsi/libiscsi. ko", O_RDONLY) = 4 S_IFREG| 0644, st_size=87192, ...}) = 0 lib/modules/ 3.4.0-3- generic/ kernel/ drivers/ scsi/.debug/ libiscsi. ko", O_RDONLY) = -1 ENOENT (No such file or directory) usr/lib/ debug/lib/ modules/ 3.4.0-3- generic/ kernel/ drivers/ scsi/libiscsi. ko", O_RDONLY) = 4 S_IFREG| 0644, st_size=689768, ...}) = 0 O_LARGEFILE) S_IFREG| 0644, st_size=689768, ...}) = 0 PROT_WRITE, MAP_PRIVATE, 4, 0) = 0x7faaa4333000 0x7faaa4333000, 689768) = 0
open("/
fstat(4, {st_mode=
close(4) = 0
open("/
open("/
fstat(4, {st_mode=
fcntl(4, F_GETFL) = 0x8000 (flags O_RDONLY|
fstat(4, {st_mode=
mmap(NULL, 689768, PROT_READ|
munmap(
close(4) = 0
close(4) = -1 EBADF (Bad file descriptor)
So what went wrong? When I go back and apply the script that
creates the shadow links to the debug files the result is the same, no
output, regardless of the module I choose to test.
I think your build is broken.