From 72cb10c364bbbaf084a9d2e6d25b7880831b36ac Mon Sep 17 00:00:00 2001 From: Alex Langford Date: Fri, 3 Aug 2018 21:37:01 +0000 Subject: [PATCH] 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 Differential Revision: https://reviews.llvm.org/D49620 llvm-svn: 338923 --- lldb/test/use_lldb_suite.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lldb/test/use_lldb_suite.py b/lldb/test/use_lldb_suite.py index 6e24b9da8d34..6a8c12d81898 100644 --- a/lldb/test/use_lldb_suite.py +++ b/lldb/test/use_lldb_suite.py @@ -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: