All of lore.kernel.org
 help / color / mirror / Atom feed
* question on debug
@ 2013-01-22  1:30 horseriver
  2013-01-22 12:26 ` Pritam Bankar
  0 siblings, 1 reply; 2+ messages in thread
From: horseriver @ 2013-01-22  1:30 UTC (permalink / raw)
  To: kernelnewbies

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!

^ permalink raw reply	[flat|nested] 2+ messages in thread

* question on debug
  2013-01-22  1:30 question on debug horseriver
@ 2013-01-22 12:26 ` Pritam Bankar
  0 siblings, 0 replies; 2+ messages in thread
From: Pritam Bankar @ 2013-01-22 12:26 UTC (permalink / raw)
  To: kernelnewbies

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 ?

On Tue, Jan 22, 2013 at 7:00 AM, horseriver <horserivers@gmail.com> wrote:
> 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!
>
> _______________________________________________
> Kernelnewbies mailing list
> Kernelnewbies at kernelnewbies.org
> http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

Thanks and regards,
Pritam Bankar

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2013-01-22 12:26 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-01-22  1:30 question on debug horseriver
2013-01-22 12:26 ` Pritam Bankar

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.