Date: Mon, 5 May 2008 09:27:10 -0700 From: "David Christensen" <davidch@broadcom.com> To: "Alexander Sack" <pisymbol@gmail.com> Cc: "freebsd-net@freebsd.org" <freebsd-net@freebsd.org> Subject: RE: Not All Symbols Present in a Loadable Kernel Module Message-ID: <5D267A3F22FD854F8F48B3D2B523819324F09D6A52@IRVEXCHCCR01.corp.ad.broadcom.com> In-Reply-To: <3c0b01820805030750k2fc389b0y500914c36069e6cf@mail.gmail.com> References: <5D267A3F22FD854F8F48B3D2B523819324F09D65FA@IRVEXCHCCR01.corp.ad.broadcom.com> <3c0b01820805021315i482fe0acg3e9238a2f412770e@mail.gmail.com> <5D267A3F22FD854F8F48B3D2B523819324F09D6896@IRVEXCHCCR01.corp.ad.broadcom.com> <3c0b01820805030750k2fc389b0y500914c36069e6cf@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
> > Yes, I'm building a debug kernel. I have the line listed above as > well > > as the following: > > > > options KDB > > options DDB > > options GDB > > options INVARIANTS > > options INVARIANT_SUPPORT > > options WITNESS > > options WITNESS_SKIPSPIN > > Dave: > > What symbols can you not access exactly and how are you > installing/setting up debugging? > > I just built a RELENG_7 with DDB and I'm able to access bce symbols > without a problem. I can examine them and call them. I'm not using > options GDB however, only KDB/DDB. > > I would: > > - Make sure you have the right if_bce.ko/if_bce.ko.symbols files > generated/installed which contains the debug sections of your ko (from > the objcopy calls during the build - the binary is stripped with a > section pointer to the if_bce.ko.symbols file for debugging > information I believe) > - If you are using GDB, make sure its pointed to the right source base > so it can retrieve symbol information correctly > - If you are using GDB, stub it out and just use DDB to verify that > your build is sane (it works for me!) > - If all else fails, you can always build bce statically (just to move > forward etc.) - Enable the kernel debugger as described above - Build the driver in the /usr/src/sys/modules/bce directory with the command "make". - Run the command "nm if_bce.ko | grep dump_stat" in the same directory with the kernel module just built. In my case I only see a symbol for bce_dump_status_block, but there is a second routine called bce_dump_stats_block. In my working build there are 23 functions that start with "bce_dump" but only 8 are displayed with the command "nm if_bce.ko | grep bce_dump". Of course, I also get the symbol not present error when I try to use any of those missing symbols through a "call" command in the debugger. Dave
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?5D267A3F22FD854F8F48B3D2B523819324F09D6A52>