Skip to content

Debugging

Eric Clack edited this page Nov 19, 2019 · 1 revision

How to use GDB to debug

Here are the commands we find most useful:

  • c continue, or start the program
  • Ctrl-C, halt the program
  • break, e.g. break main.rs:39 breaks at line 39 of main.rs
  • info locals, show all local variables
  • set ms = 100, set a local variable
  • clear main.rs:39 or just clear if you are in the right place - clear breakpoint.
  • bt - the back trace or call stack.
Clone this wiki locally