mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-13 11:39:24 +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;
|
||||
flist : TFPList;
|
||||
dbgname : String;
|
||||
begin
|
||||
if not (target_info.system in systems_wasm) then
|
||||
begin
|
||||
{ insert DEBUGSTART and DEBUGEND labels }
|
||||
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))
|
||||
else
|
||||
current_asmdata.asmlists[al_end].concat(tai_symbol.Createname(dbgname,AT_METADATA,0,voidpointertype));
|
||||
end;
|
||||
|
||||
{ insert .Ldebug_abbrev0 label }
|
||||
templist:=TAsmList.create;
|
||||
@ -3575,6 +3578,13 @@ implementation
|
||||
if (m_objectivec1 in current_settings.modeswitches) then
|
||||
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,'');
|
||||
if (target_info.system in systems_darwin) then
|
||||
begin
|
||||
@ -3588,6 +3598,7 @@ implementation
|
||||
if (target_info.system in systems_darwin) then
|
||||
dbgname:='L'+dbgname;
|
||||
append_labelentry(DW_AT_high_pc,current_asmdata.DefineAsmSymbol(dbgname,bind,AT_METADATA,voidpointertype));
|
||||
end;
|
||||
|
||||
finish_entry;
|
||||
|
||||
@ -3671,7 +3682,7 @@ implementation
|
||||
begin
|
||||
{ Reference all DEBUGINFO sections from the main .fpc section }
|
||||
{ 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;
|
||||
new_section(list,sec_fpc,'links',0);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user