Skip to content

Instantly share code, notes, and snippets.

@jahewson
Last active December 12, 2015 02:58
Show Gist options
  • Save jahewson/4703265 to your computer and use it in GitHub Desktop.
Save jahewson/4703265 to your computer and use it in GitHub Desktop.
gdb quickstart
# first, compile your code with the `-g` flag
# this will get you line numbers
# now launch gdb with whatever arguments your program uses
gdb --args path/to/executable -every -arg you can=think < of
# to start debugging
run
# to get a stack trace
backtrace
# need more?
info
# all done
quit
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment