no KLD symbols in dtrace?

Alexander Kabaev kabaev at
Fri Apr 22 02:42:18 UTC 2011

On Thu, 21 Apr 2011 18:37:24 -0700
Chuck Tuffli <ctuffli at> wrote:

> (Note I'm new to DTrace, so this may be ignorance on my part)
> I have re-built a stock 8.2 kernel and enabled dtrace as per the
> handbook (including WITH_CTF=1) and have built a kld also using
> WITH_CTF=1. When I run the following
> dtrace -n"bus_release_resource:entry { stack(); }"
> the output looks like
> ...
>   0  33759       bus_release_resource:entry
>               0xffffffff813db04e
>               0xffffffff813db091
>               kernel`device_detach+0x84
>               kernel`driver_module_handler+0x37c
>               kernel`module_unload+0x49
>               kernel`linker_file_unload+0x178
>               kernel`kern_kldunload+0x117
>               kernel`syscallenter+0x23d
>               kernel`syscall+0x4b
>               kernel`0xffffffff808c5572
> where the 0xffffffff813dbXXX addresses correspond to my kld. But I was
> expecting to see symbolic names instead of addresses. Is there
> something else I need to do to add the kld's symbols to the system?
> TIA.

There is an omission on our .mk files which prevents CTF info to be
generated for kld modules, regardless of WITH_CTF flag. I had
discovered this at work just recently and have been using the
following patch for the time being:

If you can confirm it works for you too, I'll get it committed.
Alexander Kabaev
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 188 bytes
Desc: not available
Url :

More information about the freebsd-hackers mailing list