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 <lanza@fb.com>

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

llvm-svn: 338923
This commit is contained in:
Alex Langford 2018-08-03 21:37:01 +00:00
parent 8c41136ca3
commit 72cb10c364
1 changed files with 3 additions and 1 deletions

View File

@ -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: