I'm trying to see if certain ioctl calls get called when I call a function(this is on linux).There no way to cause the ke开发者_JS百科rnel to write a log with this sort of data, is there?
On recent kernel, and if kernel is configured with support for tracing and dynamic tracing, ftrace can probably do what you need.
Another option is to write an ioctl wrapper, load it using LD_PRELOAD, and intercept the interesting ioctl in your wrapper.
精彩评论