mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-11 09:26:15 +02:00
Record filepos in TInstruction class, to avoid problems with wrong source lines
in GDB for assembler instructions followed by {$ifdef XXX} lines. git-svn-id: trunk@22472 -
This commit is contained in:
parent
aa7a980a6f
commit
934980ec62
@ -124,6 +124,7 @@ type
|
|||||||
condition : tasmcond;
|
condition : tasmcond;
|
||||||
ops : byte;
|
ops : byte;
|
||||||
labeled : boolean;
|
labeled : boolean;
|
||||||
|
filepos : tfileposinfo;
|
||||||
constructor create(optype : tcoperand);virtual;
|
constructor create(optype : tcoperand);virtual;
|
||||||
destructor destroy;override;
|
destructor destroy;override;
|
||||||
{ converts the instruction to an instruction how it's used by the assembler writer
|
{ converts the instruction to an instruction how it's used by the assembler writer
|
||||||
@ -1007,6 +1008,7 @@ constructor TInstruction.create(optype : tcoperand);
|
|||||||
Condition:=C_NONE;
|
Condition:=C_NONE;
|
||||||
Ops:=0;
|
Ops:=0;
|
||||||
}
|
}
|
||||||
|
filepos:=current_filepos;
|
||||||
for i:=1 to max_operands do
|
for i:=1 to max_operands do
|
||||||
Operands[i]:=optype.create;
|
Operands[i]:=optype.create;
|
||||||
Labeled:=false;
|
Labeled:=false;
|
||||||
@ -1069,6 +1071,7 @@ end;
|
|||||||
operands[i].CheckOperand;
|
operands[i].CheckOperand;
|
||||||
|
|
||||||
ai:=taicpu.op_none(opcode);
|
ai:=taicpu.op_none(opcode);
|
||||||
|
ai.fileinfo:=filepos;
|
||||||
ai.Ops:=Ops;
|
ai.Ops:=Ops;
|
||||||
ai.Allocate_oper(Ops);
|
ai.Allocate_oper(Ops);
|
||||||
for i:=1 to Ops do
|
for i:=1 to Ops do
|
||||||
|
Loading…
Reference in New Issue
Block a user