Explorar o código

* 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 %!s(int64=17) %!d(string=hai) anos
pai
achega
ead754c2c3
Modificáronse 1 ficheiros con 5 adicións e 1 borrados
  1. 5 1
      compiler/dbgdwarf.pas

+ 5 - 1
compiler/dbgdwarf.pas

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