With a regular build, this is not possible because modules are not built with debugging information (even if you do a debug build).
To be more precise, modules are built with debugging information (cc -g) but this information is then converted to a more compact format (CTF) which currently only keeps information about types, global variables and functions. So information about mapping address to line is stripped off. If you want to keep debug information then you need to set the environment variable STRIPSTABS_KEEP_STABS and then build your kernel modules. alex. Andrew Gallatin wrote: > Hi, > > I'm sorry for the ignorant question. I'm trying to translate an > address in a kernel module into a file/line number. Is there a > generally accepted way to get a line number from a offset within a > kernel module? > > > In linux/freebsd/etc or even with my driver built on Solaris with gdb, > I'd just do: > > % gdb module > <...> > (gdb) list *function+0xadd > > > When I do this with a module (presumably built with the Sun C > compiler), even when built with debugging, gdb says "no debugging > symbols found" Addr2line doesn't work either :( > > > Thanks, > > Drew > _______________________________________________ > driver-discuss mailing list > [email protected] > http://mail.opensolaris.org/mailman/listinfo/driver-discuss _______________________________________________ driver-discuss mailing list [email protected] http://mail.opensolaris.org/mailman/listinfo/driver-discuss
