pierre 25 lat temu
rodzic
commit
319ddd55cb
4 zmienionych plików z 60 dodań i 16 usunięć
  1. 23 8
      compiler/i386/cgai386.pas
  2. 5 3
      compiler/symdef.pas
  3. 5 2
      compiler/symsym.inc
  4. 27 3
      compiler/symtable.pas

+ 23 - 8
compiler/i386/cgai386.pas

@@ -2796,13 +2796,25 @@ implementation
                 if (not assigned(procinfo^.parent) or
                    not assigned(procinfo^.parent^._class)) then
                   begin
-                    if not(is_class(procinfo^._class)) then
-                      st:='v'
+                    if (po_classmethod in aktprocsym^.definition^.procoptions) or
+                       ((po_virtualmethod in aktprocsym^.definition^.procoptions) and
+                        (potype_constructor=aktprocsym^.definition^.proctypeoption)) or
+                       (po_staticmethod in aktprocsym^.definition^.procoptions) then
+                      begin
+                        exprasmlist^.concat(new(pai_stabs,init(strpnew(
+                         '"pvmt:p'+pvmtdef^.numberstring+'",'+
+                         tostr(N_PSYM)+',0,0,'+tostr(procinfo^.selfpointer_offset)))));
+                      end
                     else
-                      st:='p';
-                    exprasmlist^.concat(new(pai_stabs,init(strpnew(
-                     '"$t:'+st+procinfo^._class^.numberstring+'",'+
-                     tostr(N_PSYM)+',0,0,'+tostr(procinfo^.selfpointer_offset)))))
+                      begin
+                        if not(is_class(procinfo^._class)) then
+                          st:='v'
+                        else
+                          st:='p';
+                        exprasmlist^.concat(new(pai_stabs,init(strpnew(
+                         '"$t:'+st+procinfo^._class^.numberstring+'",'+
+                         tostr(N_PSYM)+',0,0,'+tostr(procinfo^.selfpointer_offset)))));
+                      end;
                   end
                 else
                   begin
@@ -2937,7 +2949,10 @@ implementation
 end.
 {
   $Log$
-  Revision 1.12  2000-11-22 15:12:06  jonas
+  Revision 1.13  2000-11-28 00:28:07  pierre
+   * stabs fixing
+
+  Revision 1.12  2000/11/22 15:12:06  jonas
     * fixed inline-related problems (partially "merges")
 
   Revision 1.11  2000/11/17 10:30:24  florian
@@ -3048,4 +3063,4 @@ end.
   Revision 1.2  2000/07/13 11:32:37  michael
   + removed logs
 
-}
+}

+ 5 - 3
compiler/symdef.pas

@@ -4645,8 +4645,7 @@ Const local_symtable_index : longint = $8001;
      var
        onb : word;
      begin
-       if globalnb=0 then
-         numberstring;
+       numberstring;
        if objecttype=odt_class then
          begin
            onb:=globalnb;
@@ -5545,7 +5544,10 @@ Const local_symtable_index : longint = $8001;
 end.
 {
   $Log$
-  Revision 1.13  2000-11-26 18:09:40  florian
+  Revision 1.14  2000-11-28 00:28:06  pierre
+   * stabs fixing
+
+  Revision 1.13  2000/11/26 18:09:40  florian
     * fixed rtti for chars
 
   Revision 1.12  2000/11/19 16:23:35  florian

+ 5 - 2
compiler/symsym.inc

@@ -601,7 +601,7 @@
      if assigned(owner) then
       begin
         if (owner^.symtabletype = objectsymtable) then
-         obj := owner^.name^+'__'+name;
+         obj := upper(owner^.name^)+'__'+name;
         { this code was correct only as long as the local symboltable
           of the parent had the same name as the function
           but this is no true anymore !! PM
@@ -2213,7 +2213,10 @@
 
 {
   $Log$
-  Revision 1.13  2000-11-04 14:25:22  florian
+  Revision 1.14  2000-11-28 00:28:07  pierre
+   * stabs fixing
+
+  Revision 1.13  2000/11/04 14:25:22  florian
     + merged Attila's changes for interfaces, not tested yet
 
   Revision 1.12  2000/10/31 22:02:52  peter

+ 27 - 3
compiler/symtable.pas

@@ -1129,6 +1129,20 @@ implementation
            if (symtabletype=unitsymtable) and
               assigned(punitsymtable(@self)^.unitsym) then
              inc(punitsymtable(@self)^.unitsym^.refs);
+
+{$ifdef GDB}
+           { if it is a type, we need the stabs of this type
+             this might be the cause of the class debug problems
+             as TCHILDCLASS.Create did not generate appropriate
+             stabs debug info if TCHILDCLASS wasn't used anywhere else PM }
+           if (hp^.typ=typesym) and make_ref then
+             begin
+               if assigned(ptypesym(hp)^.restype.def) then
+                 pstoreddef(ptypesym(hp)^.restype.def)^.numberstring
+               else
+                 ptypesym(hp)^.isusedinstab:=true;
+             end;
+{$endif GDB}
            { unitsym are only loaded for browsing PM    }
            { this was buggy anyway because we could use }
            { unitsyms from other units in _USES !!      }
@@ -2352,7 +2366,13 @@ implementation
 end.
 {
   $Log$
-  Revision 1.16  2000-11-12 22:17:47  peter
+  Revision 1.17  2000-11-28 00:28:07  pierre
+   * stabs fixing
+
+  Revision 1.1.2.8  2000/11/17 11:14:37  pierre
+   * one more class stabs fix
+
+  Revision 1.16  2000/11/12 22:17:47  peter
     * some realname updates for messages
 
   Revision 1.15  2000/11/06 15:54:15  florian
@@ -2368,6 +2388,9 @@ end.
   Revision 1.12  2000/10/31 22:02:52  peter
     * symtable splitted, no real code changes
 
+  Revision 1.1.2.7  2000/10/16 19:43:04  pierre
+   * trying to correct class stabss once more
+
   Revision 1.11  2000/10/15 07:47:53  peter
     * unit names and procedure names are stored mixed case
 
@@ -2390,6 +2413,9 @@ end.
   Revision 1.5  2000/08/20 14:58:41  peter
     * give fatal if objfpc/delphi mode things are found (merged)
 
+  Revision 1.1.2.6  2000/08/20 14:56:46  peter
+    * give fatal if objfpc/delphi mode things are found
+
   Revision 1.4  2000/08/16 18:33:54  peter
     * splitted namedobjectitem.next into indexnext and listnext so it
       can be used in both lists
@@ -2399,6 +2425,4 @@ end.
     * memdebug/memory patches (merged)
     * only once illegal directive (merged)
 
-  Revision 1.2  2000/07/13 11:32:50  michael
-  + removed logs
 }