Skip to content

Commit 65de954

Browse files
committed
[lldb][Docs] Add equivalent of GDB's "skip" to command map
https://sourceware.org/gdb/current/onlinedocs/gdb.html/Skipping-Over-Functions-and-Files.html We can't emulate all the features of that command but we can skip a function by name with some extra steps. As far as I know this only matches function name unlike GDB that can filter on file and line and so on: ``` target.process.thread.step-avoid-regexp -- A regular expression defining functions step-in won't stop in. ``` It's likely it's got some corner cases that don't work, maybe inlining, but it doesn't seem worth going into it here. I don't think we can chain lldb interpreter commands, so I have shown the steps separately.
1 parent 2fa2c21 commit 65de954

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

lldb/docs/use/map.rst

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -235,6 +235,23 @@ Do a source level single step in the currently selected thread
235235
(lldb) step
236236
(lldb) s
237237
238+
Ignore a function when doing a source level single step in
239+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
240+
241+
.. code-block:: shell
242+
243+
(gdb) skip abc
244+
Function abc will be skipped when stepping.
245+
246+
.. code-block:: shell
247+
248+
(lldb) settings show target.process.thread.step-avoid-regexp
249+
target.process.thread.step-avoid-regexp (regex) = ^std::
250+
(lldb) settings set target.process.thread.step-avoid-regexp (^std::)|(^abc)
251+
252+
Get the default value, make it into a capture group, then add another capture
253+
group for the new function name.
254+
238255
Do a source level single step over in the currently selected thread
239256
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
240257

0 commit comments

Comments
 (0)