فهرست منبع

* 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 سال پیش
والد
کامیت
ead754c2c3
1فایلهای تغییر یافته به همراه5 افزوده شده و 1 حذف شده
  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;