LLDB Debugger: dummy breakpoint to catch Exceptions

git-svn-id: trunk@58398 -
This commit is contained in:
martin 2018-06-24 21:58:24 +00:00
parent 1090db19f2
commit d1d1d58a04
2 changed files with 12 additions and 1 deletions

View File

@ -885,7 +885,7 @@ end;
procedure TLldbDebuggerCommandInit.DoExecute;
var
Instr: TLldbInstructionSettingSet;
Instr: TLldbInstruction;
begin
Instr := TLldbInstructionSettingSet.Create('frame-format',
'"frame #${frame.index}: ${frame.pc}' +
@ -906,6 +906,11 @@ begin
Instr.ReleaseReference;
Instr := TLldbInstructionSettingSet.Create('stop-disassembly-count', '0');
//Instr.OnFinish := @InstructionSucceeded;
QueueInstruction(Instr);
Instr.ReleaseReference;
Instr := TLldbInstructionBreakSet.Create('fpc_raiseexception');
Instr.OnFinish := @InstructionSucceeded;
QueueInstruction(Instr);
Instr.ReleaseReference;

View File

@ -112,6 +112,7 @@ type
function ProcessInputFromDbg(const AData: String): Boolean; override;
public
constructor Create(AFileName: String; ALine: Integer);
constructor Create(AMethod: String);
property BreakId: Integer read FBreakId;
property State: TValidState read FState;
end;
@ -479,6 +480,11 @@ begin
inherited Create(Format('breakpoint set --file %s --line %d', [AFileName, ALine]));
end;
constructor TLldbInstructionBreakSet.Create(AMethod: String);
begin
inherited Create(Format('breakpoint set --func %s', [AMethod]));
end;
{ TLldbInstructionBreakDelete }
function TLldbInstructionBreakDelete.ProcessInputFromDbg(const AData: String