Browse Source

+ wasm internal object reader: also read the '.debug_frame' and '.debug_str' sections

Nikolay Nikolov 1 year ago
parent
commit
6ab2cd3ce9
1 changed files with 14 additions and 2 deletions
  1. 14 2
      compiler/ogwasm.pas

+ 14 - 2
compiler/ogwasm.pas

@@ -2928,8 +2928,8 @@ implementation
                   Result:=ReadProducersSection;
                   Result:=ReadProducersSection;
                 'target_features':
                 'target_features':
                   Result:=ReadTargetFeaturesSection;
                   Result:=ReadTargetFeaturesSection;
-                '.debug_abbrev':
-                  if not ReadDebugSection(SectionName, wcstDebugAbbrev) then
+                '.debug_frame':
+                  if not ReadDebugSection(SectionName, wcstDebugFrame) then
                     begin
                     begin
                       InputError('Error reading section ' + SectionName);
                       InputError('Error reading section ' + SectionName);
                       exit;
                       exit;
@@ -2946,6 +2946,12 @@ implementation
                       InputError('Error reading section ' + SectionName);
                       InputError('Error reading section ' + SectionName);
                       exit;
                       exit;
                     end;
                     end;
+                '.debug_abbrev':
+                  if not ReadDebugSection(SectionName, wcstDebugAbbrev) then
+                    begin
+                      InputError('Error reading section ' + SectionName);
+                      exit;
+                    end;
                 '.debug_aranges':
                 '.debug_aranges':
                   if not ReadDebugSection(SectionName, wcstDebugAranges) then
                   if not ReadDebugSection(SectionName, wcstDebugAranges) then
                     begin
                     begin
@@ -2958,6 +2964,12 @@ implementation
                       InputError('Error reading section ' + SectionName);
                       InputError('Error reading section ' + SectionName);
                       exit;
                       exit;
                     end;
                     end;
+                '.debug_str':
+                  if not ReadDebugSection(SectionName, wcstDebugStr) then
+                    begin
+                      InputError('Error reading section ' + SectionName);
+                      exit;
+                    end;
                 else
                 else
                   InputError('Unsupported custom section: ''' + SectionName + '''');
                   InputError('Unsupported custom section: ''' + SectionName + '''');
               end;
               end;