assignment 2 sarah diesburg co5641. assignment 2 other tools exist to ease kernel development and...

15
Assignment 2 SARAH DIESBURG CO5641

Upload: george-james

Post on 01-Jan-2016

215 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Assignment 2 SARAH DIESBURG CO5641. Assignment 2 Other tools exist to ease kernel development and debugging Pick a tool not already explained, set it

Assignment 2SARAH DIESBURG

CO5641

Page 2: Assignment 2 SARAH DIESBURG CO5641. Assignment 2 Other tools exist to ease kernel development and debugging Pick a tool not already explained, set it

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

Page 3: Assignment 2 SARAH DIESBURG CO5641. Assignment 2 Other tools exist to ease kernel development and debugging Pick a tool not already explained, set it

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

Page 4: Assignment 2 SARAH DIESBURG CO5641. Assignment 2 Other tools exist to ease kernel development and debugging Pick a tool not already explained, set it

Assignment 2 Goal

◦ Expose everyone to useful tools before major coding begins◦ Have useful discussion about tools

Page 5: Assignment 2 SARAH DIESBURG CO5641. Assignment 2 Other tools exist to ease kernel development and debugging Pick a tool not already explained, set it

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

Page 6: Assignment 2 SARAH DIESBURG CO5641. Assignment 2 Other tools exist to ease kernel development and debugging Pick a tool not already explained, set it

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/

Page 7: Assignment 2 SARAH DIESBURG CO5641. Assignment 2 Other tools exist to ease kernel development and debugging Pick a tool not already explained, set it

Assignment 2 Tool Choices

gdb◦ Find line of code where kernel oopsed◦ https://wiki.ubuntu.com/Kernel/KernelDebuggingTricks (bottom)

Page 8: Assignment 2 SARAH DIESBURG CO5641. Assignment 2 Other tools exist to ease kernel development and debugging Pick a tool not already explained, set it

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

Page 9: Assignment 2 SARAH DIESBURG CO5641. Assignment 2 Other tools exist to ease kernel development and debugging Pick a tool not already explained, set it

Assignment 2 Tool Choices

Eclipse◦ Full-featured IDE◦ http://wiki.eclipse.org/

HowTo_use_the_CDT_to_navigate_Linux_kernel_source

Page 10: Assignment 2 SARAH DIESBURG CO5641. Assignment 2 Other tools exist to ease kernel development and debugging Pick a tool not already explained, set it

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

Page 11: Assignment 2 SARAH DIESBURG CO5641. Assignment 2 Other tools exist to ease kernel development and debugging Pick a tool not already explained, set it

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

Page 12: Assignment 2 SARAH DIESBURG CO5641. Assignment 2 Other tools exist to ease kernel development and debugging Pick a tool not already explained, set it

Assignment 2 Tool Choices

LTTng◦ Linux Trace Toolkit – next generation◦ Uses tracing to debug the kernel◦ Records low-level events◦ Customizable◦ https://lttng.org/

Page 13: Assignment 2 SARAH DIESBURG CO5641. Assignment 2 Other tools exist to ease kernel development and debugging Pick a tool not already explained, set it

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/

Page 14: Assignment 2 SARAH DIESBURG CO5641. Assignment 2 Other tools exist to ease kernel development and debugging Pick a tool not already explained, set it

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

Page 15: Assignment 2 SARAH DIESBURG CO5641. Assignment 2 Other tools exist to ease kernel development and debugging Pick a tool not already explained, set it

Assignment 2 Tool Choices

A tool not mentioned here◦ Something you have seen in the kernel hacking menu?◦ Email me or Bobby for approval