+ introduced LINE_RANGE constant in the DWARF debug info generation unit

This commit is contained in:
Nikolay Nikolov 2024-09-15 05:36:36 +03:00
parent 562ca0ad80
commit 4914a5a31f

View File

@ -283,6 +283,7 @@ implementation
const
LINE_BASE = 1;
LINE_RANGE = 255;
OPCODE_BASE = 13;
const
@ -3095,7 +3096,7 @@ implementation
{ line_range }
{ only line increase, no adress }
linelist.concat(tai_const.create_8bit(255));
linelist.concat(tai_const.create_8bit(LINE_RANGE));
{ opcode_base }
linelist.concat(tai_const.create_8bit(OPCODE_BASE));
@ -3675,7 +3676,8 @@ implementation
{ set line }
diffline := currfileinfo.line - prevline;
if (diffline >= LINE_BASE) and (OPCODE_BASE + diffline - LINE_BASE <= 255) then
if (diffline >= LINE_BASE) and (diffline <= (LINE_BASE + LINE_RANGE - 1)) and
(OPCODE_BASE + diffline - LINE_BASE <= 255) then
begin
{ use special opcode, this also adds a row }
asmline.concat(tai_const.create_8bit(OPCODE_BASE + diffline - LINE_BASE));