Debugging Linux Kernel in Deep - Part 2

所在平台: Udemy

课程主页: https://www.udemy.com/course/debugging-linux-kernel-in-deep-part-2/

课程评论:没有评论

第一个写评论        关注课程

课程简介

**课程名称:** Debugging Linux Kernel in Deep - Part 2 **课程概述:** 本课程聚焦于使用GDB调试Linux内核,这是用户空间进程调试的强大工具。虽然GDB通常用于用户空间调试,但本课程将探讨如何将GDB应用于正在运行的Linux内核。 **核心问题与解决思路:** * **问题:** 如何像调试用户空间进程一样调试一个正在运行的Linux内核? * **解决方案:** 采用客户端/服务器架构。用户空间程序可以通过在目标机器上运行`gdbserver`,并在宿主/开发机上运行`gdb`来实现远程调试。Linux内核通过名为**KGDB**的GDB服务器实现,它可以通过网络或串行端口与GDB客户端通信。 **课程内容亮点:** * **KGDB的设置与配置:** 学习如何系统地配置和准备KGDB以进行内核调试。 * **连接目标机器的多种方式:** 探索将目标内核机与开发机连接进行调试的不同方法。 * **GDB核心调试功能在内核中的应用:** * 设置和管理断点。 * 打印和修改内核变量。 * 在GDB窗口中查看调用堆栈信息。 * **串行端口的双重利用:** 学习如何使用单个串行端口同时传输KGDB通信和控制台消息。 * **捕获内核消息:** 学习如何在GDB窗口中接收和查看内核输出信息。 * **内核模块调试:** 深入学习如何调试内核中的各种模块,包括“In-Tree”(包含在内核源代码树中的)和“Out of Tree”(独立开发的)模块。 * **GDB脚本的利用:** 掌握Linux内核中提供的GDB脚本,以增强调试效率。 **课程目标:** 通过本课程的学习,学员将能够熟练使用KGDB和GDB对Linux内核进行深入调试,解决实际的内核开发和故障排除问题。

课程评论(0条)

课程详情

User space processes can be debugged using gdb. With gdb you can single-step, stop, resume, put break-points, inspect memory and variables, look through call stack informationWhat if we can use gdb on running Linux Kernel.Problem:How can a gdb debug running kernel as it is just a user space process.Solution:Client/Server ArchitectureUser space programs can be debugged remotely using the combination of gdbserver on the target machine and gdb on the host machine/development machine.The Linux kernel has a GDB Server implementation called KGDB. It communicates with a GDB client over network or serial port connectionIn this course we will learn:How to setup KGDBVarious ways of getting the target into development machineSetting BreakpointsPrinting and Setting VariablesUsing a single serial port for both kgdb and console messagesGetting the kernel messages in gdb windowDebugging Linux Kernel Modules (In-Tree, out of tree)Use of GDB Scripts present in the Linux Kernel

课程标签

0人关注该课程

主题相关的课程