Skip to contentSkip to conversation

Cannot see stack after add-symbol-file

uml-devel Etay Meiri 2 participants 2 messages Sep 12, 2003 – Sep 16, 2003 User-mode Linux (UML)

lore
Share & tools
lore

Etay Meiri

author
#0 lore raw

Hi,

I have a strange problem when debugging my module under uml. When the module crashes, I go into the debugger and display the stack trace. There are several frame and there is one named "????". I assume this is my module so I add the symbol file according to the howto. The symbols load ok but the next time I do 'bt' I get only the frame of the panic.
Here's a sample (I annotated it a bit):

<<< uml starting >>>

Breakpoint 3, start_kernel () at init/main.c:361
361 printk(linux_banner);
(gdb) c
Continuing.

<<< crashed caused here.... >>>

Breakpoint 1, panic (

    fmt=0xa01ef540 "Kernel mode fault at addr 0x%lx, ip 0x%lx") at 

panic.c:52
52 bust_spinlocks(1);
(gdb) bt
#0 panic (fmt=0xa01ef540 "Kernel mode fault at addr 0x%lx, ip 0x%lx")

    at panic.c:52
#1  0xa00f0f36 in segv (address=7286388, ip=2743086726, is_write=0, is_user=0,
    sc=0xa20d8274) at trap_kern.c:149
#2  0xa00f135e in segv_handler (sig=11, regs=0xa20d8274) at trap_user.c:69
#3  0xa00f49a6 in sig_handler_common_tt (sig=11, sc_ptr=0x58) at trap_user.c:37
#4  0xa00f143b in sig_handler (sig=0, sc=
      {gs = 0, __gsh = 0, fs = 0, __fsh = 0, es = 123, __esh = 0, ds = 

123, __ds
h = 0, edi = 0, esi = 4294967280, ebp = 2718809004, esp = 2718808924, ebx = 2687 597856, edx = 0, ecx = 2718808656, eax = 7286388, trapno = 14, err = 4, eip = 27 43086726, cs = 115, __csh = 0, eflags = 66118, esp_at_signal = 2718808924, ss = 123, __ssh = 0, fpstate = 0x0, oldmask = 134283264, cr2 = 7286388})

    at trap_user.c:104
#5  <signal handler called>
#6  0xa3802e86 in ?? ()
#7  0xa0012df4 in sys_delete_module (name_user=0xa0317d20 "??\r?$}1?$}1?")
    at module.c:636

<<< adding the symbols >>>

(gdb) p module_list
$1 = (struct module *) 0xa3802000
(gdb) add-symbol-file /home/cl/hacking/kernel/plkp/knet/modknet.o 0xa3802060 add symbol table from file "/home/cl/hacking/kernel/plkp/knet/modknet.o" at

        .text_addr = 0xa3802060

(y or n) y
Reading symbols from /home/cl/hacking/kernel/plkp/knet/modknet.o... done.

<<< another backtraced >>>

(gdb) bt
#0 panic (fmt=0xa01ef540 "Kernel mode fault at addr 0x%lx, ip 0x%lx")

    at panic.c:52

(gdb)

The host is RH9 running kernel 2.6.0-test4. The uml is 2.4.22. This also happened when I loaded the symbols before the module crashed.

Any idea?

Signature · 15 lines
--------------------------------
Etay Meiri
[email protected]
--------------------------------



-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
User-mode-linux-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel
#1 lore raw
Quoted 14 lines · Etay Meiri

Hi,

I have a strange problem when debugging my module under uml. When the module crashes, I go into the debugger and display the stack trace. There are several frame and there is one named "????". I assume this is my module so I add the symbol file according to the howto. The symbols load ok but the next time I do 'bt' I get only the frame of the panic.

<<< another backtraced >>>

(gdb) bt
#0 panic (fmt=0xa01ef540 "Kernel mode fault at addr 0x%lx, ip 0x%lx")

Quoted 8 lines
     at panic.c:52

(gdb)

The host is RH9 running kernel 2.6.0-test4. The uml is 2.4.22. This also happened when I loaded the symbols before the module crashed.

Any idea?

What version of GDB are you running? Some time ago, there were various threads in both lists(devel/user) about GDB showing only the last frame in all backtraces. The bug was tracked down... and it came from binutils, IIRC(the proposed fix was a workaround in GDB). Maybe it is appearing here in a different form.

Signature · 15 lines
cat <<EOSIGN
Paolo Giarrusso, aka Blaisorblade
Linux Kernel 2.4.21/2.6.0-test on an i686; Linux registered user n. 292729
EOSIGN



-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
User-mode-linux-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel