C# Class Mono.Debugger.Backend.Inferior

Inheritance: TargetAccess, ITargetNotification, IDisposable
Show file Open project: baulig/debugger Class Usage Examples

Protected Properties

Property Type Description
address_domain AddressDomain
breakpoint_manager BreakpointManager
error_handler DebuggerErrorHandler
exe NativeExecutableReader
io_data System.IntPtr
native bool
process System.Diagnostics.Process
server_handle System.IntPtr
start ProcessStart
thread_manager ThreadManager

Private Properties

Property Type Description
GetCallbackFrame CallbackFrame
InsertBreakpoint void
RemoveBreakpoint void
SetRuntimeInfo void
change_target_state TargetState
check_disposed void
g_free void
get_current_frame ServerStackFrame
io_thread_main void
mono_debugger_server_abort_invoke TargetError
mono_debugger_server_attach TargetError
mono_debugger_server_call_method TargetError
mono_debugger_server_call_method_1 TargetError
mono_debugger_server_call_method_2 TargetError
mono_debugger_server_call_method_3 TargetError
mono_debugger_server_call_method_invoke TargetError
mono_debugger_server_continue TargetError
mono_debugger_server_create_inferior System.IntPtr
mono_debugger_server_current_insn_is_bpt TargetError
mono_debugger_server_detach TargetError
mono_debugger_server_detach_after_fork TargetError
mono_debugger_server_disable_breakpoint TargetError
mono_debugger_server_dispatch_event ChildEventType
mono_debugger_server_enable_breakpoint TargetError
mono_debugger_server_execute_instruction TargetError
mono_debugger_server_finalize TargetError
mono_debugger_server_get_application TargetError
mono_debugger_server_get_callback_frame TargetError
mono_debugger_server_get_capabilities ServerCapabilities
mono_debugger_server_get_frame TargetError
mono_debugger_server_get_pending_signal TargetError
mono_debugger_server_get_registers TargetError
mono_debugger_server_get_server_type ServerType
mono_debugger_server_get_signal_info TargetError
mono_debugger_server_get_target_info TargetError
mono_debugger_server_get_threads TargetError
mono_debugger_server_initialize_process TargetError
mono_debugger_server_initialize_thread TargetError
mono_debugger_server_insert_breakpoint TargetError
mono_debugger_server_insert_hw_breakpoint TargetError
mono_debugger_server_io_thread_main TargetError
mono_debugger_server_kill TargetError
mono_debugger_server_mark_rti_frame TargetError
mono_debugger_server_pop_registers TargetError
mono_debugger_server_push_registers TargetError
mono_debugger_server_read_memory TargetError
mono_debugger_server_remove_breakpoint TargetError
mono_debugger_server_restart_notification TargetError
mono_debugger_server_resume TargetError
mono_debugger_server_set_registers TargetError
mono_debugger_server_set_runtime_info void
mono_debugger_server_set_signal TargetError
mono_debugger_server_spawn TargetError
mono_debugger_server_step TargetError
mono_debugger_server_stop TargetError
mono_debugger_server_stop_and_wait TargetError
mono_debugger_server_write_memory TargetError
read_buffer System.IntPtr

Public Methods

