Browse Source

* gdb info for local functions was wrong

pierre 26 years ago
parent
commit
800af168b0
2 changed files with 17 additions and 3 deletions
  1. 6 1
      compiler/symdef.inc
  2. 11 2
      compiler/symsym.inc

+ 6 - 1
compiler/symdef.inc

@@ -2144,6 +2144,8 @@
          extnumber:=-1;
          localst:=new(psymtable,init(localsymtable));
          parast:=new(psymtable,init(parasymtable));
+         localst^.defowner:=@self;
+         parast^.defowner:=@self;
          { this is used by insert
           to check same names in parast and localst }
          localst^.next:=parast;
@@ -3289,7 +3291,10 @@
 
 {
   $Log$
-  Revision 1.90  1999-01-26 09:57:29  pierre
+  Revision 1.91  1999-02-08 09:51:21  pierre
+   * gdb info for local functions was wrong
+
+  Revision 1.90  1999/01/26 09:57:29  pierre
    * open arrays stabs changed
 
   Revision 1.89  1999/01/22 17:29:30  pierre

+ 11 - 2
compiler/symsym.inc

@@ -522,8 +522,14 @@
       begin
         if (owner^.symtabletype = objectsymtable) then
          obj := 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
         if (owner^.symtabletype=localsymtable) and assigned(owner^.name) then
-         info := ','+name+','+owner^.name^;
+         info := ','+name+','+owner^.name^;  }
+        if (owner^.symtabletype=localsymtable) and assigned(owner^.defowner) and
+           assigned(owner^.defowner^.sym) then
+          info := ','+name+','+owner^.defowner^.sym^.name;
       end;
      stabsstr:=definition^.mangledname;
      getmem(p,length(stabsstr)+255);
@@ -1769,7 +1775,10 @@
 
 {
   $Log$
-  Revision 1.71  1999-01-23 23:29:41  florian
+  Revision 1.72  1999-02-08 09:51:22  pierre
+   * gdb info for local functions was wrong
+
+  Revision 1.71  1999/01/23 23:29:41  florian
     * first running version of the new code generator
     * when compiling exceptions under Linux fixed