Exploring Kernel Development Tools: Setup and Overview of Useful Resources
In this presentation, we will explore essential tools that ease kernel development and debugging, providing insights into their primary purposes, ease of setup, and practical usage. Participants will have the chance to learn about a selected tool, including its installation process and a brief tutorial. Our objective is to expose everyone to helpful resources for coding while facilitating valuable discussions. We will cover tools like Git for version control, GDB for debugging, and LTTng for tracing. Join us for an informative session enhanced by additional online references.
Exploring Kernel Development Tools: Setup and Overview of Useful Resources
E N D
Presentation Transcript
Assignment 2 Sarah Diesburg co5641
Assignment 2 • Other tools exist to ease kernel development and debugging • Pick a tool not already explained, set it up, and give a brief (10-15 minute) presentation • Powerpoint and/or demo
Assignment 2 • Try to answer the following questions • What is the tool’s primary purpose? • How useful is this tool? • How easy to set up? • Give a quick tutorial on basic usage • Link to references
Assignment 2 • Goal • Expose everyone to useful tools before major coding begins • Have useful discussion about tools
Assignment 2 • Clarification • You don’t have to know everything about your chosen tool • Give us a good idea • If you have trouble setting up the tool… • Create a presentation instead of a demo to discuss tool • Cite your web sources • Explain what the troubles were
Assignment 2 Tool Choices • Git • Open source distributed version control system • Initially developed by Linus Torvalds for Linux kernel development • Necessary tool • Can use departmental servers (e.g. shell, linprog) • http://git-scm.com/
Assignment 2 Tool Choices • gdb • Find line of code where kernel oopsed • https://wiki.ubuntu.com/Kernel/KernelDebuggingTricks (bottom)
Assignment 2 Tool Choices • kgdb • Used along with gdb to debug the Linux kernel • Requires two machines that are connected via a serial connection or virtual machine • Look at kernel hacking menu in “make menuconfig” • http://kgdb.geeksofpune.in/tocdebug.htm
Assignment 2 Tool Choices • Eclipse • Full-featured IDE • http://wiki.eclipse.org/HowTo_use_the_CDT_to_navigate_Linux_kernel_source
Assignment 2 Tool Choices • Doxygen • Graphical documentation system • View dependency graphs, classes, defines, and comments • Example: http://www.vtk.org/doc/nightly/html/index.html • http://www.doxygen.org
Assignment 2 Tool Choices • Capturing kernel oops • Sometimes kernel oops are not recordable and scroll off the screen • General presentation to capture oops messages, can include • Making console font smaller – will not scroll off screen • Serial connection • Virtual machine with minicom • Remote logging • In-depth presentation of Magic SysRq • Use this link to get started: https://wiki.ubuntu.com/Kernel/KernelDebuggingTricks
Assignment 2 Tool Choices • LTTng • Linux Trace Toolkit – next generation • Uses tracing to debug the kernel • Records low-level events • Customizable • https://lttng.org/
Assignment 2 Tool Choices • Local indexers • cscope • Console-mode interface to search source code • http://en.wikipedia.org/wiki/Cscope • Alternatively, CCTree as a native Vim plugin • http://www.vim.org/scripts/script.php?script_id=2368 • etags/ctags • Generate tag files for emacs, vim • http://www.delorie.com/gnu/docs/emacs/etags.1.html • http://ctags.sourceforge.net/
Assignment 2 Tool Choices • /proc files • These special files report status information from the kernel to user space. • (some examples) http://www.centos.org/docs/5/html/Deployment_Guide-en-US/s1-proc-topfiles.html
Assignment 2 Tool Choices • A tool not mentioned here • Something you have seen in the kernel hacking menu? • Email me or Bobby for approval