summaryrefslogtreecommitdiffstats
path: root/lldb/packages/Python/lldbsuite/test/macosx/DBGSourcePathRemapping/TestDSYMSourcePathRemapping.py
diff options
context:
space:
mode:
authorAdrian Prantl <aprantl@apple.com>2019-11-08 17:35:52 -0800
committerAdrian Prantl <aprantl@apple.com>2019-11-11 12:21:38 -0800
commitda83e96273527a137f2ebd77cedb920180eab621 (patch)
treea1435f312d5c6dafd0bf15a788b277bf457d4740 /lldb/packages/Python/lldbsuite/test/macosx/DBGSourcePathRemapping/TestDSYMSourcePathRemapping.py
parentd24bce57c3ca2414ff5e53d8f7f3f007d6a946fe (diff)
downloadbcm5719-llvm-da83e96273527a137f2ebd77cedb920180eab621.tar.gz
bcm5719-llvm-da83e96273527a137f2ebd77cedb920180eab621.zip
Fix a regression in macOS-style path remapping.
When we switched to the LLVM .debug_line parser, the .dSYM-style path remapping logic stopped working for relative paths because of how RemapSourceFile silently fails for relative paths. This patch both makes the code more readable and fixes this particular bug. One interesting thing I learned is that Module::RemapSourceFile() is a macOS-only code path that operates on on the lldb::Module level and is completely separate from target.source-map, which operates on a per-Target level. Differential Revision: https://reviews.llvm.org/D70037 rdar://problem/56924558
Diffstat (limited to 'lldb/packages/Python/lldbsuite/test/macosx/DBGSourcePathRemapping/TestDSYMSourcePathRemapping.py')
-rw-r--r--lldb/packages/Python/lldbsuite/test/macosx/DBGSourcePathRemapping/TestDSYMSourcePathRemapping.py11
1 files changed, 8 insertions, 3 deletions
diff --git a/lldb/packages/Python/lldbsuite/test/macosx/DBGSourcePathRemapping/TestDSYMSourcePathRemapping.py b/lldb/packages/Python/lldbsuite/test/macosx/DBGSourcePathRemapping/TestDSYMSourcePathRemapping.py
index d13a0474867..2ee37915039 100644
--- a/lldb/packages/Python/lldbsuite/test/macosx/DBGSourcePathRemapping/TestDSYMSourcePathRemapping.py
+++ b/lldb/packages/Python/lldbsuite/test/macosx/DBGSourcePathRemapping/TestDSYMSourcePathRemapping.py
@@ -17,7 +17,7 @@ class TestDSYMSourcePathRemapping(lldbtest.TestBase):
lldbutil.mkdir_p(botdir)
lldbutil.mkdir_p(userdir)
import shutil
- for f in ['main.c']:
+ for f in ['main.c', 'relative.c']:
shutil.copyfile(os.path.join(inputs, f), os.path.join(botdir, f))
shutil.copyfile(os.path.join(inputs, f), os.path.join(userdir, f))
@@ -52,5 +52,10 @@ class TestDSYMSourcePathRemapping(lldbtest.TestBase):
@skipIf(debug_info=no_match("dsym"))
def test(self):
self.build()
- lldbutil.run_to_name_breakpoint(self, 'main')
- self.expect("source list", substrs=["Hello World"])
+
+ target, process, _, _ = lldbutil.run_to_name_breakpoint(
+ self, 'main')
+ self.expect("source list -n main", substrs=["Hello Absolute"])
+ bkpt = target.BreakpointCreateByName('relative')
+ lldbutil.continue_to_breakpoint(process, bkpt)
+ self.expect("source list -n relative", substrs=["Hello Relative"])
OpenPOWER on IntegriCloud