C# 클래스 slinject.Debugger.DebugEngine

This is the heart of all injection logic. I'm sorry about its complexity. TODO: refactor it.
The injection is an asynchronous two-step process. It may only occur in FuncEval-safe points. Exceptions are considered to be FE-safe. The class also does support breakpoint FuncEval probbing but if breakpoint is set on optimized method - it's ignored. During first FuncEval call we initialize space in a target process to copy injection assembly code. Once space is initialized we copy code and invoke Assembly.Load() method. After the call is made we look closely at Module Loaded event to find confirmation that our assembly is loaded. When confirmation received we resolve address of the injector method and wait for the second FuncEval-safe event to perform call to injector.
파일 보기 프로젝트 열기: anvaka/slinject 1 사용 예제들

공개 메소드들

메소드 설명
DebugEngine ( int pid ) : System
SetAssemblyCode ( byte assembly ) : void
Start ( ) : void
Stop ( ) : void

비공개 메소드들

메소드 설명
CallInjector ( ICorDebugThread thread ) : void
CopyInjectorAssembly ( DebuggerEvalEventArgs e ) : ICorDebugValue
CreateCallback ( ) : ManagedCallback
InitializeDebugger ( ) : void
InvokeAssemblyLoad ( ICorDebugEval2 eval, ICorDebugValue assemblyCodeInTargetProcess ) : void
IsModuleInDomain ( DebugModule module, string domainName ) : bool
OnDebuggerBreakpoint ( object sender, DebuggerBreakpointEventArgs e ) : void
OnDebuggerDomainExited ( object sender, DebuggerDomainExitedEventArgs e ) : void
OnDebuggerEvalCompleted ( object sender, DebuggerEvalEventArgs e ) : void
OnDebuggerEvalFailed ( object sender, DebuggerEvalEventArgs e ) : void
OnDebuggerException ( object sender, DebuggerEventArgs e ) : void
OnDebuggerModuleLoaded ( object sender, DebuggerModuleLoadedEventArgs e ) : void
OnFinished ( ) : void
PerformFuncEval ( ICorDebugThread thread ) : void
PrepareToCopyInjectorAssembly ( ICorDebugThread thread ) : void
ResetOldMscrolibMethods ( ) : void
ResolveNewMscrolibMethods ( DebugModule mscorlib ) : void
SetPotentialBreakpoints ( List breakpoints ) : void
UpdateInjectorFunction ( DebugModule module ) : void

메소드 상세

DebugEngine() 공개 메소드

public DebugEngine ( int pid ) : System
pid int
리턴 System

SetAssemblyCode() 공개 메소드

public SetAssemblyCode ( byte assembly ) : void
assembly byte
리턴 void

Start() 공개 메소드

public Start ( ) : void
리턴 void

Stop() 공개 메소드

public Stop ( ) : void
리턴 void