The "run" command should not be used. Kgdb/gdb debugging of the
kernel is more like attaching to a running program than running it.
When you use the run command you are telling gdb to, among other
things, transfer conrol to the beginning of the program, which in the
case of the kernel, is where the boot loader jumps on boot. In the
kernel this code in is memory that is released to free memory on the
way up.
If you make this mistake often I recommend the following gdb macro:
define hook-run
echo "run is not available for kernel debugging \n"
p .
end
The "p ." will error out the command and snach you from the jaws of
reboot/ fsck :)
This macro should be in .gdbinit file in the same directory as the
vmlinux file.
> warning: shared library handler failed to enable breakpoint
> warning: Cannot insert breakpoint 7:
> Cannot access memory at address 0xc027e7f0
>
> QUESTION:
>
> I very strongly suspect that this exercise follows a particular sequence
> of steps to get it right. Either I am missing some step or I am not
> following the "order". In either case, I would be glad to receive some
> help/comments on my academic endeavour to be able to remotely debug the
> kernel.
>
> - Kindly let me know a solution
>
> - TIA
>
> - Shobhit Mathur
> -
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at http://www.tux.org/lkml/
>
-- George Anzinger george@mvista.com High-res-timers: http://sourceforge.net/projects/high-res-timers/ Preemption patch: http://www.kernel.org/pub/linux/kernel/people/rml- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/