From: "Jon Ringle" <JRingle@vertical.com>
To: <gdb@sourceware.org>
Subject: No line number info debugging kernel modules with gdb 6.6.90.20070926-cvs (gdb 6.7 branch)
Date: Thu, 27 Sep 2007 20:11:00 -0000 [thread overview]
Message-ID: <4DD3AF7ECBBC43409BA36508938D01851B00AE@CVAEX1.VERTICAL.COM> (raw)
Hi,
I did a cvs checkout of the 6.7 branch:
cvs -d :pserver:anoncvs@sourceware.org:/cvs/src co -r gdb_6_7-branch gdb
As I used it to debug a kernel module, I found that gdb could get line
number info for my kernel module.
On my target:
[root@isc1 ~]# grep dstdrv /proc/modules
dstdrv 33692 0 - Live 0xbf131000
On my host:
ringlej@crossdev:~/WAVE/Build7/Platform/Volcano/os/kernel/linux$ file
../../kernel-modules/dst/dstdrv.ko
../../kernel-modules/dst/dstdrv.ko: ELF 32-bit MSB relocatable, ARM,
version 1 (ARM), not stripped
ringlej@crossdev:~/WAVE/Build7/Platform/Volcano/os/kernel/linux$
~/build/armeb-linux-gdb-6.7/gdb/gdb vmlinux
GNU gdb 6.6.90.20070926-cvs
Copyright (C) 2007 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later
<http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show
copying"
and "show warranty" for details.
This GDB was configured as "--host=i686-pc-linux-gnu
--target=armeb-linux"...
(gdb) add-symbol-file ../../kernel-modules/dst/dstdrv.ko 0xbf131000
add symbol table from file "../../kernel-modules/dst/dstdrv.ko" at
.text_addr = 0xbf131000
(y or n) y
Reading symbols from
/home/ringlej/WAVE/Build7/Platform/Volcano/os/kernel-modules/dst/dstdrv.
ko...done.
(gdb) directory ../../kernel-modules/dst/
Source directories searched:
/home/ringlej/WAVE/Build7/Platform/Volcano/os/kernel/linux-2.6.16.29/../
../kernel-modules/dst:$cdir:$cwd
(gdb) target remote bdilab:2001
Remote debugging using bdilab:2001
cpu_idle () at include/asm/bitops.h:177
177 return (p[nr >> 5] >> (nr & 31)) & 1UL;
(gdb) b vert_dst_nopage_mmap
Breakpoint 1 at 0xbf1342b4
(gdb) list vert_dst_nopage_mmap
No line number known for vert_dst_nopage_mmap.
GDB has enough information to set the breakpoint correctly, but can't
seem to find line info for the kernel module.
Jon
next reply other threads:[~2007-09-27 15:34 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-09-27 20:11 Jon Ringle [this message]
2007-09-28 0:25 ` Jim Blandy
2007-09-28 3:47 ` Jon Ringle
2007-09-28 13:47 ` Jon Ringle
2007-09-28 16:01 ` Jon Ringle
2007-09-28 21:32 ` Jim Blandy
2007-09-28 22:06 ` ringlej
2007-09-29 0:27 ` Jim Blandy
2007-09-29 0:27 ` Daniel Jacobowitz
2007-09-29 2:06 ` Jon Ringle
2007-09-29 2:27 ` Daniel Jacobowitz
2007-09-29 7:38 ` Jon Ringle
2007-10-02 21:38 ` Jim Blandy
2007-10-02 22:54 ` Jon Ringle
2007-10-02 20:26 ` Jim Blandy
2007-10-02 20:43 ` Daniel Jacobowitz
2007-09-29 1:28 ` Jon Ringle
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4DD3AF7ECBBC43409BA36508938D01851B00AE@CVAEX1.VERTICAL.COM \
--to=jringle@vertical.com \
--cc=gdb@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).