Settings | Sign in | Sign up

The author has 1 post.

linux内核用printk打印函数指针指向的函数名,以及当前函数的调用者的函数名

Floor 1 巨大八爪鱼 8/18/25 10:46

打印函数指针指向的函数名:

printk(KERN_ERR "%s: func %pS is at address: %px\n", __func__, hdev->send, hdev->send);

打印当前函数的调用者的函数名:

printk(KERN_ERR "%s: the func's caller is %pS\n", __func__, __builtin_return_address(0));

Content converter:

Reply the post
Content:
User: You are currently anonymous.
Captcha:
Unclear? Try another one.