Progmasoft Git

catch3

Progmasoft Catch3: an independently maintained C++17 test framework with a parallel runner, property checks, snapshots and structured results.

Clonegit clone https://git.progmasoft.com/catch3

Add gdbinit and lldbinit files with commands to skip stepping into Catch code during debugging

The commands provided have to be executed in the current gdb/lldb session or copied
into the users ~/.gdbinit ~/.lldbinit files to permanently skip debugging Catch code.

Fixes #904
Commit
3dd523bdf5570057d050de555f42d14326d8fdfa
Author
Markus Reitboeck ·
Committer
Martin Hořeňovský
Parents
8d5d49299be5

Files · Download .tar.gz

Changes

 contrib/gdbinit  | 16 ++++++++++++++++
 contrib/lldbinit | 16 ++++++++++++++++
 2 files changed, 32 insertions(+)

diff --git a/contrib/gdbinit b/contrib/gdbinit
new file mode 100644
index 00000000..fb3608ae
--- /dev/null
+++ b/contrib/gdbinit
@@ -0,0 +1,16 @@
+#
+# This file provides a way to skip stepping into Catch code when debugging with gdb.
+#
+# With the gdb "skip" command you can tell gdb to skip files or functions during debugging.
+# see https://xaizek.github.io/2016-05-26/skipping-standard-library-in-gdb/ for an example
+#
+# Basically the following line tells gdb to skip all functions containing the
+# regexp "Catch", which matches the complete Catch namespace.
+# If you want to skip just some parts of the Catch code you can modify the
+# regexp accordingly.
+# 
+# If you want to permanently skip stepping into Catch code copy the following
+# line into your ~/.gdbinit file
+# 
+
+skip -rfu Catch
diff --git a/contrib/lldbinit b/contrib/lldbinit
new file mode 100644
index 00000000..4f13634d
--- /dev/null
+++ b/contrib/lldbinit
@@ -0,0 +1,16 @@
+#
+# This file provides a way to skip stepping into Catch code when debugging with lldb.
+#
+# With the setting "target.process.thread.step-avoid-regexp" you can tell lldb
+# to skip functions matching the regexp
+#
+# Basically the following line tells lldb to skip all functions containing the
+# regexp "Catch", which matches the complete Catch namespace.
+# If you want to skip just some parts of the Catch code you can modify the
+# regexp accordingly.
+#
+# If you want to permanently skip stepping into Catch code copy the following
+# line into your ~/.lldbinit file
+#
+
+settings set target.process.thread.step-avoid-regexp Catch
\ No newline at end of file