dwarf info in modules.
Tigran Aivazian
tigran_aivazian@symantec.com
Mon Sep 12 11:52:00 GMT 2005
the same problem occurs if I use a different module instead of the small
one below. I'll try and reproduce it on a kernel without kdb patch applied
and raise a bugzilla then.
Kind regards
Tigran
On Mon, 12 Sep 2005, Tigran Aivazian wrote:
> upgrading elfutils to 0.115 solved the "no dwarf info found" but now I get an
> oops:
>
> # general protection fault: 0000 [1] SMP
>
> Entering kdb (current=0x0000010037d5c7f0, pid 10908) on processor 0 Oops:
> <NULL>
> due to oops @ 0xffffffff801229da
> r15 = 0x0000007fbffff310 r14 = 0x0000000000000246
> r13 = 0x0000000000000000 r12 = 0xffffffffa01cdc20
> rbp = 0x00000100497fbdc8 rbx = 0x0000000000000000
> r11 = 0x0000000000000246 r10 = 0x0000007fbffff314
> r9 = 0x8000000000000003 r8 = 0xffffffffa01cdc20
> rax = 0x0000000000000000 rcx = 0x000000000000000f
> rdx = 0x8000000000000000 rsi = 0x8000000000000003
> rdi = 0xffffffffa000000f orig_rax = 0xffffffffffffffff
> rip = 0xffffffff801229da cs = 0x0000000000000010
> eflags = 0x0000000000010046 rsp = 0x00000100497fbdb0
> ss = 0x00000100497fa000 ®s = 0x00000100497fbd18
> [0]kdb> bt
> Stack traceback for pid 10908
> 0x0000010037d5c7f0 10908 10856 1 0 R 0x0000010037d5cbf0 *stpd
> RBP RIP Function (args)
> 0x100497fbdc8 0xffffffff801229da arch_copy_kprobe+0x16 (0xffffffffa01cdc20,
> 0x7fbffff314, 0x100497fbe84, 0x4, 0x100497fbf48)
> 0x100497fbe08 0xffffffff8015cbc0 register_kprobe+0x1e7 (0xffffffffa01cdc20,
> 0x7fbffff314, 0x7fbffff314, 0x100497fbe84)
> 0x100497fbe38 0xffffffffa01ca78e [stap_10856]probe_start+0x2e (0x100497fa000,
> 0x100497fa000)
> 0x100497fbe58 0xffffffffa01ca80a [stap_10856]_stp_handle_start+0xf
> (0x100497fbe84, 0x100497fbe88, 0x50ce40, 0x500000018, 0x100497fbec8)
> 0x100497fbeb8 0xffffffffa01ca8b6 [stap_10856]_stp_proc_write_cmd+0x84
> (0x1000dad2380, 0x7fbffff310, 0x8, 0x100497fbf48, 0x100497fbf54)
> 0x100497fbf18 0xffffffff8017e4f4 vfs_write+0xd9
> 0x100497fbf78 0xffffffff8017e5f1 sys_write+0x48
>
> this is using the latest stap built from the CVS as of this morning.
>
> Known problem or shall I try to debug it?
>
> Kind regards
> Tigran
>
> On Mon, 12 Sep 2005, Tigran Aivazian wrote:
>
>> Hi,
>>
>> I attempted to use systemtap 0.3 with modules and wrote trivial two-liner
>> stp script:
>>
>> probe module("tmod").function("*@tmod.c") { log ("enter") }
>> probe module("tmod").function("*@tmod.c").return { log ("exit") }
>>
>> where tmod.c is a short module containing a single function called by both
>> ->init() and ->exit() entry points. I compile it with "-g" and also readelf
>> -w kmod.ko shows that all DWARF2 debug info is present. However stap
>> complains claiming it is missing:
>>
>> # lsmod | grep tmod
>> tmod 3584 0
>> # stap tmod.stp
>> WARNING: no dwarf info found for module tmod
>> semantic error: no match for probe point
>> while: resolving probe point module("tmod").function("*@tmod.c")
>> WARNING: no dwarf info found for module tmod
>> semantic error: no match for probe point
>> while: resolving probe point
>> module("tmod").function("*@tmod.c").return
>> Pass 2: analysis failed. Try again with '-v' (verbose) option.
>>
>> This is on x86_64 architecture and 2.6.9-16.ELsmp kernel (of RHEL4
>> update2).
>>
>> Any ideas what is it that I am obviously doing wrong? (I have read the
>> arch-0505 paper according to which my 2-liner script seems fine, i.e. both
>> the probe family and probe points are specified correctly).
>>
>> Kind regards
>> Tigran
>>
>> Here is tmod.c:
>>
>> # cat tmod.c
>> #include <linux/init.h>
>> #include <linux/sched.h>
>> #include <linux/module.h>
>>
>> MODULE_DESCRIPTION("Test module");
>> MODULE_AUTHOR("Tigran Aivazian <tigran_aivazian@symantec.com>");
>> MODULE_LICENSE("GPL");
>>
>> int tmod_func(int x)
>> {
>> printk(KERN_INFO "tmod: tmod_func(%d)\n", x);
>> return 0;
>> }
>>
>> static int __init tmod_init(void)
>> {
>> tmod_func(0);
>> printk(KERN_INFO "tmod: ->init()\n");
>> return 0;
>> }
>>
>> static void __exit tmod_exit(void)
>> {
>> tmod_func(1);
>> printk(KERN_INFO "tmod: ->exit()\n");
>> }
>>
>> module_init(tmod_init)
>> module_exit(tmod_exit)
>>
>> EXPORT_SYMBOL(tmod_func);
>>
>
More information about the Systemtap
mailing list