https://bugs.llvm.org/show_bug.cgi?id=46653

            Bug ID: 46653
           Summary: DebugInfo: arm64 progologue line number incorrecly set
                    to "0"
           Product: libraries
           Version: trunk
          Hardware: All
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: Backend: AArch64
          Assignee: unassignedb...@nondot.org
          Reporter: jaydeepchauhan1...@gmail.com
                CC: arnaud.degrandmai...@arm.com,
                    llvm-bugs@lists.llvm.org, smithp...@googlemail.com,
                    ties.st...@arm.com

Consider below testcase for further discussion

$ cat check.c

#include<stdio.h>

int main()
{
   printf("Hello\n");
   return 0;
}


$clang  -target arm64 -g -c check.c
$./llvm-dwarfdump --debug-line check.o
...
...
Address            Line   Column File   ISA Discriminator Flags
------------------ ------ ------ ------ --- ------------- -------------
0x0000000000000000      4      0      1   0             0  is_stmt
0x0000000000000014      0      0      1   0             0  is_stmt prologue_end
0x0000000000000020      5      4      1   0             0  is_stmt
0x0000000000000028      6      4      1   0             0  is_stmt
0x0000000000000038      6      4      1   0             0  is_stmt end_sequence

In LLVM geneated executables prologue_end in line table is set to zero ,because
of that
when we put break point on main it will show line number of main function
location at line zero incorrectly.

And in gcc it is working fine. 

$aarch64-linux-gnu-gcc-8.3.0 -g -c check.c -o check_gcc.o
$./llvm-dwarfdump --debug-line check_gcc.o
Address            Line   Column File   ISA Discriminator Flags
------------------ ------ ------ ------ --- ------------- -------------
0x0000000000000000      4      1      1   0             0  is_stmt
0x0000000000000008      5      4      1   0             0  is_stmt
0x0000000000000014      6     11      1   0             0  is_stmt
0x0000000000000018      7      1      1   0             0  is_stmt
0x0000000000000020      7      1      1   0             0  is_stmt end_sequence

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to