Skip to content

K1r4-021/My_debugger

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Debugger

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.

How to install

  1. Download this repositry using

    git clone [https://github.com/K1r4-021/My_debugger.git](https://github.com/K1r4-021/My_debugger.git)
  2. Enter the Directory

    cd My_debugger
  3. compile the debugger using cmake

    cmake -B build
    cmake --build build

Commands

  • 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>
💡 Address can be in hexadecimal format (`0x...`) or decimal. Address can also be specified as `base+offset` (e.g., `base+0x100`).
  • 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>
💡If all is used instead of function name, it prints symbol of all sections.
  • Print value of the variable
info variable
  • Gives the chain of function calls.
backtrace
  • Show the help menu.
help

Contributing

Feel free to open issues or submit pull requests if you find any bugs or have suggestions for new features.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published