Method Description
AbortInvoke ( long rti_id ) : void
Attach ( int pid ) : void
CallMethod ( TargetAddress method, byte data, long callback_arg ) : void
CallMethod ( TargetAddress method, long method_argument, TargetObject obj, long callback_arg ) : void
CallMethod ( TargetAddress method, long data1, long data2, long callback_arg ) : void
CallMethod ( TargetAddress method, long arg1, long arg2, long arg3, string arg4, long callback_arg ) : void
Continue ( ) : void
CreateInferior ( ThreadManager thread_manager, Process process, ProcessStart start ) : Inferior
CreateOperatingSystemBackend ( Process process ) : OperatingSystemBackend
CreateThread ( int pid, bool do_attach ) : Inferior
Detach ( ) : void
DetachAfterFork ( ) : void
DisableBreakpoint ( int breakpoint ) : void
Dispose ( ) : void
EnableBreakpoint ( int breakpoint ) : void
ExecuteInstruction ( byte instruction, bool update_ip ) : void
GetCurrentFrame ( ) : StackFrame
GetCurrentFrame ( bool may_fail ) : StackFrame
GetFileContents ( string filename ) : string
GetMemoryMaps ( ) : TargetMemoryArea[]
GetPendingSignal ( ) : int
GetRegisters ( ) : Registers
GetSectionAddress ( string name ) : TargetAddress
GetTargetInfo ( ) : TargetInfo
GetTargetMemoryInfo ( AddressDomain domain ) : TargetMemoryInfo
GetThreads ( ) : int[]
InitializeAfterExec ( int pid ) : void
InitializeThread ( int pid ) : void
InsertBreakpoint ( TargetAddress address ) : int
InsertHardwareBreakpoint ( TargetAddress address, bool fallback, int &index ) : int
InsertHardwareWatchPoint ( TargetAddress address, HardwareBreakpointType type, int &index ) : int
IsManagedSignal ( int signal ) : bool
Kill ( ) : void
MarkRuntimeInvokeFrame ( ) : void
PopRegisters ( ) : void
ProcessEvent ( int status ) : ChildEvent
PushRegisters ( ) : TargetAddress
ReadAddress ( TargetAddress address ) : TargetAddress
ReadBuffer ( TargetAddress address, int size ) : byte[]
ReadByte ( TargetAddress address ) : byte
ReadInteger ( TargetAddress address ) : int
ReadLongInteger ( TargetAddress address ) : long
ReadMemory ( TargetAddress address, int size ) : TargetBlob
ReadString ( TargetAddress address ) : string
RemoveBreakpoint ( int breakpoint ) : void
RestartNotification ( ) : void
Resume ( ) : void
Run ( ) : int
RuntimeInvoke ( TargetAddress invoke_method, TargetAddress method_argument, TargetObject object_argument, TargetObject param_objects, long callback_arg, bool debug ) : void
SetRegisters ( Registers registers ) : void
SetSignal ( int signal, bool send_it ) : void
Shutdown ( ) : void
SimpleLookup ( string name ) : TargetAddress
Step ( ) : void
Stop ( ) : bool

Just send the inferior a stop signal, but don't wait for it to stop. Returns true if it actually sent the signal and false if the target was already stopped.

Stop ( ChildEvent &new_event ) : bool

Stop the inferior. Returns true if it actually stopped the inferior and false if it was already stopped. Note that the target may have stopped abnormally in the meantime, in this case we return the corresponding ChildEvent.

WriteAddress ( TargetAddress address, TargetAddress value ) : void
WriteBuffer ( TargetAddress address, byte buffer ) : void
WriteByte ( TargetAddress address, byte value ) : void
WriteInteger ( TargetAddress address, int value ) : void
WriteLongInteger ( TargetAddress address, long value ) : void

Protected Methods

Method Description
Dispose ( bool disposing ) : void
GetApplication ( string &cwd, string &cmdline_args ) : string
Inferior ( ThreadManager thread_manager, Process process, ProcessStart start, BreakpointManager bpm, DebuggerErrorHandler error_handler, AddressDomain address_domain ) : System
OnMemoryChanged ( ) : void
SetupInferior ( ) : void
change_target_state ( TargetState new_state ) : TargetState
check_error ( TargetError error ) : void

Private Methods

