C# Class Fuzzer.TargetConnectors.GDB.GDBConnector

Inheritance: GDBSubProcess, ITargetConnector, ISymbolTable
Show file Open project: areiter/InMemoryFuzzing Class Usage Examples

Protected Properties

Property Type Description
_file string
_runArgs string

Public Methods

Method Description
AllocateMemory ( System.UInt64 size ) : IAllocatedMemory

Uses malloc to allocate some more memory, there might be problems if malloc is not available in the current process. Maybe there is a better GDB-only solution?

Close ( ) : void
Connect ( ) : void
CreateCStyleReferenceOperatorVariable ( string expression, int size ) : ISymbolTableVariable
CreateCalculatedVariable ( string expression, int size ) : ISymbolTableVariable
CreateLogger ( string destination ) : IDataLogger
CreateSnapshot ( ) : ISnapshot
CreateVariable ( IAddressSpecifier address, int size ) : ISymbolTableVariable
CreateVariable ( string name, int size ) : ISymbolTableVariable
DebugContinue ( ) : IDebuggerStop
DebugContinue ( bool reverse ) : IDebuggerStop
FindMethod ( string methodName ) : ISymbolTableMethod
FreeMemory ( IAllocatedMemory memory ) : void

AllocateMemory

GDBConnector ( ) : System
GetParametersForMethod ( ISymbolTableMethod method ) : ISymbolTableVariable[]
GetRegisterValue ( string register ) : UInt64?
GetRegisters ( ) : Registers
GetStackFrameInfo ( ) : IStackFrameInfo
LookupBreakpoint ( int breakpointNum ) : GDBBreakpoint
LookupBreakpointByAddress ( System.UInt64 address ) : GDBBreakpoint
ReadMemory ( byte buffer, ulong address, ulong size ) : ulong
ResolveSymbol ( ISymbol symbol ) : IAddressSpecifier
ResolveSymbolToBreakpointAddress ( ISymbolTableMethod symbol ) : IAddressSpecifier
SaveExecutionLog ( string filename ) : void

Saves the reverse execution log to the specified file

SetRegisterValue ( string name, string value ) : void
SetSoftwareBreakpoint ( ISymbolTableMethod method, System.UInt64 size, string identifier ) : IBreakpoint
SetSoftwareBreakpoint ( ulong address, ulong size, string identifier ) : IBreakpoint
Setup ( string>.IDictionary config ) : void
SourceToAddress ( string lineArg ) : IAddressSpecifier
WriteMemory ( byte buffer, ulong address, ulong size ) : ulong
WriteMemory ( byte buffer, ulong address, ulong size, ISnapshot &aSnapshot ) : ulong

Private Methods

Method Description
BreakpointRemoveFromList ( int breakpointNum ) : void
CheckCachedMethods ( bool forced ) : void
GdbStopped ( StopReasonEnum stopReason, GDBBreakpoint breakpoint, System.UInt64 address, System.Int64 status ) : void

Method Details

AllocateMemory() public method

Uses malloc to allocate some more memory, there might be problems if malloc is not available in the current process. Maybe there is a better GDB-only solution?
public AllocateMemory ( System.UInt64 size ) : IAllocatedMemory
size System.UInt64 /// A ///
return IAllocatedMemory

Close() public method

public Close ( ) : void
return void

Connect() public method

public Connect ( ) : void
return void

CreateCStyleReferenceOperatorVariable() public method

public CreateCStyleReferenceOperatorVariable ( string expression, int size ) : ISymbolTableVariable
expression string
size int
return ISymbolTableVariable

CreateCalculatedVariable() public method

public CreateCalculatedVariable ( string expression, int size ) : ISymbolTableVariable
expression string
size int
return ISymbolTableVariable

CreateLogger() public method

public CreateLogger ( string destination ) : IDataLogger
destination string
return IDataLogger

CreateSnapshot() public method

