gdb_tutorial

gdb_tutorial - CSCI 2400 GDB Tutorial Introduction to the...

Info iconThis preview shows pages 1–8. Sign up to view the full content.

View Full Document Right Arrow Icon
CSCI 2400: GDB Tutorial Introduction to the GNU Project Debugger By: Gary Yee University of Colorado, Boulder
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Simple Debugging Only option: Post-Mortem Analysis. Lots and lots of printf's.
Background image of page 2
Debugging with GDB Allows live debugging: Set breakpoints Step-by-step execution at C AND instruction level Display source code / stack Display / modify variables Jump to another line of code
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Read First! Commands will be in Courier Font . Optional arguments are in square brackets. Not all optional arguments may be listed. Required arguments are in angle brackets. Example: ls [directory name]
Background image of page 4
Starting GDB gcc with '-g' flag (GDB flag) ---------------------------------------- $ gcc -g foo.c -o foo $ gdb foo ## . .. some GDB output . .. (gdb)
Background image of page 5

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Essential Commands help run set args [arguments] List no arguments to clear the argument list. quit NOTE: Tab completion is your friend.
Background image of page 6
Breakpoints breakpoints - allows you to pause your program
Background image of page 7

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 8
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 12/07/2010 for the course CSCI 2400 taught by Professor Grundwald during the Fall '08 term at Colorado.

Page1 / 16

gdb_tutorial - CSCI 2400 GDB Tutorial Introduction to the...

This preview shows document pages 1 - 8. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online