How to decode a kernel symbol

Masami Ichikawa masami256 at gmail.com
Sat Jul 19 22:27:27 EDT 2014


Hi,

On Sun, Jul 20, 2014 at 10:45 AM, Santhosh Kumar
<forwardinglnx at gmail.com> wrote:
> To debug a problem I added some debugs in the kernel code to print the
> address at which a lock is taken, by calling __builtin_return_address(1).
>
> How do I find the symbol (function name) corresponding to the address
> printed ?
>
I recommend to use %pS format.
pr_info("%pS\n", __builtin_return_address(1));

Then, you will see following log.
[ 1501.427439] load_module+0x1dcc/0x25f0

you can find more formats in Documents/printk-formats.txt

> Apologies if this is an often repeated question here. In that case would
> appreciate if someone can point a link covering this.
>
>
> _______________________________________________
> Kernelnewbies mailing list
> Kernelnewbies at kernelnewbies.org
> http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
>


Cheers,
-- 
Masami Ichikawa



More information about the Kernelnewbies mailing list