Skip to content

Latest commit

 

History

History
40 lines (31 loc) · 1.2 KB

File metadata and controls

40 lines (31 loc) · 1.2 KB

Printfdebugger (literally)

Ever found yourself "printfdebugging"? This debugger (not some blasphemous gdb front-end) takes this experience to a new level.

It inserts a breakpoint at every line containing printf (even in comments!)

Caution

My flawless debugger only supports non-PIE executables on Linux

Building

Make sure you have the following installed:

  • Zig 0.15.2
  • libdw from elfutils

Then run

zig build -Dcpu=native -Doptimize=ReleaseSafe

to compile the project.

Running example

To just get a feel of how this thing absolutely bangs, let's printfdebug a sample program:

gcc debugee.c -o debugee -g -no-pie
zig build run -- debugee
# ✨ your turn to printf debug 💫

Usage

There is only one command - c for continue! Don't be fooled by a gdb like propmt, it's not interactive (it's time to grow up).

Issues

If there are any, idk, I coded this in several evenings for fun. (˵ •̀ ᴗ - ˵ )

References