Explorar el Código

+ implemented writing of dwarf debug info (by calling writeDebugElf) in
TMZExeOutput.writeData. Note that writing i8086 debug info with the internal
linker is still disabled (i.e. it switches to external linking) in
options.TOption.checkoptionscompatibility

git-svn-id: trunk@39219 -

nickysn hace 7 años
padre
commit
c56ebad183
Se han modificado 1 ficheros con 17 adiciones y 5 borrados
  1. 17 5
      compiler/ogomf.pas

+ 17 - 5
compiler/ogomf.pas

@@ -2978,10 +2978,22 @@ cleanup:
 
 
     function TMZExeOutput.writeData: boolean;
     function TMZExeOutput.writeData: boolean;
       begin
       begin
-        if apptype=app_com then
-          Result:=WriteCom
-        else
-          Result:=WriteExe;
+        Result:=False;
+        if ExeWriteMode in [ewm_exefull,ewm_exeonly] then
+          begin
+            if apptype=app_com then
+              Result:=WriteCom
+            else
+              Result:=WriteExe;
+            if not Result then
+              exit;
+          end;
+        if ((cs_debuginfo in current_settings.moduleswitches) and
+            (target_dbg.id in [dbg_dwarf2,dbg_dwarf3,dbg_dwarf4])) and
+           ((ExeWriteMode=ewm_dbgonly) or
+            ((ExeWriteMode=ewm_exefull) and
+              not(cs_link_strip in current_settings.globalswitches))) then
+          Result:=writeDebugElf;
       end;
       end;
 
 
     constructor TMZExeOutput.create;
     constructor TMZExeOutput.create;
@@ -3028,7 +3040,7 @@ cleanup:
             asmbin : '';
             asmbin : '';
             asmcmd : '';
             asmcmd : '';
             supported_targets : [system_i8086_msdos,system_i8086_embedded];
             supported_targets : [system_i8086_msdos,system_i8086_embedded];
-            flags : [af_outputbinary,af_no_debug,af_smartlink_sections];
+            flags : [af_outputbinary,af_smartlink_sections];
             labelprefix : '..@';
             labelprefix : '..@';
             comment : '; ';
             comment : '; ';
             dollarsign: '$';
             dollarsign: '$';