[lld] [llvm] [Symbolizer] Support for Missing Line Numbers. (PR #82240)

via llvm-commits llvm-commits at lists.llvm.org
Tue Jul 23 02:40:12 PDT 2024


================
@@ -0,0 +1,247 @@
+##  Test  --skip-line-zero option.
+##
+##  This test uses handcrafted assembly to produce the following line table:
+##  Address            Line   Column File   ISA Discriminator OpIndex Flags
+##  ------------------ ------ ------ ------ --- ------------- ------- -------------
+##  0x0000000000001710      1      0      1   0             0       0
+##  0x0000000000001714      0      0      1   0             0       0
+##  0x0000000000001719      1      0      1   0             0       0
+##  0x000000000000171b      1      0      1   0             0       0  end_sequence
+##  0x00000000000016c0      0      0      1   0             0       0
+##  0x00000000000016cf      2      0      1   0             0       0
+##  0x00000000000016d4      0      0      1   0             0       0
+##  0x00000000000016da      0      0      1   0             0       0  end_sequence
+
+# REQUIRES: x86-registered-target
+
+# RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux --fdebug-prefix-map=%t="" %s -o %t.o
+
+## Check that without '--skip-line-zero', line number zero is displayed for the line-table entry which has no source correspondence.
+# RUN: llvm-symbolizer --obj=%t.o 0x16d4 | FileCheck --strict-whitespace --match-full-lines --check-prefix=APPROX-DISABLE %s
+
+# APPROX-DISABLE:main
+# APPROX-DISABLE-NEXT:main.c:0:0
+
+## Check that with '--skip-line-zero', the last non-zero line in the current sequence is displayed.
+## If it fails to find in the current sequence then return the orignal computed line-zero for the queried address.
----------------
ampandey-1995 wrote:

Done

https://github.com/llvm/llvm-project/pull/82240


More information about the llvm-commits mailing list