summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohnny Chen <johnny.chen@apple.com>2011-10-11 19:39:48 +0000
committerJohnny Chen <johnny.chen@apple.com>2011-10-11 19:39:48 +0000
commitef9e2ef2a59a123dc8ccebe178a99a98c4aac4b5 (patch)
tree7d134e5e47d81c625be48fe1efd2716067dd642c
parent9d7c1a2a180ab153a54809133fa7080f8213b44a (diff)
downloadbcm5719-llvm-ef9e2ef2a59a123dc8ccebe178a99a98c4aac4b5.tar.gz
bcm5719-llvm-ef9e2ef2a59a123dc8ccebe178a99a98c4aac4b5.zip
Add documentation on providing the 'cd' and 'pwd' commands to lldb with the help of the embedded Python interpreter and
the 'command regex' command. llvm-svn: 141698
-rw-r--r--lldb/docs/lldb-for-gdb-users.txt17
1 files changed, 17 insertions, 0 deletions
diff --git a/lldb/docs/lldb-for-gdb-users.txt b/lldb/docs/lldb-for-gdb-users.txt
index 24717124876..9a766ace018 100644
--- a/lldb/docs/lldb-for-gdb-users.txt
+++ b/lldb/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)
OpenPOWER on IntegriCloud