Method Description
GetCallbackFrame ( TargetAddress stack_pointer, bool exact_match ) : CallbackFrame
InsertBreakpoint ( BreakpointHandle handle, TargetAddress address, int domain ) : void
RemoveBreakpoint ( BreakpointHandle handle ) : void
SetRuntimeInfo ( IntPtr mono_runtime_info ) : void
change_target_state ( TargetState new_state, int arg ) : TargetState
check_disposed ( ) : void
g_free ( IntPtr data ) : void
get_current_frame ( ) : ServerStackFrame
io_thread_main ( ) : void
mono_debugger_server_abort_invoke ( IntPtr handle, long rti_id ) : TargetError
mono_debugger_server_attach ( IntPtr handle, int child_pid ) : TargetError
mono_debugger_server_call_method ( IntPtr handle, long method_address, long method_argument1, long method_argument2, long callback_argument ) : TargetError
mono_debugger_server_call_method_1 ( IntPtr handle, long method_address, long method_argument, long data_argument, long data_argument2, string string_argument, long callback_argument ) : TargetError
mono_debugger_server_call_method_2 ( IntPtr handle, long method_address, int data_size, IntPtr data, long callback_argument ) : TargetError
mono_debugger_server_call_method_3 ( IntPtr handle, long method_address, long method_argument, long address_argument, int blob_size, IntPtr blob_data, long callback_argument ) : TargetError
mono_debugger_server_call_method_invoke ( IntPtr handle, long invoke_method, long method_address, int num_params, int blob_size, IntPtr param_data, IntPtr offset_data, IntPtr blob_data, long callback_argument, bool debug ) : TargetError
mono_debugger_server_continue ( IntPtr handle ) : TargetError
mono_debugger_server_create_inferior ( IntPtr breakpoint_manager ) : IntPtr
mono_debugger_server_current_insn_is_bpt ( IntPtr handle, int &is_breakpoint ) : TargetError
mono_debugger_server_detach ( IntPtr handle ) : TargetError
mono_debugger_server_detach_after_fork ( IntPtr handle ) : TargetError
mono_debugger_server_disable_breakpoint ( IntPtr handle, int breakpoint ) : TargetError
mono_debugger_server_dispatch_event ( IntPtr handle, int status, long &arg, long &data1, long &data2, int &opt_data_size, IntPtr &opt_data ) : ChildEventType
mono_debugger_server_enable_breakpoint ( IntPtr handle, int breakpoint ) : TargetError
mono_debugger_server_execute_instruction ( IntPtr handle, IntPtr instruction, int insn_size, bool update_ip ) : TargetError
mono_debugger_server_finalize ( IntPtr handle ) : TargetError
mono_debugger_server_get_application ( IntPtr handle, IntPtr &exe_file, IntPtr &cwd, int &nargs, IntPtr &data ) : TargetError
mono_debugger_server_get_callback_frame ( IntPtr handle, long stack_pointer, bool exact_match, IntPtr info ) : TargetError
mono_debugger_server_get_capabilities ( ) : ServerCapabilities
mono_debugger_server_get_frame ( IntPtr handle, ServerStackFrame &frame ) : TargetError
mono_debugger_server_get_pending_signal ( IntPtr handle, int &signal ) : TargetError
mono_debugger_server_get_registers ( IntPtr handle, IntPtr values ) : TargetError
mono_debugger_server_get_server_type ( ) : ServerType
mono_debugger_server_get_signal_info ( IntPtr handle, IntPtr &data ) : TargetError
mono_debugger_server_get_target_info ( int &target_int_size, int &target_long_size, int &target_address_size, int &is_bigendian ) : TargetError
mono_debugger_server_get_threads ( IntPtr handle, int &count, IntPtr &data ) : TargetError
mono_debugger_server_initialize_process ( IntPtr handle ) : TargetError
mono_debugger_server_initialize_thread ( IntPtr handle, int child_pid, bool wait ) : TargetError
mono_debugger_server_insert_breakpoint ( IntPtr handle, long address, int &breakpoint ) : TargetError
mono_debugger_server_insert_hw_breakpoint ( IntPtr handle, HardwareBreakpointType type, int &index, long address, int &breakpoint ) : TargetError
mono_debugger_server_io_thread_main ( IntPtr io_data, ChildOutputHandler output_handler ) : TargetError
mono_debugger_server_kill ( IntPtr handle ) : TargetError
mono_debugger_server_mark_rti_frame ( IntPtr handle ) : TargetError
mono_debugger_server_pop_registers ( IntPtr handle ) : TargetError
mono_debugger_server_push_registers ( IntPtr handle, long &new_rsp ) : TargetError
mono_debugger_server_read_memory ( IntPtr handle, long start, int size, IntPtr data ) : TargetError
mono_debugger_server_remove_breakpoint ( IntPtr handle, int breakpoint ) : TargetError
mono_debugger_server_restart_notification ( IntPtr handle ) : TargetError
mono_debugger_server_resume ( IntPtr handle ) : TargetError
mono_debugger_server_set_registers ( IntPtr handle, IntPtr values ) : TargetError
mono_debugger_server_set_runtime_info ( IntPtr handle, IntPtr mono_runtime_info ) : void
mono_debugger_server_set_signal ( IntPtr handle, int signal, int send_it ) : TargetError
mono_debugger_server_spawn ( IntPtr handle, string working_directory, string argv, string envp, bool redirect_fds, int &child_pid, IntPtr &io_data, IntPtr &error ) : TargetError
mono_debugger_server_step ( IntPtr handle ) : TargetError
mono_debugger_server_stop ( IntPtr handle ) : TargetError
mono_debugger_server_stop_and_wait ( IntPtr handle, int &status ) : TargetError
mono_debugger_server_write_memory ( IntPtr handle, long start, int size, IntPtr data ) : TargetError
read_buffer ( TargetAddress address, int size ) : IntPtr

Method Details

AbortInvoke() public method

public AbortInvoke ( long rti_id ) : void
rti_id long
return void

Attach() public method

public Attach ( int pid ) : void
pid int
return void

CallMethod() public method

public CallMethod ( TargetAddress method, byte data, long callback_arg ) : void
method TargetAddress
data byte
callback_arg long
return void

CallMethod() public method

