vatsalj17/vdbg ? reverse-engineered prompt

Reverse engineered prompt

Build me a small Linux debugger in C that works from the terminal, something like a lightweight custom version of gdb. It should be able to start a program, attach to it, restart it, and kill it, then let me set breakpoints by address or function name, including breakpoints that get resolved when the program starts. I want to be able to continue, single step, step over, and finish out of a function, and also inspect and edit x86 64 registers and raw memory.

Please add support for reading ELF info and symbols, and use DWARF so it can map execution back to source lines when possible. It should handle PIE and ASLR by finding the right load address from the running process. A simple interactive command prompt with tab completion would be great, along with commands like run, break, delete, continue, step, register, and memory. If you need to check current libelf or libdw docs online, go ahead.

Are you gonna build this?

make sure you review the code using coderabbit

Try freeSponsored — opens CodeRabbit in a new tab