[cfe-commits] r141261 - in /cfe/trunk: lib/CodeGen/CGDebugInfo.cpp test/CodeGenObjC/debug-info-crash-2.m

Eric Christopher echristo at apple.com
Wed Oct 5 23:22:17 PDT 2011

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.

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.


More information about the cfe-commits mailing list