mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-11-02 10:49:33 +01:00
* finish the lineinfo table with a DW_LNE_set_address of the last
instruction of the function, like in the example in the dwarf2
specifications appendix 3 and as done by gcc (expected by Apple's
dsymutil)
git-svn-id: trunk@9425 -
This commit is contained in:
parent
27eb735d24
commit
f50d9cb9cb
@ -2497,7 +2497,7 @@ implementation
|
||||
lastfileinfo : tfileposinfo;
|
||||
currfuncname : pshortstring;
|
||||
currsectype : TAsmSectiontype;
|
||||
hp : tai;
|
||||
hp, hpend : tai;
|
||||
infile : tinputfile;
|
||||
prevcolumn,
|
||||
diffline,
|
||||
@ -2620,9 +2620,21 @@ implementation
|
||||
lastfileinfo:=currfileinfo;
|
||||
end;
|
||||
|
||||
hpend:=hp;
|
||||
hp:=tai(hp.next);
|
||||
end;
|
||||
|
||||
if assigned(hpend) then
|
||||
begin
|
||||
{ set address for end (see appendix 3 of dwarf 2 specs) }
|
||||
current_asmdata.getlabel(currlabel, alt_dbgline);
|
||||
list.insertafter(tai_label.create(currlabel), hpend);
|
||||
asmline.concat(tai_const.create_8bit(DW_LNS_extended_op));
|
||||
asmline.concat(tai_const.create_uleb128bit(1+sizeof(aint)));
|
||||
asmline.concat(tai_const.create_8bit(DW_LNE_set_address));
|
||||
asmline.concat(tai_const.create_sym(currlabel));
|
||||
end;
|
||||
|
||||
{ end sequence }
|
||||
asmline.concat(tai_const.Create_8bit(DW_LNS_extended_op));
|
||||
asmline.concat(tai_const.Create_8bit(1));
|
||||
|
||||
Loading…
Reference in New Issue
Block a user