[Lldb-commits] [lldb] [lldb][Docs] Add equivalents of GDB's "skip" to command map (PR #120740)
Dave Lee via lldb-commits
lldb-commits at lists.llvm.org
Fri Dec 20 10:30:20 PST 2024
================
@@ -235,6 +235,40 @@ Do a source level single step in the currently selected thread
(lldb) step
(lldb) s
+Ignore a function when doing a source level single step in
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+.. code-block:: shell
+
+ (gdb) skip abc
+ Function abc will be skipped when stepping.
+
+.. code-block:: shell
+
+ (lldb) settings show target.process.thread.step-avoid-regexp
+ target.process.thread.step-avoid-regexp (regex) = ^std::
+ (lldb) settings set target.process.thread.step-avoid-regexp (^std::)|(^abc)
+
+Get the default value, make it into a capture group, then add another capture
+group for the new function name.
+
+You can ignore a function once using:
+
+.. code-block:: shell
+
+ (lldb) thread step-in -r ^abc
+
+Or you can do the opposite, only step into functions with a certain name:
+
+.. code-block:: shell
+
+ (lldb) sif abc
+ # Which is equivalent to:
+ (lldb) thread step-in -t abc
----------------
kastiglione wrote:
It may be worth noting that the string is matched as a substring. The benefit is that for long function names, it's only necessary to type a uniquely identifiable substring.
https://github.com/llvm/llvm-project/pull/120740
More information about the lldb-commits
mailing list