C# Class Fuzzer.TargetConnectors.GDB.GDBSubProcess

Provides access to a GDB sub prcess
Parameters: "gdb_exec": path to the gdb executable "args": extra arguments to pass to gdb "gdb_log": stream:stderr to write gdb output and commands to standard error output stream:stdout standard output file:filename to write to specified file The executable will be loaded using the file command
Inheritance: Fuzzer.IO.ConsoleIO.ConsoleProcess
Show file Open project: areiter/InMemoryFuzzing Class Usage Examples

Protected Properties

Property Type Description
_gdbLog System.IO.TextWriter
_gdbReadyForInput bool

Public Methods

Method Description
GDBSubProcess ( ) : System
QueueCommand ( GDBCommand cmd ) : void

Queues the command, it gets sent as soon as gdb is ready for input

Setup ( string>.IDictionary config ) : void

Protected Methods

Method Description
GdbLog ( char c ) : void
GdbLog ( string data ) : void
GdbLogLine ( string data ) : void
RegisterPermanentResponseHandler ( GDBResponseHandler responseHandler ) : void
StartProcess ( ) : void
Write ( string format ) : void
WriteLine ( string format ) : void

Private Methods

Method Description
ProcessQueue ( ) : void

Checks if gdb is ready and sends the next command

ReadThread ( object data ) : void
ReceivedNewLine ( List lines ) : void

Processes responses received from GDB. There may be direct responses to commands or async responses

Method Details

GDBSubProcess() public method

public GDBSubProcess ( ) : System
return System

GdbLog() protected method

protected GdbLog ( char c ) : void
c char
return void

GdbLog() protected method

protected GdbLog ( string data ) : void
data string
return void

GdbLogLine() protected method

protected GdbLogLine ( string data ) : void
data string
return void

QueueCommand() public method

Queues the command, it gets sent as soon as gdb is ready for input
public QueueCommand ( GDBCommand cmd ) : void
cmd GDBCommand /// A ///
return void

RegisterPermanentResponseHandler() protected method

protected RegisterPermanentResponseHandler ( GDBResponseHandler responseHandler ) : void
responseHandler GDBResponseHandler
return void

Setup() public method

public Setup ( string>.IDictionary config ) : void
config string>.IDictionary
return void

StartProcess() protected method

protected StartProcess ( ) : void
return void

Write() protected method

protected Write ( string format ) : void
format string
return void

WriteLine() protected method

protected WriteLine ( string format ) : void
format string
return void

Property Details

_gdbLog protected property

Logs the entire GDB communication
protected TextWriter,System.IO _gdbLog
return System.IO.TextWriter

_gdbReadyForInput protected property

Contains if the "(gdb)" prompt has already been received after the last command
protected bool _gdbReadyForInput
return bool