Browse Source

Add Dwarf debug info generation by default for mips cpu

git-svn-id: trunk@22509 -
pierre 13 years ago
parent
commit
37a7c1fc25
2 changed files with 8 additions and 1 deletions
  1. 7 0
      compiler/mips/cpubase.pas
  2. 1 1
      compiler/mips/cputarg.pas

+ 7 - 0
compiler/mips/cpubase.pas

@@ -286,6 +286,7 @@ unit cpubase;
     function findreg_by_number(r:Tregister):tregisterindex;
     function findreg_by_number(r:Tregister):tregisterindex;
     function std_regnum_search(const s:string):Tregister;
     function std_regnum_search(const s:string):Tregister;
     function std_regname(r:Tregister):string;
     function std_regname(r:Tregister):string;
+    function dwarf_reg(r:tregister):shortint;
 
 
   implementation
   implementation
 
 
@@ -385,6 +386,12 @@ unit cpubase;
           result:=generic_regname(r);
           result:=generic_regname(r);
       end;
       end;
 
 
+    function dwarf_reg(r:tregister):shortint;
+      begin
+        result:=regdwarf_table[findreg_by_number(r)];
+        if result=-1 then
+          internalerror(200603251);
+      end;
 
 
 begin
 begin
 end.
 end.

+ 1 - 1
compiler/mips/cputarg.pas

@@ -58,7 +58,7 @@ implementation
 **************************************}
 **************************************}
 
 
 {$define NoCFIDwarf}
 {$define NoCFIDwarf}
-{$define NoDbgDwarf}
+{define NoDbgDwarf}
 { Try only stabs for a start }
 { Try only stabs for a start }
   {$ifndef NoCFIDwarf}
   {$ifndef NoCFIDwarf}
       ,cfidwarf
       ,cfidwarf