[llvm-dev] Debug symbols are missing in elf
David Blaikie via llvm-dev
llvm-dev at lists.llvm.org
Wed Apr 22 10:04:33 PDT 2020
On Wed, Apr 22, 2020 at 9:28 AM Nagaraju Mekala via llvm-dev <
llvm-dev at lists.llvm.org> wrote:
> On Tue, Apr 21, 2020 at 6:16 PM Robinson, Paul <paul.robinson at sony.com>
> wrote:
> >
> >
> >
> > > -----Original Message-----
> > > From: llvm-dev <llvm-dev-bounces at lists.llvm.org> On Behalf Of Nagaraju
> > > Mekala via llvm-dev
> > > Sent: Tuesday, April 21, 2020 6:04 AM
> > > To: jh7370.2008 at my.bristol.ac.uk
> > > Cc: LLVM Developers Mailing List <llvm-dev at lists.llvm.org>
> > > Subject: Re: [llvm-dev] Debug symbols are missing in elf
> > >
> > > Hi James,
> > >
> > > Thanks for reply.
> > > When I looked in to the generated debug dump from the object file I
> > > found that DW_AT_name is always (indirect string, offset: 0x0): clang
> > > version 8.0.1, instead of variable names.
> >
> > That symptom suggests that relocations from .debug_info to .debug_str
> > are not being handled correctly. Either your backend is not emitting
> > them correctly, or the dumper does not know what to do with them.
> >
> > If you are able to dump the .rela.debug_info section and it looks
> > reasonable, the fault is most likely with the dumper. If you are
> > using llvm-dwarfdump then that should not be hard to solve.
> > --paulr
> >
> Hi Paulr,
> Thanks for the reply.
> From your suggestion I have used llvm-dwarfdump and was able to figure
> out that debug_info section was incomplete.
>
What command did you run, on what file, and what was the output?
> Can you please help me in finding which part of the target(Backend
> files) will construct the dwarf data, especially debug_info.
>
LLVM's DWARF generation is implemented in
llvm/lib/CodeGen/AsmPrinter/Dwarf* files
>
> Thanks in Advance,
> Nagaraju
> > >
> > > Below is a sample output of the debug dump.
> > >
> > > Compilation Unit @ offset 0x0:
> > > Length: 0x6a (32-bit)
> > > Version: 4
> > > Abbrev Offset: 0x0
> > > Pointer Size: 4
> > > <0><b>: Abbrev Number: 1 (DW_TAG_compile_unit)
> > > <c> DW_AT_producer : (indirect string, offset: 0x0): clang
> > > version 8.0.1
> > > <10> DW_AT_language : 12 (ANSI C99)
> > > <12> DW_AT_name : (indirect string, offset: 0x0): clang
> > > version 8.0.1
> > > <16> DW_AT_stmt_list : 0x0
> > > <1a> DW_AT_comp_dir : (indirect string, offset: 0x0): clang
> > > version 8.0.1
> > > <1e> DW_AT_low_pc : 0x0
> > > <22> DW_AT_high_pc : 0x6c
> > > <1><26>: Abbrev Number: 2 (DW_TAG_subprogram)
> > > <27> DW_AT_low_pc : 0x0
> > > <2b> DW_AT_high_pc : 0x6c
> > > <2f> DW_AT_frame_base : 1 byte block: 51 (DW_OP_reg1
> (r1))
> > > <31> DW_AT_name : (indirect string, offset: 0x0): clang
> > > version 8.0.1
> > > <35> DW_AT_decl_file : 1
> > > <36> DW_AT_decl_line : 51
> > > <37> DW_AT_type : <0x66>
> > > <3b> DW_AT_external : 1
> > >
> > > -Nagaraju
> >
> _______________________________________________
> LLVM Developers mailing list
> llvm-dev at lists.llvm.org
> https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20200422/a2a42c09/attachment.html>
More information about the llvm-dev
mailing list