Browse Source

* write name of "self" as "this", so you can use plain field names inside
methods in gdb without having to write "self.fieldname" (self is also
still recognised by gdb, that's built in)

git-svn-id: trunk@9427 -

Jonas Maebe 17 years ago
parent
commit
ead754c2c3
1 changed files with 5 additions and 1 deletions
  1. 5 1
      compiler/dbgdwarf.pas

+ 5 - 1
compiler/dbgdwarf.pas

@@ -2539,7 +2539,11 @@ implementation
 
 
     function TDebugInfoDwarf.symname(sym: tsym): String;
     function TDebugInfoDwarf.symname(sym: tsym): String;
       begin
       begin
-        result := sym.Name;
+        if (sym.typ=paravarsym) and
+           (vo_is_self in tlocalvarsym(sym).varoptions) then
+          result:='this'
+        else
+          result := sym.Name;
       end;
       end;