how can i print something (for debugging purpose) to console inside a linux system call?
Or is there any not very dif开发者_StackOverflow社区fucult way of debugging kernel code?
thanks
The accepted way of printing inside the kernel is via printk()
.
You should also check the different modifiers to printk (such as KERNEL_DEBUG) which will control where/how the messages are printed, including whether they are printed to all active terminals or just the system buffer
精彩评论