C# Класс CsDebugScript.Engine.Debuggers.DbgEngDll

Наследование: IDebuggerEngine
Показать файл Открыть проект

Private Properties

Свойство Тип Описание
DbgEngDll System
GetFunctionTableAccess System.IntPtr
GetModuleBaseAddress ulong
GetModuleName string
GetStackTraceFromContext StackTrace
ReadMemory bool
ReadStackTraceFromContext StackTrace
StackWalkEx bool
SymFunctionTableAccess64AccessRoutines System.IntPtr

Открытые методы

Метод Описание
BreakExecution ( Process process ) : void

Breaks the process that is being debugged.

ContinueExecution ( Process process ) : void

Releases the process that is being debugged.

CreateDefaultSymbolProvider ( ) : ISymbolProvider

Creates new instance of default symbol provider.

CreateDefaultSymbolProviderModule ( ) : ISymbolProviderModule

Creates new instance of default symbol provider module.

DbgEngDll ( IDebugClient client ) : System

Initializes a new instance of the DbgEngDll class.

Execute ( string command ) : void

Executes the specified command, but leaves its output visible to the user.

ExecuteAction ( System.Action action ) : void

Executes the action in redirected console output and error stream.

FindPatternInMemory ( Process process, ulong memoryStart, ulong memoryEnd, byte pattern, int patternStart, int patternEnd, uint searchAlignment = 1, bool searchWritableMemoryOnly = false ) : ulong

Finds the pattern in memory of the specified process.

GetAllProcesses ( ) : Process[]

Gets all processes currently being debugged.

GetCurrentProcess ( ) : Process

Gets the current process.

GetLastEventInfo ( ) : DebugEventInfo

Gets Lasts Event, most exception or event.

GetMemoryRegions ( Process process ) : MemoryRegion[]

Gets the all memory regions available in the specified process.

GetModuleAddress ( Process process, string moduleName ) : ulong

Gets the address of the module loaded into specified process.

GetModuleImageName ( Module module ) : string

Gets the name of the image. This is the name of the executable file, including the extension. Typically, the full path is included in user mode but not in kernel mode.

GetModuleLoadedImage ( Module module ) : string

Gets the name of the loaded image. Unless Microsoft CodeView symbols are present, this is the same as the image name.

GetModuleMappedImage ( Module module ) : string

Gets the name of the mapped image. In most cases, this is null. If the debugger is mapping an image file (for example, during minidump debugging), this is the name of the mapped image.

GetModuleName ( Module module ) : string

Gets the module name. This is usually just the file name without the extension. In a few cases, the module name differs significantly from the file name.

GetModuleSymbolFile ( Module module ) : string

Gets the name of the symbol file. The path and name of the symbol file. If no symbols have been loaded, this is the name of the executable file instead.

GetModuleTimestampAndSize ( Module module ) : ulong>.Tuple

Gets the timestamp and size of the module.

GetModuleVersion ( Module module, int &major, int &minor, int &revision, int &patch ) : void

Gets the module version.

GetProcessActualProcessorType ( Process process ) : ImageFileMachine

Gets the actual processor type of the specified process.

GetProcessCurrentThread ( Process process ) : System.Thread

Gets the current thread of the specified process.

GetProcessDumpFileName ( Process process ) : string

Gets the dump file name of the specified process.

GetProcessEffectiveProcessorType ( Process process ) : ImageFileMachine

Gets the effective processor type of the specified process.

GetProcessEnvironmentBlockAddress ( Process process ) : ulong

Gets the process environment block address of the specified process.

GetProcessExecutableName ( Process process ) : string

Gets the executable name of the specified process.

GetProcessModules ( Process process ) : Module[]

Gets all modules of the specified process.

GetProcessSystemId ( Process process ) : uint

Gets the system identifier of the specified process.

GetProcessThreads ( Process process ) : System.Thread[]

Gets all threads of the specified process.

GetProcessUpTime ( Process process ) : uint

Gets the up time of the specified process.

GetStackTraceFromContext ( Process process, ulong contextAddress, uint contextSize ) : StackTrace

Gets the stack trace from the specified context.

GetThreadContext ( System.Thread thread ) : ThreadContext

Gets the thread context of the specified thread.

