<div dir="ltr">Here we go, thuis should do the trick: r309529<br><br>Happy to help with more fixes, help with LLDB functionality, etc. Thanks for the report/diagnosis!</div><br><div class="gmail_quote"><div dir="ltr">On Sun, Jul 30, 2017 at 4:56 PM David Blaikie <<a href="mailto:dblaikie@gmail.com">dblaikie@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_quote"><div dir="ltr">On Sun, Jul 30, 2017 at 4:49 PM Tamas Berghammer via Phabricator <<a href="mailto:reviews@reviews.llvm.org" target="_blank">reviews@reviews.llvm.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">tberghammer added subscribers: llvm-commits, tberghammer.<br>
tberghammer raised a concern with this commit.<br>
tberghammer added a comment.<br>
<br>
Hi David,<br>
<br>
This CL caused a regression in LLDB by generating some incorrect relocations for the debug info. To reproduce:<br>
<br>
Compile the following source code using ToT clang (trunk 309523) for x86_64-unknown-linux-gnu with "clang -g -c -o ns2.cpp ns2.o"<br>
<br>
  inline int a() { return 1; }<br>
  void b() { a(); }<br>
  void c() {}<br>
<br>
Running "objdump -W -r ns2.o" will show the following data:<br>
<br>
  Contents of the .debug_ranges section:<br>
<br>
      Offset   Begin    End<br>
      00000000 ffffffffffffffff 0000000000000000 (base address)<br>
      00000000 0000000000000000 0000000000000016<br>
      00000000 0000000000000020 0000000000000026<br>
      00000000 0000000000000000 000000000000000b<br>
      00000000 <End of list><br>
<br>
  ....<br>
<br>
  RELOCATION RECORDS FOR [.debug_ranges]:<br>
  OFFSET           TYPE              VALUE<br>
  0000000000000008 R_X86_64_64       .text<br>
  0000000000000030 R_X86_64_64       .text._Z1av<br>
  0000000000000038 R_X86_64_64       .text._Z1av<br>
<br>
Looking at the data it will apply both the base address entry and the relocation entry for the 4th row in the debug_ranges section what will mean they will end up with invalid values.<br></blockquote></div></div><div dir="ltr"><div class="gmail_quote"><div><br>Ah, I see what you mean - the base address selection entry has to be reset. Makes sense. Thanks! Will get that fixed ASAP.<br> </div></div></div><div dir="ltr"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
Note: As far as I can tell LLDB doesn't support these base address entries but that should be an easy fix on the LLDB side what I can take care of once clang emits the correct data.<br>
<br>
<br>
Users:<br>
  dblaikie (Author)<br>
  tberghammer (Auditor)<br>
<br>
<a href="https://reviews.llvm.org/rL309526" rel="noreferrer" target="_blank">https://reviews.llvm.org/rL309526</a><br>
<br>
<br>
<br>
</blockquote></div></div></blockquote></div>