[Lldb-commits] [PATCH] D70887: [lldb] Use realpath to avoid issues with symlinks in source paths
António Afonso via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Mon Dec 2 11:20:12 PST 2019
aadsm updated this revision to Diff 231740.
aadsm added a comment.
Solve this at the failing test level. We can't be sure of the filename will end up in the debug info so we just add both keys to the mapping.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D70887/new/
https://reviews.llvm.org/D70887
Files:
lldb/packages/Python/lldbsuite/test/macosx/DBGSourcePathRemapping/TestDSYMSourcePathRemapping.py
Index: lldb/packages/Python/lldbsuite/test/macosx/DBGSourcePathRemapping/TestDSYMSourcePathRemapping.py
===================================================================
--- lldb/packages/Python/lldbsuite/test/macosx/DBGSourcePathRemapping/TestDSYMSourcePathRemapping.py
+++ lldb/packages/Python/lldbsuite/test/macosx/DBGSourcePathRemapping/TestDSYMSourcePathRemapping.py
@@ -35,6 +35,7 @@
import re
self.assertTrue(re.match(r'[0-9a-fA-F-]+', uuid))
plist = os.path.join(dsym, 'Contents', 'Resources', uuid + '.plist')
+ botdir_realpath = os.path.realpath(botdir)
with open(plist, 'w') as f:
f.write('<?xml version="1.0" encoding="UTF-8"?>\n')
f.write('<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">\n')
@@ -44,6 +45,9 @@
f.write(' <dict>\n')
f.write(' <key>' + botdir + '</key>\n')
f.write(' <string>' + userdir + '</string>\n')
+ if botdir_realpath != botdir:
+ f.write(' <key>' + botdir_realpath + '</key>\n')
+ f.write(' <string>' + userdir + '</string>\n')
f.write(' </dict>\n')
f.write('</dict>\n')
f.write('</plist>\n')
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D70887.231740.patch
Type: text/x-patch
Size: 1287 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20191202/41724051/attachment.bin>
More information about the lldb-commits
mailing list