# how to dump function trace in freebsd



## bsd_newbie (Mar 4, 2009)

In Linux I could do this to see how a function was called - (In essence function call trace),

Function() {
dump_stack();
.....
...
}
What is the equivalent to dump_stack() in freebsd ?

thanks.


----------



## bsd_newbie (Mar 4, 2009)

I believe the equivalent function is kdb_backtrace(), correct me if that is not the case.


----------



## Maledictus (Mar 5, 2009)

Sorry, I don't know much about kdb but you can fire a DTrace probe there and print the stack from your dtrace skript.


----------

