* don't call the "self" parameter of class methods 'this' in the debug info,

because the 'this' parameter was not used by gdb in that case for anything
    anyway, and as of gdb 7.0 you get an error in gdb because the 'this'
    parameter is not an aggregate in that case (but rather a pointer to the
    vmt) (mantis #15362)

git-svn-id: trunk@14446 -
This commit is contained in:
Jonas Maebe 2009-12-17 14:43:22 +00:00
parent 10cfba3b28
commit c0bdcf62e0

View File

@ -2894,7 +2894,13 @@ implementation
begin
if (sym.typ=paravarsym) and
(vo_is_self in tparavarsym(sym).varoptions) then
if not is_objc_class_or_protocol(tdef(sym.owner.defowner.owner.defowner)) then
{ We use 'this' for regular methods because that's what gdb triggers
on to automatically search fields. Don't do this for class methods,
because search class fields is not supported, and gdb 7.0+ fails
in this case because "this" is not a record in that case (it's a
pointer to a vmt) }
if not is_objc_class_or_protocol(tdef(sym.owner.defowner.owner.defowner)) and
not(po_classmethod in tprocdef(sym.owner.defowner).procoptions) then
result:='this'
else
result:='self'