Author: xiaobai
Date: Fri Aug  3 14:37:01 2018
New Revision: 338923

URL: http://llvm.org/viewvc/llvm-project?rev=338923&view=rev
Log:
Modify lldb_suite.py to enable python debugging

Summary:
pudb and pdb interfere with the behavior of the inspect module. calling
`inspect.getfile(inspect.currentframe())` returns a different result
depending on whether or not you're in a debugger. Calling
`os.path.abspath` on the result of `inspect.getfile(...)` normalizes the
result between the two environments.

Patch by Nathan Lanza <la...@fb.com>

Differential Revision: https://reviews.llvm.org/D49620

Modified:
    lldb/trunk/test/use_lldb_suite.py

Modified: lldb/trunk/test/use_lldb_suite.py
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/test/use_lldb_suite.py?rev=338923&r1=338922&r2=338923&view=diff
==============================================================================
--- lldb/trunk/test/use_lldb_suite.py (original)
+++ lldb/trunk/test/use_lldb_suite.py Fri Aug  3 14:37:01 2018
@@ -4,7 +4,9 @@ import sys
 
 
 def find_lldb_root():
-    lldb_root = os.path.dirname(inspect.getfile(inspect.currentframe()))
+    lldb_root = os.path.dirname(
+        os.path.abspath(inspect.getfile(inspect.currentframe()))
+    )
     while True:
         lldb_root = os.path.dirname(lldb_root)
         if lldb_root is None:


_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to