Used to debug a target process. More...
Inherits BinNavi::APIHelpers::ApiObject< IDebugger >.
Public Member Functions | |
| void | addListener (final IDebuggerListener listener) |
| Adds a debugger listener. | |
| void | cancelTargetSelection () throws DebugException |
| void | connect () throws DebugException |
| Connects to the target process. | |
| void | detach () throws DebugException |
| Detaches from the target process. | |
| BookmarkManager | getBookmarkManager () |
| The bookmark manager of the debugger. | |
| BreakpointManager | getBreakpointManager () |
| The breakpoint manager of the debugger. | |
| Process | getProcess () |
| The process debugged by the debugger. | |
| boolean | isConnected () |
| Checks if the debugger is connected. | |
| void | readMemory (final Address address, final int size) throws DebugException |
| Reads memory of the target process. | |
| void | readRegisters () throws DebugException |
| Reads the registers of all threads. | |
| void | removeListener (final IDebuggerListener listener) |
| Removes a debugger listener. | |
| void | requestFileSystem (final String path) throws DebugException |
| void | requestFileSystem () throws DebugException |
| void | resume () throws DebugException |
| Resumes the active thread thread in the target process. | |
| void | selectFile (final String file) throws DebugException |
| void | singleStep () throws DebugException |
| Single-steps thread in the target process. | |
| void | terminate () throws DebugException |
| Terminates the target process. | |
| Address | toFilebase (final Module module, final Address address) |
| Converts memory addresses to file addresses. | |
| Address | toImagebase (final Module module, final Address address) |
| Converts file addresses to memory addresses. | |
| String | toString () |
| Printable representation of the debugger. | |
| void | writeMemory (final Address address, final byte[] data) throws DebugException |
| Writes target process memory. | |
| void | writeRegister (final long tid, final String register, final long value) throws DebugException |
| Writes a register value. | |
Debugger object that can be used to debug modules or projects.
| void BinNavi.API.debug.Debugger.addListener | ( | final IDebuggerListener | listener | ) |
Adds a debugger listener object that is notified about incoming debug messages and changes in the debugger state.
Note that this function adds very low-level listeners. If possible you should use higher-level listeners like IThreadListener or IProcessListener.
| listener | The listener object to add. |
| void BinNavi.API.debug.Debugger.cancelTargetSelection | ( | ) | throws DebugException |
Cancels the target selection of the debugger and closes the connection.
| DebugException | Thrown if an error occurred during cancellation. |
| void BinNavi.API.debug.Debugger.connect | ( | ) | throws DebugException |
Connects to the target process.
| DebugException | Thrown if the debugger could not connect to the target process. |
| void BinNavi.API.debug.Debugger.detach | ( | ) | throws DebugException |
Detaches from the target process.
| DebugException | Thrown if the debug command could not be executed. |
| BookmarkManager BinNavi.API.debug.Debugger.getBookmarkManager | ( | ) |
Returns the bookmark manager of the debugger. This manager can be used to set and remove memory bookmarks.
| BreakpointManager BinNavi.API.debug.Debugger.getBreakpointManager | ( | ) |
Returns the breakpoint manager of the debugger. This manager can be used to set and remove breakpoints.
| Process BinNavi.API.debug.Debugger.getProcess | ( | ) |
Returns the target process debugged by the debugger.
| boolean BinNavi.API.debug.Debugger.isConnected | ( | ) |
Returns a flag that indicates whether the debugger is active or not.
| void BinNavi.API.debug.Debugger.readMemory | ( | final Address | address, | |
| final int | size | |||
| ) | throws DebugException |
Reads memory of the target process.
| address | Start address of the memory read operation. | |
| size | Number of bytes to read. |
| IllegalArgumentException | Thrown if the address argument is null. | |
| DebugException | Thrown if the debug command could not be executed. |
| void BinNavi.API.debug.Debugger.readRegisters | ( | ) | throws DebugException |
Reads the current register values of all threads of the target process.
| DebugException | Thrown if the debug command could not be executed. |
| void BinNavi.API.debug.Debugger.removeListener | ( | final IDebuggerListener | listener | ) |
Removes a debugger listener from the debugger.
| listener | The debugger listener to remove. |
| void BinNavi.API.debug.Debugger.requestFileSystem | ( | ) | throws DebugException |
Request the file system listing from the debug client.
| DebugException | Thrown if the debug command could not be executed. |
| void BinNavi.API.debug.Debugger.requestFileSystem | ( | final String | path | ) | throws DebugException |
Request the file system listing for the given path.
| path | The base directory to be listed. |
| DebugException | Thrown if the debug command could not be executed. |
| void BinNavi.API.debug.Debugger.resume | ( | ) | throws DebugException |
Executes a resume command in the active thread.
| DebugException | Thrown if the debug command could not be executed. |
| void BinNavi.API.debug.Debugger.selectFile | ( | final String | file | ) | throws DebugException |
Tells the debug client to select the given file as the target process executable file.
| file | The path to the target file. |
| DebugException | Thrown if the debug command could not be executed. |
| void BinNavi.API.debug.Debugger.singleStep | ( | ) | throws DebugException |
Executes a single step operation in the active thread.
| DebugException | Thrown if the debug command could not be executed. |
| void BinNavi.API.debug.Debugger.terminate | ( | ) | throws DebugException |
Terminates the target process and the debug client.
| DebugException | Thrown if the debug command could not be executed. |
Converts a memory-relocated address to the same address in the unrelocated module.
| module | The module the relocated address belongs to. | |
| address | The memory-relocated address to convert. |
Converts a file address to the same address in the relocated module.
| module | The module the file address address belongs to. | |
| address | The file address to convert. |
| String BinNavi.API.debug.Debugger.toString | ( | ) |
Returns a string representation of the debugger.
| void BinNavi.API.debug.Debugger.writeMemory | ( | final Address | address, | |
| final byte[] | data | |||
| ) | throws DebugException |
Writes to the memory of the target process.
| address | Start address of the memory write operation. | |
| data | Data to be written to the target memory. |
| DebugException | Thrown if the message could not be sent to the debug client. |
| void BinNavi.API.debug.Debugger.writeRegister | ( | final long | tid, | |
| final String | register, | |||
| final long | value | |||
| ) | throws DebugException |
Changes the value of a register in the given thread.
| tid | Thread ID of the thread whose register value is changed. | |
| register | Name of the register to change. | |
| value | The new value of the register. |
| DebugException | Thrown if the message could not be sent to the debug client. |
1.7.1