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
diff --git a/docs/lldb-for-gdb-users.txt b/docs/lldb-for-gdb-users.txt
index 2471712..9a766ac 100644
--- a/docs/lldb-for-gdb-users.txt
+++ b/docs/lldb-for-gdb-users.txt
@@ -431,3 +431,20 @@
 
 (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)