add-symbol-file

Jerry Toung jtoung at arc.nasa.gov
Fri Sep 17 17:02:53 PDT 2004


Hello list,
Could somebody tell me why I can't "list" the source code of this kld?
I built the module with COPTS=-g, it is loaded in the kernel and I run kgdb in 
/usr/obj/...../MYKERNEL. Everything seems to go well, except kgdb still 
doesn't like it. However if I run kldsyms, it only loads acpi.ko.debug and I 
can list it.
Thank you in advance,
Jerry


PC203# kgdb kernel.debug /usr/home/guest/crash/vmcore.2
[GDB will not be able to debug user-mode threads: /usr/lib/libthread_db.so: 
Undefined symbol "ps_pglobal_lookup"]
GNU gdb 6.1.1 [FreeBSD]
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "i386-marcel-freebsd".
Ready to go.  Enter 'tr' to connect to the remote target
with /dev/cuaa0, 'tr /dev/cuaa1' to connect to a different port
or 'trf portno' to connect to the remote target with the firewire
interface.  portno defaults to 5556.

Type 'getsyms' after connection to load kld symbols.

If you're debugging a local system, you can use 'kldsyms' instead
to load the kld symbols.  That's a less obnoxious interface.
doadump () at pcpu.h:159
(kgdb) add-symbol-file /usr/local/src/nren-6.0current/osr_src/if_osr.ko 
0xc24b3184 -s .data 0xc24b6900 -s .bss 0xc24b6cc0
add symbol table from file "/usr/local/src/nren-6.0current/osr_src/if_osr.ko" 
at
        .text_addr = 0xc24b3184
        .data_addr = 0xc24b6900
        .bss_addr = 0xc24b6cc0
(y or n) y
Reading symbols from /usr/local/src/nren-6.0current/osr_src/if_osr.ko...done.
(kgdb) list *0xc24b3184
No source file for address 0xc24b3184.
(kgdb) kldstat
During symbol reading, Incomplete CFI data; unspecified registers at 
0xc05ff7d1.
Id Refs Address    Size     Name
 1    4 0xc0400000 5d63e4   kernel
 2   14 0xc09d7000 54784    acpi.ko
 3    1 0xc2326000 6000     if_osr.ko
(kgdb) 



More information about the freebsd-hackers mailing list