Skip to content

Instantly share code, notes, and snippets.

@JeOam
Last active December 23, 2015 15:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save JeOam/bf7a4997e732926f1565 to your computer and use it in GitHub Desktop.
Save JeOam/bf7a4997e732926f1565 to your computer and use it in GitHub Desktop.
C Debug
@JeOam
Copy link
Author

JeOam commented Dec 22, 2015

Show the arguments that will be or were passed to the program when run:

settings show target.run-args

@JeOam
Copy link
Author

JeOam commented Dec 22, 2015

Set a breakpoint in file test.c at line 12:

b test.c:12

List all breakpoints:

br l

Delete a breakpoint:

br del 1

@JeOam
Copy link
Author

JeOam commented Dec 23, 2015

Run to breakpoint, Show the arguments and local variables for the current frame:

fr v

Show the local variables for the current frame:

fr v -a

Show the contents of local variable "bar".

p bar

@JeOam
Copy link
Author

JeOam commented Dec 23, 2015

Evaluating a generalized expression in the current frame:

print (int) printf ("Print nine: %d.", 4 + 5)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment