* 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:
Jonas Maebe 2007-12-10 22:09:12 +00:00
parent 27eb735d24
commit f50d9cb9cb

View File

@ -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));