浏览代码

* 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;
     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;