Method One,
By printing the function address, you can see where the function is called
For example:
Core.c DRIVERS\PWM
int pwm_config (struct pwm_device *pwm, int duty_ns, int period_ns)
{
if (!PWM | | period_ns = = 0 | | Duty_ns > Period_ns)
Return-einval;
PRINTK ("%s DRIVERS\PWM core.c----(%d) \ r \ n", __func__, __line__);
PRINTK ("pwm->chip->ops->config=%p----(%d) \ r \ n", Pwm->chip->ops->config, __line__);
Return Pwm->chip->ops->config (Pwm->chip, PWM, Duty_ns, Period_ns);
}
The terminal is displayed as follows:
[42.550000] pwm->chip->ops->config=c001b0c0----(378)
You can then
The following directory
Z:\linux-3.6.5
Found in the System.map in
C001B0C0 T Asiu_pwmc_config
It is called this function asiu_pwmc_config
Method Two,
Dump_stack () function
Welcome to Exchange
If reproduced please indicate the source
Sina Blog: http://blog.sina.com.cn/u/2049150530
Blog Park: http://www.cnblogs.com/sky-heaven/
Know: Http://www.zhihu.com/people/zhang-bing-hua
View debug methods for kernel function calls "original"