GDB and LLDB Debugger Snippets
Source: GDB to LLDB command map, Debugging Rust apps with GDB - LogRocket Blog
Note commands/aliases like run (r), step (s), and breakpoint (b) are similar or same with GDB and LLDB
Commands below are confirmed to work with rust-gdb
# Debug specific binaryrust-gdb target/debug/examples/basic
# Help informationhelp
# Quitq
# Runr
# Set breakpoint (break) on a functionb get_chip
# Set breakpoint on file and line numberb main.rs:22
# Breakpoint informationb info
# Breakpoint disable itdisable 1
# Step - nextn
# Step - step intos
# Step - finish functionfinish
# Step - continue executionc
# Repeat previous commandEnter
# Check incoming argumentsinfo args
# Print information on variable, functionp variable_namep code_element
# Frame - check current code execution linef# Set - change state of variablesset var_name = my_value
# Layout - See debugging location in source codelayout srclayout split
# Layout - remove layoutCtrl + x a