public CreateSnapshot ( ) : ISnapshot
return ISnapshot

CreateVariable() public method

public CreateVariable ( IAddressSpecifier address, int size ) : ISymbolTableVariable
address IAddressSpecifier
size int
return ISymbolTableVariable

CreateVariable() public method

public CreateVariable ( string name, int size ) : ISymbolTableVariable
name string
size int
return ISymbolTableVariable

DebugContinue() public method

public DebugContinue ( ) : IDebuggerStop
return IDebuggerStop

DebugContinue() public method

public DebugContinue ( bool reverse ) : IDebuggerStop
reverse bool
return IDebuggerStop

FindMethod() public method

public FindMethod ( string methodName ) : ISymbolTableMethod
methodName string
return ISymbolTableMethod

FreeMemory() public method

AllocateMemory
public FreeMemory ( IAllocatedMemory memory ) : void
memory IAllocatedMemory /// A ///
return void

GDBConnector() public method

public GDBConnector ( ) : System
return System

GetParametersForMethod() public method

public GetParametersForMethod ( ISymbolTableMethod method ) : ISymbolTableVariable[]
method ISymbolTableMethod
return ISymbolTableVariable[]

GetRegisterValue() public method

public GetRegisterValue ( string register ) : UInt64?
register string
return UInt64?

GetRegisters() public method

public GetRegisters ( ) : Registers
return Registers

GetStackFrameInfo() public method

public GetStackFrameInfo ( ) : IStackFrameInfo
return IStackFrameInfo

LookupBreakpoint() public method

public LookupBreakpoint ( int breakpointNum ) : GDBBreakpoint
breakpointNum int
return GDBBreakpoint

LookupBreakpointByAddress() public method

public LookupBreakpointByAddress ( System.UInt64 address ) : GDBBreakpoint
address System.UInt64
return GDBBreakpoint

ReadMemory() public method

public ReadMemory ( byte buffer, ulong address, ulong size ) : ulong
buffer byte
address ulong
size ulong
return ulong

ResolveSymbol() public method

public ResolveSymbol ( ISymbol symbol ) : IAddressSpecifier
symbol ISymbol
return IAddressSpecifier

ResolveSymbolToBreakpointAddress() public method

public ResolveSymbolToBreakpointAddress ( ISymbolTableMethod symbol ) : IAddressSpecifier
symbol ISymbolTableMethod
return IAddressSpecifier

SaveExecutionLog() public method

Saves the reverse execution log to the specified file
public SaveExecutionLog ( string filename ) : void
filename string
return void

SetRegisterValue() public method

public SetRegisterValue ( string name, string value ) : void
name string
value string
return void

SetSoftwareBreakpoint() public method

public SetSoftwareBreakpoint ( ISymbolTableMethod method, System.UInt64 size, string identifier ) : IBreakpoint
method ISymbolTableMethod
size System.UInt64
identifier string
return IBreakpoint

SetSoftwareBreakpoint() public method

public SetSoftwareBreakpoint ( ulong address, ulong size, string identifier ) : IBreakpoint
address ulong
size ulong
identifier string
return IBreakpoint

Setup() public method

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

SourceToAddress() public method

public SourceToAddress ( string lineArg ) : IAddressSpecifier
lineArg string
return IAddressSpecifier

WriteMemory() public method

public WriteMemory ( byte buffer, ulong address, ulong size ) : ulong
buffer byte
address ulong
size ulong
return ulong

WriteMemory() public method

public WriteMemory ( byte buffer, ulong address, ulong size, ISnapshot &aSnapshot ) : ulong
buffer byte
address ulong
size ulong
aSnapshot ISnapshot
return ulong

Property Details

_file protected property

File to read the symbol table from.
protected string _file
return string

_runArgs protected property

In case the program is not started yet and the gdb connector executes a "run" command the _runArgs are appended and passed to the program
protected string _runArgs
return string