Target State

The method OutputCurrentState will print the current state of the target to the debugger's output stream.

The current execution status of the target is returned by GetExecutionStatus. If the target is suspended, the method SetExecutionStatus can be used to resume execution in one of the execution modes.

The method GetReturnOffset returns the address of the instruction that will execute when the current function returns.

GetNearInstruction returns the location of an instruction relative to a given address.

检查堆栈跟踪

A call stack contains the data for the function calls that are made by a thread. The data for each function call is called a stack frame and includes the return address, parameters passed to the function, and the function's local variables. 每次进行函数调用时,都会将新的堆栈帧推送到堆栈的顶部。 当该函数返回时,堆栈帧将从堆栈中弹出。 每个线程都有自己的调用堆栈,它表示在该线程中执行的调用。

Note Not all of the data for a function call can be stored in the stack frame. 参数和局部变量有时可以存储在寄存器中。

To retrieve the call stack or stack trace, use the methods GetStackTrace and GetContextStackTrace. The stack trace can be printed using OutputStackTrace and OutputContextStackTrace.