1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120
|
program BreakPointPrg;
{$ASMMODE att}
uses
{$IFDEF UNIX}
cthreads,
{$ENDIF}
sysutils, Classes;
type
{ TTestThread }
TTestThread = class(TThread)
procedure Execute; override;
end;
var
x, BreakDummy: Integer;
procedure Foo1;
begin
BreakDummy:= 1; // TEST_BREAKPOINT=Foo1
end;
procedure Foo2;
var
i: Integer;
begin
for i := 0 to 1 do
BreakDummy:= 1; // TEST_BREAKPOINT=Foo2
end;
label
testasmlbl1, testasmlbl2;
{ TTestThread }
procedure TTestThread.Execute;
var
tt: Integer;
begin
tt := 1; // TEST_BREAKPOINT=Thread1
tt := 1; // TEST_BREAKPOINT=Thread2
tt := 1;
while true do begin
tt := 1;
tt := 1;
tt := 1;
tt := 1;
end;
end;
begin
x := 1;
x := 1; BreakDummy:= 1; // TEST_BREAKPOINT=PrgStep1
x := 1; BreakDummy:= 1; // TEST_BREAKPOINT=PrgStep2
x := 1; BreakDummy:= 1; // TEST_BREAKPOINT=PrgRun1
x := 1; BreakDummy:= 1; // TEST_BREAKPOINT=PrgRun2
asm
nop // TEST_BREAKPOINT=AsmStep1
nop // TEST_BREAKPOINT=AsmStep2
nop // TEST_BREAKPOINT=AsmRun1
nop // TEST_BREAKPOINT=AsmRun2
nop
jmp testasmlbl1 // TEST_BREAKPOINT=AsmBranch1
nop
nop // TEST_BREAKPOINT=AsmNever1
testasmlbl1:
nop // TEST_BREAKPOINT=AsmBranchEnd1
nop
jmp testasmlbl2 // TEST_BREAKPOINT=AsmBranch2
nop
nop // TEST_BREAKPOINT=AsmNever2
testasmlbl2:
nop // TEST_BREAKPOINT=AsmBranchEnd2
nop
end;
x := 1;
Foo1;
Foo1;
Foo1;
x := 1;
Foo2;
BreakDummy:= 1; // TEST_BREAKPOINT=PrgAfterFoo2
BreakDummy:= 1; // TEST_BREAKPOINT=New1
BreakDummy:= 1; // TEST_BREAKPOINT=New2
BreakDummy:= 1;
// TODO; stepping over ignored breakpoint / actually that is stepping test
// edit line / move breakpoint
TTestThread.Create(False);
while true do begin
asm
nop
nop // TEST_BREAKPOINT=Main1
nop
nop
nop
nop
nop
nop // TEST_BREAKPOINT=Main2
nop
nop
nop
nop
nop
nop
end;
end;
end.
|