Browse Source

* fix compilation without GDB

peter 21 years ago
parent
commit
7b04fdec2e
5 changed files with 56 additions and 24 deletions
  1. 6 1
      compiler/ncgcal.pas
  2. 8 2
      compiler/pdecl.pas
  3. 13 5
      compiler/symsym.pas
  4. 19 12
      compiler/symtable.pas
  5. 10 4
      compiler/symtype.pas

+ 6 - 1
compiler/ncgcal.pas

@@ -1028,7 +1028,9 @@ implementation
          inlining_procedure:=true;
          inlining_procedure:=true;
 
 
          { Add inling start }
          { Add inling start }
+{$ifdef GDB}
          exprasmlist.concat(Tai_force_line.Create);
          exprasmlist.concat(Tai_force_line.Create);
+{$endif GDB}
          exprasmList.concat(Tai_Marker.Create(InlineStart));
          exprasmList.concat(Tai_Marker.Create(InlineStart));
 {$ifdef extdebug}
 {$ifdef extdebug}
          exprasmList.concat(tai_comment.Create(strpnew('Start of inlined proc '+tprocdef(procdefinition).procsym.name)));
          exprasmList.concat(tai_comment.Create(strpnew('Start of inlined proc '+tprocdef(procdefinition).procsym.name)));
