Skip to contentSkip to conversation

question on debug

DISCUSSION horseriver 2 participants 2 messages Jan 22, 2013

lore
Share & tools
lore

horseriver

author
#0 lore raw

hi:

I am debuging kernel with gdb , when it comes into a page_fault exception ,how to get to know how does that address come out ?
It is the same to ask : which code is using that address , causing the page_fault exception?

thanks!

#1 lore raw

Choose appropriate function from stack which has failed. Suppose function failed is "function_foo()" then you will have entry like

kernel: [<ffffffff814ec2ba>] ? function_foo+198

in stack trace. Pass corresponding debug .ko to gdb and give command

(gdb) l* function_foo+198

This will give you .c file which caused failure with line number. Suppose you got details like .c file is foo.c and line number is 122 then you can do more debugging with following command

(gdb) info line foo.c:122

BTW can you put stack trace (if you are allowed) on thread ?

Quoted 7 lines · horseriver

hi:

I am debuging kernel with gdb , when it comes into a page_fault exception ,how to get to know how does that address come out ?
It is the same to ask : which code is using that address , causing the page_fault exception?

Quoted 6 lines

thanks!

_______________________________________________
Kernelnewbies mailing list
Kernelnewbies at kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

Thanks and regards,
Pritam Bankar