[LLVMdev] More DIFactory questions - still stumped

Devang Patel
Tue, 07 Sep 2010 16:21:50 -0000

On Sep 7, 2010, at 9:11 AM, Renato Golin wrote:

> On 7 September 2010 16:49, Devang Patel <dpatel at apple.com> wrote:
>> Your recent changes mentioned below would change correctness of debug
info,
>> but it would unlikely to impact structure of DWARF generated. And
somehow,
>> this structure is invalid in your case.
>
> I was hoping for a quick-fix on the assumptions of DwarfDebug about
> Subprograms' MDNodes, but it might be anywhere.
>
> Reducing the test case is the best solution, but it might not be easy.
>
> Validating the MDNodes in DIFactory (or anywhere before DwarfDebug)
> would be a good step to ensure IR consistency and isolate problems.
> Unfortunately, it is the kind of thing that is not fundamental to get
> things working, so it always gets left behind... ;)
>

I understand your point and certainly acknowledge need for better documentation.

There are couple of wrinkles to note here
- While constructing IR using DIFactory you are not seeing entire picture. When
you see a declaration you're not sure whether you'll see matching def.
or not. When you build a inlined subprogram, you don't know whether
you'll see a out of line definition of this function or not. etc...
- DwarfDebug must be able to handle malformed debug info gracefully and make
best out of whatever is fed. This is because, optimizer may have chewed on IR
mercilessly and optimizer must not be influenced by presence of encoded debug
info in IR.

-
Devang
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
<http://lists.llvm.org/pipermail/llvm-dev/attachments/20100907/891f72d1/attachment.html>