---
title: "GDB"
type: concept
related: [Gdb]
source: https://www.jemoka.com/posts/kbhgdb/
confidence: high
status: active
---

GDB is gnu&rsquo;s very own debugger
b main or b 72 (set breakpoint on main function or line 72) r args (run with args) p thingname or p 3+5 (print a variable or return value) p/t print as binary p/x print as hex info (get args, locals) n s continue next, step, continue int test; short lsb = 0xff; test |= lsb printf(&#34;%d\n&#34;,lsb); int test;
