debugAPI中的框架是什么?

时间:2017-05-30 15:14:57

标签: delphi toolsapi

在Delphi debugAPI中,有一些对FrameIndex的引用,例如在:

 unit DebugAPI;
 interface
 type

  IOTADebugger = interface(IInterface)
    function CanToggleBreakpointOnFrame(FrameIndex: Integer): Boolean;
    function GetSupportedRunParametersCommands: TRunParametersCommands;
    function CanSetNextStatement(const Filename: string;
      LineNumber: Integer): Boolean;
    procedure ProcessDebugEvents;
    function FrameHasDebugInfo(FrameIndex: Integer): Boolean;
    function GetDisplayableDebuggerName: string;
    function GetFrameBreakpoint(FrameIndex: Integer): IOTABreakpoint;
    procedure ToggleBreakpointOnFrame(FrameIndex: Integer);
    .....

有几种方法接受FrameIndex参数,但是FrameIndex是什么?我可以在哪里查询FrameIndex

1 个答案:

答案 0 :(得分:4)

这是指调用堆栈帧。这是一个鲜为人知的功能,您可以在调用堆栈中的项目上设置断点。

然后当您运行时,调试器将在您返回该函数时中断。调试器通过在调用堆栈中的该条目的返回地址处设置断点来实现此功能。

例如,这是一个简单的调用堆栈,我在调用堆栈中的项目上放置了一个断点:

enter image description here

调用堆栈窗口的阴沟中的图标表示调试信息是否可用,是否设置了断点等。完整的详细信息可以在文档中找到:Call Stack Window

相关问题