[cfe-commits] r141261 - in /cfe/trunk: lib/CodeGen/CGDebugInfo.cpp test/CodeGenObjC/debug-info-crash-2.m
jahanian
fjahanian at apple.com
Thu Oct 6 09:56:02 PDT 2011
On Oct 5, 2011, at 11:22 PM, Eric Christopher wrote:
>
> On Oct 5, 2011, at 5:49 PM, Fariborz Jahanian wrote:
>
>>
>> On Oct 5, 2011, at 5:31 PM, Eric Christopher wrote:
>>
>>> Author: echristo
>>> Date: Wed Oct 5 19:31:18 2011
>>> New Revision: 141261
>>>
>>> URL: http://llvm.org/viewvc/llvm-project?rev=141261&view=rev
>>> Log:
>>> When constructing debug information for synthesized variables for the
>>> non-fragile ABI we may not be able to lay out the type and the debugger
>>> would ignore us even if we did put in the offset. Go ahead and just
>>> put any value there and don't look up the offset since it may not exist.
>>
>> Ivar will be synthesize as an ordinary ivar and added to the list of ivars for the class.
>> It has both a type and an offset then. Why does debgger ignore it?
>> Also, in your test, why do you declare subclass
>> Foo_ and its implementation? Does it play a role here?
>
> The synthesized variable is coming in via an ObjCInterfaceDecl which, afaict, doesn't
> have a layout in the non-fragile ABI that can represent a layout. We're tripping the
> assert when trying to get the offset of the synthesized ivar.
Here is the meta-data to show that synthesized variable is no different than none-synthesized.
I used your test case but added a user declared ivar "IAddedThisIvar" to show this point.
l_OBJC_$_INSTANCE_VARIABLES_Foo:
.long 32 ## 0x20
.long 2 ## 0x2
.quad _OBJC_IVAR_$_Foo.IAddedThisIvar
.quad L_OBJC_METH_VAR_NAME_4
.quad L_OBJC_METH_VAR_TYPE_5
.long 3 ## 0x3
.long 8 ## 0x8
.quad _OBJC_IVAR_$_Foo._window
.quad L_OBJC_METH_VAR_NAME_6
.quad L_OBJC_METH_VAR_TYPE_5
.long 3 ## 0x3
.long 8 ## 0x8
>
> The debugger ignores it because it has to reconstruct the layout information from the
> global variable offsets anyhow.
>
> The testcase is the reduced bit of a testcase I'd gotten. I can double check whether
> or not we need the subclass.
>
> -eric
More information about the cfe-commits
mailing list