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