summaryrefslogtreecommitdiffstats
path: root/lldb/examples/python
diff options
context:
space:
mode:
authorJohnny Chen <johnny.chen@apple.com>2011-10-06 23:36:00 +0000
committerJohnny Chen <johnny.chen@apple.com>2011-10-06 23:36:00 +0000
commit1c6c43f1dcad4b14b6eeb895df862441ecf7cfb3 (patch)
tree123d7f250f542762bc239752ca4ed1910a3b4c15 /lldb/examples/python
parent6a5c150e9cefdf2368ac4f6a45cc7d914887ed10 (diff)
downloadbcm5719-llvm-1c6c43f1dcad4b14b6eeb895df862441ecf7cfb3.tar.gz
bcm5719-llvm-1c6c43f1dcad4b14b6eeb895df862441ecf7cfb3.zip
Allow the crash log file path to contain an initial tilde component.
llvm-svn: 141340
Diffstat (limited to 'lldb/examples/python')
-rwxr-xr-xlldb/examples/python/symbolicate-crash.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/lldb/examples/python/symbolicate-crash.py b/lldb/examples/python/symbolicate-crash.py
index 8b315d4e771..88ca6a77eb6 100755
--- a/lldb/examples/python/symbolicate-crash.py
+++ b/lldb/examples/python/symbolicate-crash.py
@@ -99,7 +99,8 @@ class CrashLog:
self.images = list()
self.crashed_thread_idx = -1
self.version = -1
- f = open(self.path)
+ # With possible initial component of ~ or ~user replaced by that user's home directory.
+ f = open(os.path.expanduser(self.path))
self.file_lines = f.read().splitlines()
parse_mode = PARSE_MODE_NORMAL
thread = None
OpenPOWER on IntegriCloud