Skip to content

Instantly share code, notes, and snippets.

@xelemental
Created April 4, 2021 21:01
Show Gist options
  • Save xelemental/63c9bc3ddf23bc9ccebc129be3c1a837 to your computer and use it in GitHub Desktop.
Save xelemental/63c9bc3ddf23bc9ccebc129be3c1a837 to your computer and use it in GitHub Desktop.
  • Breakpoints
 → break <address> : Sets a new breakpoint
→ delete <breakpoint#> : Deletes a breakpoint
→ enable < breakpoint#> : Enable a disabled breakpoint
  • Variables and memory display
→ print <query> : Prints content of variable or register.
→ display : Prints the information after stepping each instruction
→ x/nfu <address> Print memory where n stands for number of units to print and f stands for format character and u stands for Unit which can be byte or word.
  • Stepping
→ stepi → Goes onto next instruction diving into function.
→ nexti : Goes onto next instruction without diving into functions.
→ continue : continues normal execution
  • Conditions
→ break <address> if  < condition> : Break at the given location if the condition is met.
→ condition<breakpoint#> : Set condition of an existing breakpoint.
  • Information:
→ disassemble <address/function> : Disassembles the function or given location.
→ info args : Prints the arguments to the function of the current stack frame.
→ info breakpoints: Shows information on the current breakpoints.
→ info locals: Shows information about the local variables in the selected stack frame.
→ info threads : Shows information on all threads.
→ whatis variable_name: Shows info on the type of the variable.
→ info sharedlibrary: Shows information on the loaded shared libraries.
  • Manipulating the program:
→ set var <variablename> = <value> : Sets the content of the variable to the new assigned value.
→ return <expressions> : Forces the current functio to return immediately passing the given value.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment