How to include C backtrace in a kernel module code?
So I am trying to find out what kernel processes are calling some functions in a block driver. I thought including backtrace() in the C library would make it easy. But I am having trouble to load the backtrace. I copied this example function to show the backtrace: http://www.linuxjournal.com/files/linuxjournal.com/linuxjournal/articles/063/6391/6391l1.html All attempts to compile have error in one place or another that a file cannot be found or that the functions are not defined. Here is what comes closest. In the Makefile I put the compiler directives: -rdynamic -I/usr/include If I leave out