mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-14 08:09:18 +02:00
- don't emit DEBUGSTART and DEBUGEND symbols for WebAssembly. See https://bugs.llvm.org/show_bug.cgi?id=48971
git-svn-id: branches/wasm@48509 -
This commit is contained in:
parent
9de09f1d28
commit
c073362928
@ -3256,6 +3256,8 @@ implementation
|
|||||||
fitem : TFileIndexItem;
|
fitem : TFileIndexItem;
|
||||||
flist : TFPList;
|
flist : TFPList;
|
||||||
dbgname : String;
|
dbgname : String;
|
||||||
|
begin
|
||||||
|
if not (target_info.system in systems_wasm) then
|
||||||
begin
|
begin
|
||||||
{ insert DEBUGSTART and DEBUGEND labels }
|
{ insert DEBUGSTART and DEBUGEND labels }
|
||||||
dbgname:=make_mangledname('DEBUGSTART',current_module.localsymtable,'');
|
dbgname:=make_mangledname('DEBUGSTART',current_module.localsymtable,'');
|
||||||
@ -3281,6 +3283,7 @@ implementation
|
|||||||
current_asmdata.asmlists[al_end].concat(tai_symbol.Createname_global(dbgname,AT_METADATA,0,voidpointertype))
|
current_asmdata.asmlists[al_end].concat(tai_symbol.Createname_global(dbgname,AT_METADATA,0,voidpointertype))
|
||||||
else
|
else
|
||||||
current_asmdata.asmlists[al_end].concat(tai_symbol.Createname(dbgname,AT_METADATA,0,voidpointertype));
|
current_asmdata.asmlists[al_end].concat(tai_symbol.Createname(dbgname,AT_METADATA,0,voidpointertype));
|
||||||
|
end;
|
||||||
|
|
||||||
{ insert .Ldebug_abbrev0 label }
|
{ insert .Ldebug_abbrev0 label }
|
||||||
templist:=TAsmList.create;
|
templist:=TAsmList.create;
|
||||||
@ -3575,6 +3578,13 @@ implementation
|
|||||||
if (m_objectivec1 in current_settings.modeswitches) then
|
if (m_objectivec1 in current_settings.modeswitches) then
|
||||||
append_attribute(DW_AT_APPLE_major_runtime_vers,DW_FORM_data1,[1]);
|
append_attribute(DW_AT_APPLE_major_runtime_vers,DW_FORM_data1,[1]);
|
||||||
|
|
||||||
|
if target_info.system in systems_wasm then
|
||||||
|
begin
|
||||||
|
append_attribute(DW_AT_low_pc,DW_FORM_data4,[0]);
|
||||||
|
{ todo: append DW_AT_ranges }
|
||||||
|
end
|
||||||
|
else
|
||||||
|
begin
|
||||||
dbgname:=make_mangledname('DEBUGSTART',current_module.localsymtable,'');
|
dbgname:=make_mangledname('DEBUGSTART',current_module.localsymtable,'');
|
||||||
if (target_info.system in systems_darwin) then
|
if (target_info.system in systems_darwin) then
|
||||||
begin
|
begin
|
||||||
@ -3588,6 +3598,7 @@ implementation
|
|||||||
if (target_info.system in systems_darwin) then
|
if (target_info.system in systems_darwin) then
|
||||||
dbgname:='L'+dbgname;
|
dbgname:='L'+dbgname;
|
||||||
append_labelentry(DW_AT_high_pc,current_asmdata.DefineAsmSymbol(dbgname,bind,AT_METADATA,voidpointertype));
|
append_labelentry(DW_AT_high_pc,current_asmdata.DefineAsmSymbol(dbgname,bind,AT_METADATA,voidpointertype));
|
||||||
|
end;
|
||||||
|
|
||||||
finish_entry;
|
finish_entry;
|
||||||
|
|
||||||
@ -3671,7 +3682,7 @@ implementation
|
|||||||
begin
|
begin
|
||||||
{ Reference all DEBUGINFO sections from the main .fpc section }
|
{ Reference all DEBUGINFO sections from the main .fpc section }
|
||||||
{ to prevent eliminating them by smartlinking }
|
{ to prevent eliminating them by smartlinking }
|
||||||
if (target_info.system in ([system_powerpc_macosclassic]+systems_darwin)) then
|
if (target_info.system in ([system_powerpc_macosclassic]+systems_darwin+systems_wasm)) then
|
||||||
exit;
|
exit;
|
||||||
new_section(list,sec_fpc,'links',0);
|
new_section(list,sec_fpc,'links',0);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user