stacktrace() is a primitive debugger which is called by panic(). stacktrace() returns the addresses of the functions that were called prior to the call to panic(). stacktrace() can be used in combination with the nm utility (which displays the symbol table of the executable; the symbol table includes address to function name mappings) and a disassembler (the disassembler is needed to determine the exact instruction corresponding to each function call; nm can only be used to determine the names of the functions).
Below is example output of panic(). The values after the string "inet stacktrace" are the addresses of the functions called prior to the call to panic().
panic at mnx_eth.c, 44: unable to find task RTL8139: -3
inet stacktrace 0x29a 0xa02 0x547d 0x254 0x61 0x49
Hit ESC to reboot, F-keys for debug dumps