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

View File

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