Mailinglist Archive: opensuse-kernel (62 mails)

< Previous Next >
Re: [opensuse-kernel] Need help with gdb debugging the kernel
  • From: Andreas Jaeger <aj@xxxxxxxxxx>
  • Date: Tue, 20 Apr 2010 10:30:27 +0200
  • Message-id: <201004201030.56811.aj@xxxxxxxxxx>
On Tuesday 20 April 2010 08:33:11 Bernhard Walle wrote:
Am 19.04.2010 20:12, schrieb Andreas Jaeger:
(gdb) disassemble /r apbt_cpuhp_notify
Dump of assembler code for function apbt_cpuhp_notify:
0xc02240f0<apbt_cpuhp_notify+0>: 00 00 add %al,(%eax)
0xc02240f2<apbt_cpuhp_notify+2>: 00 00 add %al,(%eax)
0xc02240f4<apbt_cpuhp_notify+4>: 00 00 add %al,(%eax)
0xc02240f6<apbt_cpuhp_notify+6>: 00 00 add %al,(%eax)
0xc02240f8<apbt_cpuhp_notify+8>: 00 00 add %al,(%eax)
0xc02240fa<apbt_cpuhp_notify+10>: 00 00 add %al,(%eax)
0xc02240fc<apbt_cpuhp_notify+12>: 00 00 add %al,(%eax)
0xc02240fe<apbt_cpuhp_notify+14>: 00 00 add %al,(%eax)
0xc0224100<apbt_cpuhp_notify+16>: 00 00 add %al,(%eax)

Looks like gdb reads the wrong values from /proc/kcore.

Should I open a bugreport?

Could you give crash live debugging a try? Just invoking crash with the
kernel should work:

% crash -s /boot/vmlinux-2.6.34-rc4-4-desktop
crash> p jiffies

Does not work for me:

crash -s /boot/vmlinux-2.6.34-rc4-4-desktop
crash: cannot determine idle task addresses from init_tasks[] or runqueues[]

crash: cannot resolve "init_task_union"

Another bug report?
The disassemble feature of GDB should also work without /proc/kcore,
just with the kernel image. Doesn't it?

Yes, that works and looks sane:
gdb /boot/vmlinux-2.6.34-rc4-4-desktop
...
(gdb) disassemble apbt_cpuhp_notify
Dump of assembler code for function apbt_cpuhp_notify:
0xc02240f0 <+0>: push %ebp
0xc02240f1 <+1>: mov $0xc0a03fe0,%eax
0xc02240f6 <+6>: mov %esp,%ebp
0xc02240f8 <+8>: sub $0x14,%esp
0xc02240fb <+11>: mov %ebx,-0x8(%ebp)

Andreas
--
Andreas Jaeger, Program Manager openSUSE, aj@{novell.com,opensuse.org}
Twitter: jaegerandi | Identica: jaegerandi
SUSE LINUX Products GmbH, GF: Markus Rex, HRB 16746 (AG Nürnberg)
Maxfeldstr. 5, 90409 Nürnberg, Germany
GPG fingerprint = 93A3 365E CE47 B889 DF7F FED1 389A 563C C272 A126
< Previous Next >
Follow Ups