[Lldb-commits] [PATCH] D99744: [lldb] Update test.rst with a paragraph about pdb

Dave Lee via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Thu Apr 1 09:53:33 PDT 2021

This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rG0c653d4c3d14: [lldb] Update test.rst with a paragraph about pdb (authored by kastiglione).

  rG LLVM Github Monorepo




Index: lldb/docs/resources/test.rst
--- lldb/docs/resources/test.rst
+++ lldb/docs/resources/test.rst
@@ -373,7 +373,20 @@
 On non-Windows platforms, you can use the ``-d`` option to ``dotest.py`` which
-will cause the script to wait for a while until a debugger is attached.
+will cause the script to print out the pid of the test and wait for a while
+until a debugger is attached. Then run ``lldb -p <pid>`` to attach.
+To instead debug a test's python source, edit the test and insert
+``import pdb; pdb.set_trace()`` at the point you want to start debugging. In
+addition to pdb's debugging facilities, lldb commands can be executed with the
+help of a pdb alias. For example ``lldb bt`` and ``lldb v some_var``. Add this
+line to your ``~/.pdbrc``:
+   alias lldb self.dbg.HandleCommand("%*")
 Debugging Test Failures on Windows

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D99744.334735.patch
Type: text/x-patch
Size: 984 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20210401/7f33b39b/attachment.bin>

More information about the lldb-commits mailing list