Linux kgdb command and linuxkgdb command

Source: Internet
Author: User

Linux kgdb command and linuxkgdb command

I. Introduction

Kgdb is a source code-level Linux kernel debugger. When using kgdb to debug the kernel, you need to use it with gdb. They can perform single-step debugging on the kernel, set breakpoints, and observe the values of variables and registers and other functions related to application debugging. However, it also has restrictions. We will introduce the principle of the kgdb Debugger in the next step. This article only briefly introduces the process of using Kgbd.

https://kgdb.wiki.kernel.org/index.php/Main_Page

 

Ii. installation and configuration

1) enable the kgdb and kdb configuration options and recompile the kernel.

https://www.kernel.org/pub/linux/kernel/people/jwessel/kdb/CompilingAKernel.html#CompileKGDB
http://blog.chinaunix.net/uid-23366077-id-4711134.html
http://www.cnblogs.com/274914765qq/p/4978999.html

2) set the startup item, and modify the startup files of the server and client respectively:/boot/grub. conf as follows:

Server:

kgdboc=ttyS1,115200

Client:

kgdboc=ttyS1,115200 kgdbwait

3) Serial Port Settings

http://www.goupteam.com/tech-expand/1259.html
https://www.vmware.com/support/ws5/doc/ws_devices_serial_2vms.html

 

Iii. Use instances

1) kernel debugging

http://blog.chinaunix.net/uid-20672257-id-2936794.html

2) module debugging

http://blog.chinaunix.net/uid-20672257-id-2936794.html
http://www.linuxidc.com/Linux/2013-01/77969.htm

 

Iv. FAQs

1) switch between kdb and kgdb

http://www.zeuux.com/blog/content/3736/

 

 

Reference: http://blog.chinaunix.net/uid-25538637-id-261329.html

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.