[Lldb-commits] [lldb] d3d9bbd - [LLDB] Fix TestBase.generateSource for AArch64/Windows

Muhammad Omair Javaid via lldb-commits lldb-commits at lists.llvm.org
Tue Jun 7 08:25:42 PDT 2022


Author: Muhammad Omair Javaid
Date: 2022-06-07T19:25:35+04:00
New Revision: d3d9bbd104368850d5e362ce8c5982f468272ae8

URL: https://github.com/llvm/llvm-project/commit/d3d9bbd104368850d5e362ce8c5982f468272ae8
DIFF: https://github.com/llvm/llvm-project/commit/d3d9bbd104368850d5e362ce8c5982f468272ae8.diff

LOG: [LLDB] Fix TestBase.generateSource for AArch64/Windows

This patch adds a minor fix in lldbtest.py TestBase.generateSource
function. Generated Python source with directory paths was not being
escaped properly. This fix makes sure we treat dir path as raw string.

Added: 
    

Modified: 
    lldb/packages/Python/lldbsuite/test/lldbtest.py

Removed: 
    


################################################################################
diff  --git a/lldb/packages/Python/lldbsuite/test/lldbtest.py b/lldb/packages/Python/lldbsuite/test/lldbtest.py
index e1c8373eb29a4..5c536f4ed8ae4 100644
--- a/lldb/packages/Python/lldbsuite/test/lldbtest.py
+++ b/lldb/packages/Python/lldbsuite/test/lldbtest.py
@@ -1775,7 +1775,7 @@ def generateSource(self, source):
         if self.hasDarwinFramework():
             include_stmt = "'#include <%s>' % os.path.join('LLDB', header)"
         else:
-            include_stmt = "'#include <%s>' % os.path.join('" + public_api_dir + "', header)"
+            include_stmt = "'#include <%s>' % os.path.join(r'" + public_api_dir + "', header)"
         list = [eval(include_stmt) for header in public_headers if (
             header.startswith("SB") and header.endswith(".h"))]
         includes = '\n'.join(list)


        


More information about the lldb-commits mailing list