Re: Kernel debugging

Mike Frysinger <[email protected]>
Newsgroups gmane.comp.gdb.devel
Message-ID <[email protected]>
On Thursday 19 December 2013 13:51:36 Nikos Balkanas wrote:
> I am developing a module for the Linux kernel. For that i have setup
> the exact environment in Virtual Box and have loaded the (guest)
> kernel with -g and removed the -frame-pointers. I will run gdb from
> host and try to debug kernel on guest system.
> 
> What is the best approach for this scenario? GDBserver or gdbstubs?.
> Gdb server is good only for userspace debugging. Will gdbstubs work?
> Are they included in the recent gdb sources, or are the ones to use
> since 2003 from sourceforge? I am also looking for instructions on how
> to implement them. Any hints?

the kernel has a built in gdb stub.  look for "kgdb" in the 
documentation/kconfig.
-mike
signature.asc (application/pgp-signature, 836 B)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.17 (GNU/Linux)

iQIcBAABAgAGBQJStJ1kAAoJEEFjO5/oN/WBldsQAJ1/Y86FDl/EaPQiUwL1w9jX
mf1LNVRtI2S3WaN5pd+kJoN3ehjbmzYbOUSIZ7VgfleQgwnzy9jMh2683XawhciE
V5A8uaGMd277YTy/Y/D8YjjwdmYlNfneX39DqGpS5N4v5hPIkY93dstREyGzoLqq
5w+JPsRpe8TZBfZYIsuX5buVL7gz1SOym3g+7DZ1fwoVsO+l+h5UK2wJ9mKLWFcL
JECdYzF+InhoVkTMap0gT7W6puskOgAnxhm+t8HW8MxqcgPF5ndngM7ja7yh7BAV
wgbf1j6g84R9BbSipQ2UGLusYKgXB7WOhZyHUME1ftKSrC0kcWfP3/mKf5ES2E3D
Uw4IMxKc7EZho9IUutEH7TMCvRyLFKFHgcyBOCskYzkR21INvU+ZaJ/qkQ4YjL5a
qktHe5Sd+ItHwgysZO9oCXBs5n/5Z83Nq2ju6jkUdjGT+YywEjzKmfJ6LnXnL5mM
jQ2aknoUTHithTSJnrDkMoTESUB57xIdpaLFg5grsqfHAmbo7DVrq1Oi3gYF/+tc
6V5XA6xfIk2MZLtTz5yLT2pMhrUOcC4gn7DCFq6X0IYQPfUTQM0WeKe9b6rhzpwd
HE8YiMvkStEsKNFj+xkI9ahSxYtxeGhFGleS1BjIEuPgSNwFCwklhqBS0TrOXE0m
Eenn18SsFJC2GV61eGWD
=jZ2f
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.