This is my first debugger which uses libelfin and linenoise. Currentle it is a simple command-line debugger with basic functionality for controlling program execution, managing breakpoints, and inspecting/modifying register values.
-
Download this repositry using
git clone [https://github.com/K1r4-021/My_debugger.git](https://github.com/K1r4-021/My_debugger.git)
-
Enter the Directory
cd My_debugger
-
compile the debugger using cmake
cmake -B build cmake --build build
- To run
./My_debugger <program_name>
- Continue execution until the next breakpoint.
continue, c, cont
- Exit the debugger.
exit, exit(), q
- Set a breakpoint at the specified address.
bp, breakpoint <addr>
- Set a breakpoint at the specified line number.
bp, breakpoint <filename>:<line>
- Set a breakpoint at specified function.
bp, breakpoint <function name>
- Dump the current state of the registers.
dump
- Single step instruction.
stepi
- Step into.
si, step into
- Step out.
finsh, step out
- Step over.
ni, step over
- Print the value of the specified register name.
print <register>
- Set the specified register to the given value.
set <register> <value>
- Show information about breakpoints.
info breakpoint, info bp
- Delete breakpoints
delete breakpoints
- Print the symbol of function
symbol <function>
- Print value of the variable
info variable
- Gives the chain of function calls.
backtrace
- Show the help menu.
help
Feel free to open issues or submit pull requests if you find any bugs or have suggestions for new features.