[LLVMdev] [cfe-dev] Debug information on multiple files

Renato Golin rengolin at systemcall.org
Wed Aug 25 14:11:59 PDT 2010

On 25 August 2010 18:54, Devang Patel <devang.patel at gmail.com> wrote:
> See "DwarfDebug problem with line section" thread on llvmdev. Bottom line,
> we may need a target specific patch for targets that do not follow dwarf
> standard (as per my reading) in this particular case.

Hi Devang,

Ok, got the background, but will reply on this email.

As far as I understood, there is nothing wrong with the way clang
deals with stmt_list. The encoding is correct (AFAIK) and the offsets
are always zero in every object file, as there is only one line table
and one debug_info. The problem is during link time. GCC also
generated zero for stmt_list in the objects but links correctly in the

I still haven't figured out which type of relocation is needed. All I
know is that GCC generates .rel.debug_info relocations that clang


** Section #6 '.rel.debug_info' (SHT_REL)
    Size   : 40 bytes (alignment 4)
    Symbol table #22 '.symtab'
    5 relocations applied to section #5 '.debug_info'


** Section #7 '.rel.debug_info' (SHT_REL)
    Size   : 184 bytes (alignment 4)
    Symbol table #22 '.symtab'
    23 relocations applied to section #6 '.debug_info'

I'll dig deeper and see if I can spot what should be done.


More information about the llvm-dev mailing list