public CallMethod ( TargetAddress method, long method_argument, TargetObject obj, long callback_arg ) : void
method TargetAddress
method_argument long
obj Mono.Debugger.Languages.TargetObject
callback_arg long
return void

CallMethod() public method

public CallMethod ( TargetAddress method, long data1, long data2, long callback_arg ) : void
method TargetAddress
data1 long
data2 long
callback_arg long
return void

CallMethod() public method

public CallMethod ( TargetAddress method, long arg1, long arg2, long arg3, string arg4, long callback_arg ) : void
method TargetAddress
arg1 long
arg2 long
arg3 long
arg4 string
callback_arg long
return void

Continue() public method

public Continue ( ) : void
return void

CreateInferior() public static method

public static CreateInferior ( ThreadManager thread_manager, Process process, ProcessStart start ) : Inferior
thread_manager ThreadManager
process System.Diagnostics.Process
start ProcessStart
return Inferior

CreateOperatingSystemBackend() public static method

public static CreateOperatingSystemBackend ( Process process ) : OperatingSystemBackend
process System.Diagnostics.Process
return OperatingSystemBackend

CreateThread() public method

public CreateThread ( int pid, bool do_attach ) : Inferior
pid int
do_attach bool
return Inferior

Detach() public method

public Detach ( ) : void
return void

DetachAfterFork() public method

public DetachAfterFork ( ) : void
return void

DisableBreakpoint() public method

public DisableBreakpoint ( int breakpoint ) : void
breakpoint int
return void

Dispose() public method

public Dispose ( ) : void
return void

Dispose() protected method

protected Dispose ( bool disposing ) : void
disposing bool
return void

EnableBreakpoint() public method

public EnableBreakpoint ( int breakpoint ) : void
breakpoint int
return void

ExecuteInstruction() public method

public ExecuteInstruction ( byte instruction, bool update_ip ) : void
instruction byte
update_ip bool
return void

GetApplication() protected method

protected GetApplication ( string &cwd, string &cmdline_args ) : string
cwd string
cmdline_args string
return string

GetCurrentFrame() public method

public GetCurrentFrame ( ) : StackFrame
return System.Diagnostics.StackFrame

GetCurrentFrame() public method

public GetCurrentFrame ( bool may_fail ) : StackFrame
may_fail bool
return System.Diagnostics.StackFrame

GetFileContents() public static method

public static GetFileContents ( string filename ) : string
filename string
return string

GetMemoryMaps() public method

public GetMemoryMaps ( ) : TargetMemoryArea[]
return TargetMemoryArea[]

GetPendingSignal() public method

public GetPendingSignal ( ) : int
return int

GetRegisters() public method

public GetRegisters ( ) : Registers
return Registers

GetSectionAddress() public method

public GetSectionAddress ( string name ) : TargetAddress
name string
return TargetAddress

GetTargetInfo() public static method

public static GetTargetInfo ( ) : TargetInfo
return TargetInfo

GetTargetMemoryInfo() public static method

public static GetTargetMemoryInfo ( AddressDomain domain ) : TargetMemoryInfo
domain AddressDomain
return TargetMemoryInfo

GetThreads() public method

public GetThreads ( ) : int[]
return int[]

Inferior() protected method

protected Inferior ( ThreadManager thread_manager, Process process, ProcessStart start, BreakpointManager bpm, DebuggerErrorHandler error_handler, AddressDomain address_domain ) : System
thread_manager ThreadManager
process System.Diagnostics.Process
start ProcessStart
bpm BreakpointManager
error_handler DebuggerErrorHandler
address_domain AddressDomain
return System

InitializeAfterExec() public method

public InitializeAfterExec ( int pid ) : void
pid int
return void

InitializeThread() public method

public InitializeThread ( int pid ) : void
pid int
return void

InsertBreakpoint() public method

public InsertBreakpoint ( TargetAddress address ) : int
address TargetAddress
return int

InsertHardwareBreakpoint() public method

public InsertHardwareBreakpoint ( TargetAddress address, bool fallback, int &index ) : int
address TargetAddress
fallback bool
index int
return int

InsertHardwareWatchPoint() public method

public InsertHardwareWatchPoint ( TargetAddress address, HardwareBreakpointType type, int &index ) : int
address TargetAddress
type HardwareBreakpointType
index int
return int

IsManagedSignal() public method

public IsManagedSignal ( int signal ) : bool
signal int
return bool

Kill() public method

public Kill ( ) : void
return void

MarkRuntimeInvokeFrame() public method

public MarkRuntimeInvokeFrame ( ) : void
return void