@@ -1208,7 +1210,10 @@ begin
 end.
 end.
 {
 {
   $Log$
   $Log$
-  Revision 1.153  2004-02-09 22:48:45  florian
+  Revision 1.154  2004-02-11 19:59:06  peter
+    * fix compilation without GDB
+
+  Revision 1.153  2004/02/09 22:48:45  florian
     * several fixes to parameter handling on arm
     * several fixes to parameter handling on arm
 
 
   Revision 1.152  2004/01/31 17:45:17  peter
   Revision 1.152  2004/01/31 17:45:17  peter

+ 8 - 2
compiler/pdecl.pas

@@ -59,7 +59,10 @@ implementation
        { pass 1 }
        { pass 1 }
        nmat,nadd,ncal,nset,ncnv,ninl,ncon,nld,nflw,nobj,
        nmat,nadd,ncal,nset,ncnv,ninl,ncon,nld,nflw,nobj,
        { codegen }
        { codegen }
-       ncgutil,gdb,
+       ncgutil,
+{$ifdef GDB}
+       gdb,
+{$endif GDB}
        { parser }
        { parser }
        scanner,
        scanner,
        pbase,pexpr,ptype,ptconst,pdecsub,pdecvar,pdecobj,
        pbase,pexpr,ptype,ptconst,pdecsub,pdecvar,pdecobj,
@@ -679,7 +682,10 @@ implementation
 end.
 end.
 {
 {
   $Log$
   $Log$
-  Revision 1.77  2004-01-31 22:48:31  daniel
+  Revision 1.78  2004-02-11 19:59:06  peter
+    * fix compilation without GDB
+
+  Revision 1.77  2004/01/31 22:48:31  daniel
     * Fix stabs generation problem reported by Jonas
     * Fix stabs generation problem reported by Jonas
 
 
   Revision 1.76  2004/01/31 18:40:15  daniel
   Revision 1.76  2004/01/31 18:40:15  daniel

+ 13 - 5
compiler/symsym.pas

@@ -70,7 +70,9 @@ interface
           constructor ppuload(ppufile:tcompilerppufile);
           constructor ppuload(ppufile:tcompilerppufile);
           procedure generate_mangledname;override;
           procedure generate_mangledname;override;
           procedure ppuwrite(ppufile:tcompilerppufile);override;
           procedure ppuwrite(ppufile:tcompilerppufile);override;
+{$ifdef GDB}
           function  stabstring : pchar;override;
           function  stabstring : pchar;override;
+{$endif GDB}
        end;
        end;
 
 
        tunitsym = class(Tsym)
        tunitsym = class(Tsym)
@@ -404,7 +406,7 @@ implementation
     begin
     begin
       if s='mangledname' then
       if s='mangledname' then
         get_var_value:=mangledname
         get_var_value:=mangledname
-      else 
+      else
         get_var_value:=inherited get_var_value(s);
         get_var_value:=inherited get_var_value(s);
     end;
     end;
 
 
@@ -482,11 +484,14 @@ implementation
            end;
            end;
       end;
       end;
 
 
+
+{$ifdef GDB}
     function Tlabelsym.stabstring : pchar;
     function Tlabelsym.stabstring : pchar;
+      begin
+        stabstring:=stabstr_evaluate('"${name}",${N_LSYM},0,${line},0',[]);
+      end;
+{$endif GDB}
 
 
-    begin
-      stabstring:=stabstr_evaluate('"${name}",${N_LSYM},0,${line},0',[]);
-    end;
 
 
 {****************************************************************************
 {****************************************************************************
                                   TUNITSYM
                                   TUNITSYM
@@ -2355,7 +2360,10 @@ implementation
 end.
 end.
 {
 {
   $Log$
   $Log$
-  Revision 1.156  2004-02-08 18:08:59  jonas
+  Revision 1.157  2004-02-11 19:59:06  peter
+    * fix compilation without GDB
+
+  Revision 1.156  2004/02/08 18:08:59  jonas
     * fixed regvars support. Needs -doldregvars to activate. Only tested with
     * fixed regvars support. Needs -doldregvars to activate. Only tested with
       ppc, other processors should however only require maxregvars and
       ppc, other processors should however only require maxregvars and
       maxfpuregvars constants in cpubase.pas. Remember to take scratch-
       maxfpuregvars constants in cpubase.pas. Remember to take scratch-

+ 19 - 12
compiler/symtable.pas

@@ -817,6 +817,13 @@ implementation
            tprocsym(p).unchain_overload;
            tprocsym(p).unchain_overload;
       end;
       end;
 
 
+
+    procedure Tstoredsymtable.reset_def(def:Tnamedindexitem;arg:pointer);
+      begin
+        Tstoreddef(def).reset;
+      end;
+
+
 {$ifdef GDB}
 {$ifdef GDB}
 
 
     procedure TStoredSymtable.concatstab(p : TNamedIndexItem;arg:pointer);
     procedure TStoredSymtable.concatstab(p : TNamedIndexItem;arg:pointer);
@@ -838,23 +845,13 @@ implementation
         end;
         end;
     end;
     end;
 
 
+
     procedure TStoredSymtable.resetstab(p : TNamedIndexItem;arg:pointer);
     procedure TStoredSymtable.resetstab(p : TNamedIndexItem;arg:pointer);
       begin
       begin
         if tsym(p).typ <> procsym then
         if tsym(p).typ <> procsym then
           Tstoredsym(p).isstabwritten:=false;
           Tstoredsym(p).isstabwritten:=false;
       end;
       end;
 
 
-    procedure Tstoredsymtable.reset_def(def:Tnamedindexitem;arg:pointer);
-
-    begin
-      Tstoreddef(def).reset;
-    end;
-
-    procedure Tstoredsymtable.reset_all_defs;
-
-    begin
-      defindex.foreach(@reset_def,nil);
-    end;
 
 
     procedure TStoredSymtable.concattypestab(p : TNamedIndexItem;arg:pointer);
     procedure TStoredSymtable.concattypestab(p : TNamedIndexItem;arg:pointer);
 
 
@@ -878,6 +875,7 @@ implementation
         end;
         end;
     end;
     end;
 
 
+
    function tstoredsymtable.getnewtypecount : word;
    function tstoredsymtable.getnewtypecount : word;
       begin
       begin
          getnewtypecount:=pglobaltypecount^;
          getnewtypecount:=pglobaltypecount^;
@@ -890,6 +888,12 @@ implementation
            Process all entries
            Process all entries
 ***********************************************}
 ***********************************************}
 
 
+    procedure Tstoredsymtable.reset_all_defs;
+      begin
+        defindex.foreach(@reset_def,nil);
+      end;
+
+
     { checks, if all procsyms and methods are defined }
     { checks, if all procsyms and methods are defined }
     procedure tstoredsymtable.check_forwards;
     procedure tstoredsymtable.check_forwards;
       begin
       begin
@@ -2406,7 +2410,10 @@ implementation
 end.
 end.
 {
 {
   $Log$
   $Log$
-  Revision 1.135  2004-02-06 22:37:00  daniel
+  Revision 1.136  2004-02-11 19:59:06  peter
+    * fix compilation without GDB
+
+  Revision 1.135  2004/02/06 22:37:00  daniel
     * Removed not very usefull nextglobal & previousglobal fields from
     * Removed not very usefull nextglobal & previousglobal fields from
       Tstoreddef, saving 78 kb of memory
       Tstoreddef, saving 78 kb of memory
 
 

+ 10 - 4
compiler/symtype.pas

@@ -228,8 +228,11 @@ implementation
     uses
     uses
        verbose,
        verbose,
        fmodule,
        fmodule,
-       symdef,
-       gdb;
+       symdef
+{$ifdef GDB}
+       ,gdb
+{$endif GDB}
+       ;
 
 
 
 
 {****************************************************************************
 {****************************************************************************
@@ -407,7 +410,7 @@ implementation
     function Tsym.stabstring : pchar;
     function Tsym.stabstring : pchar;
 
 
     begin
     begin
-{      stabstring:=stabstr_evaluate('"${name}",${N_LSYM},0,${line},0',[]);}
+(*      stabstring:=stabstr_evaluate('"${name}",${N_LSYM},0,${line},0',[]); *)
        stabstring:=nil;
        stabstring:=nil;
     end;
     end;
 {
 {
@@ -1540,7 +1543,10 @@ finalization
 end.
 end.
 {
 {
   $Log$
   $Log$
-  Revision 1.38  2004-01-31 22:48:31  daniel
+  Revision 1.39  2004-02-11 19:59:06  peter
+    * fix compilation without GDB
+
+  Revision 1.38  2004/01/31 22:48:31  daniel
     * Fix stabs generation problem reported by Jonas
     * Fix stabs generation problem reported by Jonas
 
 
   Revision 1.37  2004/01/31 21:09:58  daniel
   Revision 1.37  2004/01/31 21:09:58  daniel