mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-23 11:14:23 +02:00
+ read debug sections in the wasm internal object reader
This commit is contained in:
parent
3c08ad4af5
commit
9a983632f9
@ -2886,6 +2886,16 @@ implementation
|
|||||||
Result:=False;
|
Result:=False;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
function ReadDebugSection(const SectionName: string): Boolean;
|
||||||
|
var
|
||||||
|
ObjSec: TObjSection;
|
||||||
|
begin
|
||||||
|
ObjSec:=ObjData.createsection(SectionName,1,[oso_Data,oso_debug],false);
|
||||||
|
ObjSec.DataPos:=AReader.Pos;
|
||||||
|
ObjSec.Size:=SectionStart+SectionSize-AReader.Pos;
|
||||||
|
Result:=True;
|
||||||
|
end;
|
||||||
|
|
||||||
const
|
const
|
||||||
RelocationSectionPrefix = 'reloc.';
|
RelocationSectionPrefix = 'reloc.';
|
||||||
var
|
var
|
||||||
@ -2913,6 +2923,12 @@ implementation
|
|||||||
Result:=ReadProducersSection;
|
Result:=ReadProducersSection;
|
||||||
'target_features':
|
'target_features':
|
||||||
Result:=ReadTargetFeaturesSection;
|
Result:=ReadTargetFeaturesSection;
|
||||||
|
'.debug_abbrev',
|
||||||
|
'.debug_info',
|
||||||
|
'.debug_line',
|
||||||
|
'.debug_aranges',
|
||||||
|
'.debug_ranges':
|
||||||
|
Result:=ReadDebugSection(SectionName);
|
||||||
else
|
else
|
||||||
InputError('Unsupported custom section: ''' + SectionName + '''');
|
InputError('Unsupported custom section: ''' + SectionName + '''');
|
||||||
end;
|
end;
|
||||||
|
Loading…
Reference in New Issue
Block a user