GetThreadCurrentStackFrame ( System.Thread thread ) : StackFrame

Gets the current stack frame of the specified thread.

GetThreadEnvironmentBlockAddress ( System.Thread thread ) : ulong

Gets the environment block address of the specified thread.

GetThreadStackTrace ( System.Thread thread ) : StackTrace

Gets the stack trace of the specified thread.

IsMinidump ( Process process ) : bool

Determines whether the specified process is being debugged as minidump without heap.

QueryVirtual ( Process process, ulong address, ulong &baseAddress, ulong &regionSize ) : void

Finds memory range where the specified address belongs to.

ReadAnsiString ( Process process, ulong address, int length = -1 ) : string

Reads the ANSI string.

ReadInput ( ) : string

Reads the line from the debugger input.

ReadMemory ( Process process, ulong address, uint size ) : MemoryBuffer

Reads the memory from the specified process.

ReadUnicodeString ( Process process, ulong address, int length = -1 ) : string

Reads the unicode string.

SetCurrentProcess ( Process process ) : void

Sets the current process.

SetCurrentStackFrame ( StackFrame stackFrame ) : void

Sets the current stack frame.

SetCurrentThread ( System.Thread thread ) : void

Sets the current thread.

Terminate ( Process process ) : void

Terminates the process that is being debugged and ends the session.

Приватные методы

Метод Описание
DbgEngDll ( ) : System

Static constructor.

GetFunctionTableAccess ( IntPtr hProcess, ulong AddrBase ) : IntPtr

An application-defined callback function used with the StackWalkEx function. It provides access to the run-time function table for the process.

GetModuleBaseAddress ( IntPtr hProcess, ulong Address ) : ulong

An application-defined callback function used with the StackWalkEx function. It is called when StackWalkEx needs a module base address for a given virtual address.

GetModuleName ( Module module, DebugModname modname ) : string

Gets the name of the module.

GetStackTraceFromContext ( System.Thread thread, IntPtr contextAddress, uint contextSize ) : StackTrace

Gets the stack trace from the specified context.

ReadMemory ( IntPtr hProcess, ulong lpBaseAddress, IntPtr lpBuffer, uint nSize, uint &lpNumberOfBytesRead ) : bool

An application-defined callback function used with the StackWalkEx function. It is called when StackWalk64 needs to read memory from the address space of the process.

ReadStackTraceFromContext ( System.Thread thread, IntPtr contextAddress ) : StackTrace

Reads the stack trace from context using StackWalkEx.

StackWalkEx ( ImageFileMachine MachineType, IntPtr hProcess, IntPtr hThread, STACKFRAME_EX &StackFrame, IntPtr ContextRecord, ReadProcessMemoryProc64 ReadMemoryRoutine, FunctionTableAccessProc64 FunctionTableAccessRoutine, GetModuleBaseProc64 GetModuleBaseRoutine, TranslateAddressProc64 TranslateAddress, uint Flags ) : bool
SymFunctionTableAccess64AccessRoutines ( IntPtr hProcess, ulong AddrBase, ReadProcessMemoryProc64 ReadMemoryRoutine, GetModuleBaseProc64 GetModuleBaseRoutine ) : IntPtr

Описание методов

BreakExecution() публичный Метод

Breaks the process that is being debugged.
public BreakExecution ( Process process ) : void
process Process
Результат void

ContinueExecution() публичный Метод

Releases the process that is being debugged.
public ContinueExecution ( Process process ) : void
process Process
Результат void

CreateDefaultSymbolProvider() публичный Метод

Creates new instance of default symbol provider.
public CreateDefaultSymbolProvider ( ) : ISymbolProvider
Результат ISymbolProvider

CreateDefaultSymbolProviderModule() публичный Метод

Creates new instance of default symbol provider module.
public CreateDefaultSymbolProviderModule ( ) : ISymbolProviderModule
Результат ISymbolProviderModule

DbgEngDll() публичный Метод

Initializes a new instance of the DbgEngDll class.
public DbgEngDll ( IDebugClient client ) : System
client IDebugClient The debugger client interface.
Результат System

Execute() публичный Метод

Executes the specified command, but leaves its output visible to the user.
public Execute ( string command ) : void
command string The command.
Результат void

ExecuteAction() публичный Метод

