[PATCH] D29765: Handle link of NoDebug CU with a CU that has debug emission enabled

David Blaikie via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Feb 10 11:09:50 PST 2017


dblaikie added a comment.

In https://reviews.llvm.org/D29765#672333, @tejohnson wrote:

> In https://reviews.llvm.org/D29765#672324, @dblaikie wrote:
>
> > Are the locations properly respected/ignored in this case? (what does the line table end up looking like for the instructions in the nodebug inlined code?)
>
>
> Here is the result of objdump -WL (let me know if there is something else you wanted to see):
>
> $ objdump -WL a.out
>
> a.out:     file format elf64-x86-64
>
> Decoded dump of debug contents of section .debug_line:
>
> CU: debug.c:
>  File name                            Line number    Starting address
>  debug.c                                        2                   0
>
> ./nodebug.c:[++]
>  nodebug.c                                      3                 0x4
>
> ./debug.c:[++]
>  debug.c                                        2                0x10


Ah, I meant more the content of the line table (llvm-dwarfdump -debug-dump=line should show you this).

> 
> 
>> Would it be worth/possible omitting these scopes from the LexicalScope tree in the first place, rather than filtering out here after-the-fact?
> 
> That I am not sure about, as I'm not really familiar with this code. I am hoping you will tell me. =)

I think the right place is /probably/ LexicalScopes::extractLexicalScopes (lib/CodeGen/LexicalScopes.cpp) - if it'


https://reviews.llvm.org/D29765





More information about the llvm-commits mailing list