[PATCH] D51908: [DebugInfo] Do not generate debug info for removed labels.

Hsiangkai Wang via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 18 01:20:43 PDT 2018


HsiangKai added a comment.

In https://reviews.llvm.org/D51908#1237844, @HsiangKai wrote:

> I use the same test program to generate executable with gcc. The executable has DW_TAG_label without DW_AT_low_pc. However, it will not crash GDB. There should be other debug attributes that will affect the behavior as setting breakpoints on labels.
>
> I will dig into the difference and report here if I found the root cause.


By default, gcc will generate shared executable. So, when users set breakpoints on labels without address, address zero will be relocated to load address. It is not correct locations for labels. However, it will not cause gdb to crash. If I compile the test case with `-no-pie`, it will encounter the same problem.


Repository:
  rL LLVM

https://reviews.llvm.org/D51908





More information about the llvm-commits mailing list