how to locate a function by a constant address value?(in gdb
Posted: Sun May 01, 2016 9:41 pm
i am debugging my kernel with bochs ( gdb-stub enabled).
sometimes, the kernel trapped into 'page_fault" and gdb's command [bt] didn't work any more.
so, i want to locate the function who caused this time page-fault.
i can get the illegal address within my kernel by reading CR2, i can get the instuction address at that time by reading eip.
but how can i locate the function(in source code) with gdb. is there exist a command like :
locate 0xc0304000
?
(assume i know instruction in 0xc0304000 caused this time page-error).
sometimes, the kernel trapped into 'page_fault" and gdb's command [bt] didn't work any more.
so, i want to locate the function who caused this time page-fault.
i can get the illegal address within my kernel by reading CR2, i can get the instuction address at that time by reading eip.
but how can i locate the function(in source code) with gdb. is there exist a command like :
locate 0xc0304000
?
(assume i know instruction in 0xc0304000 caused this time page-error).