Executes the action in redirected console output and error stream.
public ExecuteAction ( System.Action action ) : void
action System.Action The action.
Результат void

FindPatternInMemory() публичный Метод

Finds the pattern in memory of the specified process.
public FindPatternInMemory ( Process process, ulong memoryStart, ulong memoryEnd, byte pattern, int patternStart, int patternEnd, uint searchAlignment = 1, bool searchWritableMemoryOnly = false ) : ulong
process Process The process.
memoryStart ulong The memory start.
memoryEnd ulong The memory end.
pattern byte The pattern.
patternStart int The pattern start.
patternEnd int The pattern end.
searchAlignment uint The search alignment in number of bytes. For a successful match, the difference between the location of the found pattern and memoryStart must be a multiple of searchAlignment.
searchWritableMemoryOnly bool if set to true search through writable memory only.
Результат ulong

GetAllProcesses() публичный Метод

Gets all processes currently being debugged.
public GetAllProcesses ( ) : Process[]
Результат Process[]

GetCurrentProcess() публичный Метод

Gets the current process.
public GetCurrentProcess ( ) : Process
Результат Process

GetLastEventInfo() публичный Метод

Gets Lasts Event, most exception or event.
public GetLastEventInfo ( ) : DebugEventInfo
Результат DebugEventInfo

GetMemoryRegions() публичный Метод

Gets the all memory regions available in the specified process.
public GetMemoryRegions ( Process process ) : MemoryRegion[]
process Process The process.
Результат MemoryRegion[]

GetModuleAddress() публичный Метод

Gets the address of the module loaded into specified process.
public GetModuleAddress ( Process process, string moduleName ) : ulong
process Process The process.
moduleName string Name of the module.
Результат ulong

GetModuleImageName() публичный Метод

Gets the name of the image. This is the name of the executable file, including the extension. Typically, the full path is included in user mode but not in kernel mode.
public GetModuleImageName ( Module module ) : string
module Module The module.
Результат string

GetModuleLoadedImage() публичный Метод

Gets the name of the loaded image. Unless Microsoft CodeView symbols are present, this is the same as the image name.
public GetModuleLoadedImage ( Module module ) : string
module Module The module.
Результат string

GetModuleMappedImage() публичный Метод

Gets the name of the mapped image. In most cases, this is null. If the debugger is mapping an image file (for example, during minidump debugging), this is the name of the mapped image.
public GetModuleMappedImage ( Module module ) : string
module Module The module.
Результат string

GetModuleName() публичный Метод

Gets the module name. This is usually just the file name without the extension. In a few cases, the module name differs significantly from the file name.
public GetModuleName ( Module module ) : string
module Module The module.
Результат string

GetModuleSymbolFile() публичный Метод

Gets the name of the symbol file. The path and name of the symbol file. If no symbols have been loaded, this is the name of the executable file instead.
public GetModuleSymbolFile ( Module module ) : string
module Module The module.
Результат string

GetModuleTimestampAndSize() публичный Метод

Gets the timestamp and size of the module.
public GetModuleTimestampAndSize ( Module module ) : ulong>.Tuple
module Module The module.
Результат ulong>.Tuple

GetModuleVersion() публичный Метод

Gets the module version.
public GetModuleVersion ( Module module, int &major, int &minor, int &revision, int &patch ) : void
module Module The module.
major int The version major number.
minor int The version minor number.
revision int The version revision number.
patch int The version patch number.
Результат void

GetProcessActualProcessorType() публичный Метод

Gets the actual processor type of the specified process.
public GetProcessActualProcessorType ( Process process ) : ImageFileMachine
process Process The process.
Результат ImageFileMachine

GetProcessCurrentThread() публичный Метод

Gets the current thread of the specified process.
public GetProcessCurrentThread ( Process process ) : System.Thread
process Process The process.
Результат System.Thread

GetProcessDumpFileName() публичный Метод

Gets the dump file name of the specified process.
public GetProcessDumpFileName ( Process process ) : string
process Process The process.
Результат string

GetProcessEffectiveProcessorType() публичный Метод

Gets the effective processor type of the specified process.
public GetProcessEffectiveProcessorType ( Process process ) : ImageFileMachine
process Process The process.
Результат ImageFileMachine

GetProcessEnvironmentBlockAddress() публичный Метод