OnMemoryChanged() protected method

protected OnMemoryChanged ( ) : void
return void

PopRegisters() public method

public PopRegisters ( ) : void
return void

ProcessEvent() public method

public ProcessEvent ( int status ) : ChildEvent
status int
return ChildEvent

PushRegisters() public method

public PushRegisters ( ) : TargetAddress
return TargetAddress

ReadAddress() public method

public ReadAddress ( TargetAddress address ) : TargetAddress
address TargetAddress
return TargetAddress

ReadBuffer() public method

public ReadBuffer ( TargetAddress address, int size ) : byte[]
address TargetAddress
size int
return byte[]

ReadByte() public method

public ReadByte ( TargetAddress address ) : byte
address TargetAddress
return byte

ReadInteger() public method

public ReadInteger ( TargetAddress address ) : int
address TargetAddress
return int

ReadLongInteger() public method

public ReadLongInteger ( TargetAddress address ) : long
address TargetAddress
return long

ReadMemory() public method

public ReadMemory ( TargetAddress address, int size ) : TargetBlob
address TargetAddress
size int
return TargetBlob

ReadString() public method

public ReadString ( TargetAddress address ) : string
address TargetAddress
return string

RemoveBreakpoint() public method

public RemoveBreakpoint ( int breakpoint ) : void
breakpoint int
return void

RestartNotification() public method

public RestartNotification ( ) : void
return void

Resume() public method

public Resume ( ) : void
return void

Run() public method

public Run ( ) : int
return int

RuntimeInvoke() public method

public RuntimeInvoke ( TargetAddress invoke_method, TargetAddress method_argument, TargetObject object_argument, TargetObject param_objects, long callback_arg, bool debug ) : void
invoke_method TargetAddress
method_argument TargetAddress
object_argument Mono.Debugger.Languages.TargetObject
param_objects Mono.Debugger.Languages.TargetObject
callback_arg long
debug bool
return void

SetRegisters() public method

public SetRegisters ( Registers registers ) : void
registers Registers
return void

SetSignal() public method

public SetSignal ( int signal, bool send_it ) : void
signal int
send_it bool
return void

SetupInferior() protected method

protected SetupInferior ( ) : void
return void

Shutdown() public method

public Shutdown ( ) : void
return void

SimpleLookup() public method

public SimpleLookup ( string name ) : TargetAddress
name string
return TargetAddress

Step() public method

public Step ( ) : void
return void

Stop() public method

Just send the inferior a stop signal, but don't wait for it to stop. Returns true if it actually sent the signal and false if the target was already stopped.
public Stop ( ) : bool
return bool

Stop() public method

Stop the inferior. Returns true if it actually stopped the inferior and false if it was already stopped. Note that the target may have stopped abnormally in the meantime, in this case we return the corresponding ChildEvent.
public Stop ( ChildEvent &new_event ) : bool
new_event ChildEvent
return bool

WriteAddress() public method

public WriteAddress ( TargetAddress address, TargetAddress value ) : void
address TargetAddress
value TargetAddress
return void

WriteBuffer() public method

public WriteBuffer ( TargetAddress address, byte buffer ) : void
address TargetAddress
buffer byte
return void

WriteByte() public method

public WriteByte ( TargetAddress address, byte value ) : void
address TargetAddress
value byte
return void

WriteInteger() public method

public WriteInteger ( TargetAddress address, int value ) : void
address TargetAddress
value int
return void

WriteLongInteger() public method

public WriteLongInteger ( TargetAddress address, long value ) : void
address TargetAddress
value long
return void

change_target_state() protected method

protected change_target_state ( TargetState new_state ) : TargetState
new_state TargetState
return TargetState

check_error() protected static method

protected static check_error ( TargetError error ) : void
error TargetError
return void

Property Details

address_domain protected property

protected AddressDomain address_domain
return AddressDomain

breakpoint_manager protected property

protected BreakpointManager,Mono.Debugger.Backend breakpoint_manager
return BreakpointManager

error_handler protected property

protected DebuggerErrorHandler error_handler
return DebuggerErrorHandler

exe protected property

protected NativeExecutableReader,Mono.Debugger.Backend exe
return NativeExecutableReader

io_data protected property

protected IntPtr,System io_data
return System.IntPtr

native protected property

protected bool native
return bool

process protected property

protected Process,System.Diagnostics process
return System.Diagnostics.Process

server_handle protected property

protected IntPtr,System server_handle
return System.IntPtr

start protected property

protected ProcessStart start
return ProcessStart

thread_manager protected property

protected ThreadManager thread_manager
return ThreadManager