summaryrefslogtreecommitdiffstats
path: root/lldb/lit/SymbolFile
diff options
context:
space:
mode:
authorPavel Labath <pavel@labath.sk>2019-08-06 06:52:05 +0000
committerPavel Labath <pavel@labath.sk>2019-08-06 06:52:05 +0000
commita3bdcdf714bfc914ba61792d38b2383424b9b6e3 (patch)
tree8e2d92348eaf4eb268e33486bd945efa1295ee3f /lldb/lit/SymbolFile
parentb50e8c592789bfecb85dca9067c0853ad4d30199 (diff)
downloadbcm5719-llvm-a3bdcdf714bfc914ba61792d38b2383424b9b6e3.tar.gz
bcm5719-llvm-a3bdcdf714bfc914ba61792d38b2383424b9b6e3.zip
Fix line table resolution near the end of a section
Summary: lld r367537 changed the way the linker organizes sections and segments. This exposed an lldb bug and caused some tests to fail. In all of the failing tests the root cause was the same -- when we were trying to resolve the last address in the line_table section, we failed because it pointed past the end of the section. This patch changes the line table address resolution code to back up the address by one for end-of-sequence entries. This ensures the address still points inside a section/module even if the line table sequence ends at the very end of a section. It also reverts the linker flags which were added to the failing tests to restore previous behavior. Reviewers: clayborg, jingham Subscribers: mgorny, MaskRay, lldb-commits Differential Revision: https://reviews.llvm.org/D65647 llvm-svn: 367983
Diffstat (limited to 'lldb/lit/SymbolFile')
-rw-r--r--lldb/lit/SymbolFile/DWARF/debug-line-basic.s2
-rw-r--r--lldb/lit/SymbolFile/DWARF/dir-separator-no-comp-dir-relative-name.s2
-rw-r--r--lldb/lit/SymbolFile/DWARF/dir-separator-no-comp-dir.s2
-rw-r--r--lldb/lit/SymbolFile/DWARF/dir-separator-posix.s2
-rw-r--r--lldb/lit/SymbolFile/DWARF/dir-separator-windows.s2
5 files changed, 5 insertions, 5 deletions
diff --git a/lldb/lit/SymbolFile/DWARF/debug-line-basic.s b/lldb/lit/SymbolFile/DWARF/debug-line-basic.s
index 569ced8ae7b..fc66f6a01b1 100644
--- a/lldb/lit/SymbolFile/DWARF/debug-line-basic.s
+++ b/lldb/lit/SymbolFile/DWARF/debug-line-basic.s
@@ -1,7 +1,7 @@
# REQUIRES: lld, x86
# RUN: llvm-mc -triple x86_64-pc-linux %s -filetype=obj > %t.o
-# RUN: ld.lld -z separate-code %t.o -o %t
+# RUN: ld.lld %t.o -o %t
# RUN: %lldb %t -o "image dump line-table -v a.c" -o exit | FileCheck %s
diff --git a/lldb/lit/SymbolFile/DWARF/dir-separator-no-comp-dir-relative-name.s b/lldb/lit/SymbolFile/DWARF/dir-separator-no-comp-dir-relative-name.s
index 22ce240aa30..2a798f17962 100644
--- a/lldb/lit/SymbolFile/DWARF/dir-separator-no-comp-dir-relative-name.s
+++ b/lldb/lit/SymbolFile/DWARF/dir-separator-no-comp-dir-relative-name.s
@@ -5,7 +5,7 @@
# REQUIRES: lld, x86
# RUN: llvm-mc -triple x86_64-pc-linux %s -filetype=obj > %t.o
-# RUN: ld.lld -z separate-code %t.o -o %t
+# RUN: ld.lld %t.o -o %t
# RUN: %lldb %t -s %S/Inputs/dir-separator-no-comp-dir-relative-name.lldbinit -o exit | FileCheck %s
# CHECK-LABEL: image dump line-table a.c
diff --git a/lldb/lit/SymbolFile/DWARF/dir-separator-no-comp-dir.s b/lldb/lit/SymbolFile/DWARF/dir-separator-no-comp-dir.s
index da2c609e635..a1d0ea5e71b 100644
--- a/lldb/lit/SymbolFile/DWARF/dir-separator-no-comp-dir.s
+++ b/lldb/lit/SymbolFile/DWARF/dir-separator-no-comp-dir.s
@@ -4,7 +4,7 @@
# REQUIRES: lld, x86
# RUN: llvm-mc -triple x86_64-pc-linux %s -filetype=obj > %t.o
-# RUN: ld.lld -z separate-code %t.o -o %t
+# RUN: ld.lld %t.o -o %t
# RUN: %lldb %t -s %S/Inputs/dir-separator-windows.lldbinit -o exit | FileCheck %s
# CHECK-LABEL: image dump line-table a.c
diff --git a/lldb/lit/SymbolFile/DWARF/dir-separator-posix.s b/lldb/lit/SymbolFile/DWARF/dir-separator-posix.s
index 60390fcefe7..14d110016e6 100644
--- a/lldb/lit/SymbolFile/DWARF/dir-separator-posix.s
+++ b/lldb/lit/SymbolFile/DWARF/dir-separator-posix.s
@@ -4,7 +4,7 @@
# REQUIRES: lld, x86
# RUN: llvm-mc -triple x86_64-pc-linux %s -filetype=obj > %t.o
-# RUN: ld.lld -z separate-code %t.o -o %t
+# RUN: ld.lld %t.o -o %t
# RUN: %lldb %t -s %S/Inputs/dir-separator-posix.lldbinit -o exit | FileCheck %s
# CHECK-LABEL: image dump line-table a.c
diff --git a/lldb/lit/SymbolFile/DWARF/dir-separator-windows.s b/lldb/lit/SymbolFile/DWARF/dir-separator-windows.s
index 9cc1c035765..1ba03cc6ab5 100644
--- a/lldb/lit/SymbolFile/DWARF/dir-separator-windows.s
+++ b/lldb/lit/SymbolFile/DWARF/dir-separator-windows.s
@@ -4,7 +4,7 @@
# REQUIRES: lld, x86
# RUN: llvm-mc -triple x86_64-pc-linux %s -filetype=obj > %t.o
-# RUN: ld.lld -z separate-code %t.o -o %t
+# RUN: ld.lld %t.o -o %t
# RUN: %lldb %t -s %S/Inputs/dir-separator-windows.lldbinit -o exit | FileCheck %s
# CHECK-LABEL: image dump line-table a.c
OpenPOWER on IntegriCloud