Gets the process environment block address of the specified process.
public GetProcessEnvironmentBlockAddress ( Process process ) : ulong
process Process The process.
Результат ulong

GetProcessExecutableName() публичный Метод

Gets the executable name of the specified process.
public GetProcessExecutableName ( Process process ) : string
process Process The process.
Результат string

GetProcessModules() публичный Метод

Gets all modules of the specified process.
public GetProcessModules ( Process process ) : Module[]
process Process The process.
Результат Module[]

GetProcessSystemId() публичный Метод

Gets the system identifier of the specified process.
public GetProcessSystemId ( Process process ) : uint
process Process The process.
Результат uint

GetProcessThreads() публичный Метод

Gets all threads of the specified process.
public GetProcessThreads ( Process process ) : System.Thread[]
process Process The process.
Результат System.Thread[]

GetProcessUpTime() публичный Метод

Gets the up time of the specified process.
public GetProcessUpTime ( Process process ) : uint
process Process The process.
Результат uint

GetStackTraceFromContext() публичный Метод

Gets the stack trace from the specified context.
public GetStackTraceFromContext ( Process process, ulong contextAddress, uint contextSize ) : StackTrace
process Process The process.
contextAddress ulong The context address.
contextSize uint Size of the context. If 0 is specified, context size will be automatically calculated.
Результат StackTrace

GetThreadContext() публичный Метод

Gets the thread context of the specified thread.
public GetThreadContext ( System.Thread thread ) : ThreadContext
thread System.Thread The thread.
Результат ThreadContext

GetThreadCurrentStackFrame() публичный Метод

Gets the current stack frame of the specified thread.
public GetThreadCurrentStackFrame ( System.Thread thread ) : StackFrame
thread System.Thread The thread.
Результат StackFrame

GetThreadEnvironmentBlockAddress() публичный Метод

Gets the environment block address of the specified thread.
public GetThreadEnvironmentBlockAddress ( System.Thread thread ) : ulong
thread System.Thread The thread.
Результат ulong

GetThreadStackTrace() публичный Метод

Gets the stack trace of the specified thread.
public GetThreadStackTrace ( System.Thread thread ) : StackTrace
thread System.Thread The thread.
Результат StackTrace

IsMinidump() публичный Метод

Determines whether the specified process is being debugged as minidump without heap.
public IsMinidump ( Process process ) : bool
process Process The process.
Результат bool

QueryVirtual() публичный Метод

Finds memory range where the specified address belongs to.
public QueryVirtual ( Process process, ulong address, ulong &baseAddress, ulong &regionSize ) : void
process Process The process.
address ulong The address.
baseAddress ulong The base address.
regionSize ulong Size of the region.
Результат void

ReadAnsiString() публичный Метод

Reads the ANSI string.
public ReadAnsiString ( Process process, ulong address, int length = -1 ) : string
process Process The process.
address ulong The address.
length int The length. If length is -1, string is null terminated
Результат string

ReadInput() публичный Метод

Reads the line from the debugger input.
public ReadInput ( ) : string
Результат string

ReadMemory() публичный Метод

Reads the memory from the specified process.
public ReadMemory ( Process process, ulong address, uint size ) : MemoryBuffer
process Process The process.
address ulong The memory address.
size uint The buffer size.
Результат CsDebugScript.Engine.Utility.MemoryBuffer

ReadUnicodeString() публичный Метод

Reads the unicode string.
public ReadUnicodeString ( Process process, ulong address, int length = -1 ) : string
process Process The process.
address ulong The address.
length int The length. If length is -1, string is null terminated
Результат string

SetCurrentProcess() публичный Метод

Sets the current process.
public SetCurrentProcess ( Process process ) : void
process Process The process.
Результат void

SetCurrentStackFrame() публичный Метод

Sets the current stack frame.
public SetCurrentStackFrame ( StackFrame stackFrame ) : void
stackFrame StackFrame The stack frame.
Результат void

SetCurrentThread() публичный Метод

Sets the current thread.
public SetCurrentThread ( System.Thread thread ) : void
thread System.Thread The thread.
Результат void

Terminate() публичный Метод

Terminates the process that is being debugged and ends the session.
public Terminate ( Process process ) : void
process Process
Результат void