diff options
author | Johnny Chen <johnny.chen@apple.com> | 2011-10-11 19:39:48 +0000 |
---|---|---|
committer | Johnny Chen <johnny.chen@apple.com> | 2011-10-11 19:39:48 +0000 |
commit | 6d1a7c48eb04fa7ba5bff6c78933f7f2fd197d9c (patch) | |
tree | db9503eedff97cde25c287d34564b42fc2f2b16d /docs | |
parent | fa407ad806b26be45511b0881d136a815715ee51 (diff) | |
download | lldb-6d1a7c48eb04fa7ba5bff6c78933f7f2fd197d9c.tar.gz |
Add documentation on providing the 'cd' and 'pwd' commands to lldb with the help of the embedded Python interpreter and
the 'command regex' command.
git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@141698 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'docs')
-rw-r--r-- | docs/lldb-for-gdb-users.txt | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/docs/lldb-for-gdb-users.txt b/docs/lldb-for-gdb-users.txt index 247171248..9a766ace0 100644 --- a/docs/lldb-for-gdb-users.txt +++ b/docs/lldb-for-gdb-users.txt @@ -431,3 +431,20 @@ Finally, the results of the expressions are stored in persistent variables (lldb) expr self = $0 $4 = (SKTGraphicView *) 0x0000000100135430 + +f) Miscellaneous: + +You can use the embedded Python interprter to add the following 'pwd' and 'cd' commands +for your lldb session: + +(lldb) script import os +(lldb) command alias pwd script print os.getcwd() +(lldb) command regex cd "s/^(.*)$/script os.chdir(os.path.expanduser('%1'))/" + +... + +(lldb) cd /tmp +script os.chdir(os.path.expanduser('/tmp')) +(lldb) pwd +/private/tmp +(lldb) |