mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-16 10:19:17 +02:00
* dwarf on x86-64 is working
git-svn-id: trunk@2575 -
This commit is contained in:
parent
a00da18d3a
commit
58433b83ed
@ -195,6 +195,7 @@ interface
|
|||||||
nextdefnumber : longint;
|
nextdefnumber : longint;
|
||||||
defnumberlist : tlist;
|
defnumberlist : tlist;
|
||||||
|
|
||||||
|
isdwarf64,
|
||||||
writing_def_dwarf : boolean;
|
writing_def_dwarf : boolean;
|
||||||
|
|
||||||
{ use this defs to create info for variants and file handles }
|
{ use this defs to create info for variants and file handles }
|
||||||
@ -507,14 +508,54 @@ implementation
|
|||||||
|
|
||||||
DW_FORM_flag:
|
DW_FORM_flag:
|
||||||
asmlist[al_dwarf_info].concat(tai_const.create_8bit(byte(data[i].VBoolean)));
|
asmlist[al_dwarf_info].concat(tai_const.create_8bit(byte(data[i].VBoolean)));
|
||||||
|
|
||||||
DW_FORM_data1:
|
DW_FORM_data1:
|
||||||
asmlist[al_dwarf_info].concat(tai_const.create_8bit(data[i].VInteger));
|
case data[i].VType of
|
||||||
|
vtInteger:
|
||||||
|
asmlist[al_dwarf_info].concat(tai_const.create_8bit(data[i].VInteger));
|
||||||
|
vtInt64:
|
||||||
|
asmlist[al_dwarf_info].concat(tai_const.create_8bit(data[i].VInt64^));
|
||||||
|
vtQWord:
|
||||||
|
asmlist[al_dwarf_info].concat(tai_const.create_8bit(data[i].VQWord^));
|
||||||
|
else
|
||||||
|
internalerror(200602143);
|
||||||
|
end;
|
||||||
|
|
||||||
DW_FORM_data2:
|
DW_FORM_data2:
|
||||||
asmlist[al_dwarf_info].concat(tai_const.create_16bit(data[i].VInteger));
|
case data[i].VType of
|
||||||
|
vtInteger:
|
||||||
|
asmlist[al_dwarf_info].concat(tai_const.create_16bit(data[i].VInteger));
|
||||||
|
vtInt64:
|
||||||
|
asmlist[al_dwarf_info].concat(tai_const.create_16bit(data[i].VInt64^));
|
||||||
|
vtQWord:
|
||||||
|
asmlist[al_dwarf_info].concat(tai_const.create_16bit(data[i].VQWord^));
|
||||||
|
else
|
||||||
|
internalerror(200602144);
|
||||||
|
end;
|
||||||
|
|
||||||
DW_FORM_data4:
|
DW_FORM_data4:
|
||||||
asmlist[al_dwarf_info].concat(tai_const.create_32bit(data[i].VInteger));
|
case data[i].VType of
|
||||||
|
vtInteger:
|
||||||
|
asmlist[al_dwarf_info].concat(tai_const.create_32bit(data[i].VInteger));
|
||||||
|
vtInt64:
|
||||||
|
asmlist[al_dwarf_info].concat(tai_const.create_32bit(data[i].VInt64^));
|
||||||
|
vtQWord:
|
||||||
|
asmlist[al_dwarf_info].concat(tai_const.create_32bit(data[i].VQWord^));
|
||||||
|
else
|
||||||
|
internalerror(200602145);
|
||||||
|
end;
|
||||||
|
|
||||||
DW_FORM_data8:
|
DW_FORM_data8:
|
||||||
asmlist[al_dwarf_info].concat(tai_const.create_64bit(data[i].VInteger));
|
case data[i].VType of
|
||||||
|
vtInteger:
|
||||||
|
asmlist[al_dwarf_info].concat(tai_const.create_64bit(data[i].VInteger));
|
||||||
|
vtInt64:
|
||||||
|
asmlist[al_dwarf_info].concat(tai_const.create_64bit(data[i].VInt64^));
|
||||||
|
vtQWord:
|
||||||
|
asmlist[al_dwarf_info].concat(tai_const.create_64bit(data[i].VQWord^));
|
||||||
|
else
|
||||||
|
internalerror(200602146);
|
||||||
|
end;
|
||||||
|
|
||||||
DW_FORM_sdata:
|
DW_FORM_sdata:
|
||||||
case data[i].VType of
|
case data[i].VType of
|
||||||
@ -542,7 +583,16 @@ implementation
|
|||||||
|
|
||||||
{ block gets only the size, the rest is appended manually by the caller }
|
{ block gets only the size, the rest is appended manually by the caller }
|
||||||
DW_FORM_block1:
|
DW_FORM_block1:
|
||||||
asmlist[al_dwarf_info].concat(tai_const.create_8bit(data[i].VInteger));
|
case data[i].VType of
|
||||||
|
vtInteger:
|
||||||
|
asmlist[al_dwarf_info].concat(tai_const.create_8bit(data[i].VInteger));
|
||||||
|
vtInt64:
|
||||||
|
asmlist[al_dwarf_info].concat(tai_const.create_8bit(data[i].VInt64^));
|
||||||
|
vtQWord:
|
||||||
|
asmlist[al_dwarf_info].concat(tai_const.create_8bit(data[i].VQWord^));
|
||||||
|
else
|
||||||
|
internalerror(200602141);
|
||||||
|
end;
|
||||||
else
|
else
|
||||||
internalerror(200601263);
|
internalerror(200601263);
|
||||||
end;
|
end;
|
||||||
@ -1845,14 +1895,20 @@ implementation
|
|||||||
{ debug info header }
|
{ debug info header }
|
||||||
objectlibrary.getlabel(lenstartlabel,alt_dbgfile);
|
objectlibrary.getlabel(lenstartlabel,alt_dbgfile);
|
||||||
{ size }
|
{ size }
|
||||||
asmlist[al_dwarf_info].concat(tai_const.create_rel_sym(aitconst_ptr,
|
{ currently we create only 32 bit dwarf }
|
||||||
|
asmlist[al_dwarf_info].concat(tai_const.create_rel_sym(aitconst_32bit,
|
||||||
lenstartlabel,tasmsymbol.create('.Ledebug_info0',AB_COMMON,AT_DATA)));
|
lenstartlabel,tasmsymbol.create('.Ledebug_info0',AB_COMMON,AT_DATA)));
|
||||||
|
|
||||||
asmlist[al_dwarf_info].concat(tai_label.create(lenstartlabel));
|
asmlist[al_dwarf_info].concat(tai_label.create(lenstartlabel));
|
||||||
{ version }
|
{ version }
|
||||||
asmlist[al_dwarf_info].concat(tai_const.create_16bit(2));
|
asmlist[al_dwarf_info].concat(tai_const.create_16bit(2));
|
||||||
{ abbrev table }
|
{ abbrev table }
|
||||||
asmlist[al_dwarf_info].concat(tai_const.createname('.Ldebug_abbrev0',AT_DATA,0));
|
if isdwarf64 then
|
||||||
|
asmlist[al_dwarf_info].concat(tai_const.create_type_sym(aitconst_64bit,
|
||||||
|
objectlibrary.newasmsymbol('.Ldebug_abbrev0',AB_EXTERNAL,AT_DATA)))
|
||||||
|
else
|
||||||
|
asmlist[al_dwarf_info].concat(tai_const.create_type_sym(aitconst_32bit,
|
||||||
|
objectlibrary.newasmsymbol('.Ldebug_abbrev0',AB_EXTERNAL,AT_DATA)));
|
||||||
{ address size }
|
{ address size }
|
||||||
asmlist[al_dwarf_info].concat(tai_const.create_8bit(sizeof(aint)));
|
asmlist[al_dwarf_info].concat(tai_const.create_8bit(sizeof(aint)));
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user