WCU / Cybersecurity
~/CSC 471/Class 02/KP 19
Class 02 · KP 19 / 23

Reading Disassembly in Ghidra and GDB

Ghidra

  • Free, NSA-built; Listing view (asm) + Decompiler (C-like) side by side.
  • Right-click to rename variables/functions as you understand them.
  • Function graph view shows basic blocks and control flow.

GDB

  • set disassembly-flavor intel — use Intel syntax.
  • disassemble main — dump a function's asm.
  • info registers — view RAX, RIP, RFLAGS, etc.
  • x/16xb $rsp — examine 16 bytes at the stack pointer.
  • layout asm / layout regs — live TUI views.