In my rtx-classes patches I converted a number of macros in rtl.h into inline functions, many of them trivial and frequently called. The attached patch adds "skip" commands for them to gdbinit.in, so that gdb skips them when single-stepping (assuming that you've set up ~/.gdbinit with an add-auto-load-safe-path of the working copy).
I posted a version of this before as: https://gcc.gnu.org/ml/gcc-patches/2014-08/msg00743.html which used a single: skip file rtl.h but I notice there are some non-trivial inline functions in rtl.h so this new version does it per-function instead. Tested manually within gdb (gdb-7.6.50.20130731-19.fc20.x86_64) stepping through final. OK for trunk? gcc/ * gdbinit.in: Skip various inline functions in rtl.h when stepping.
commit dbcda52e0a92723a844e177fbc40ceac8dae739b Author: David Malcolm <dmalc...@redhat.com> Date: Wed Aug 6 15:58:20 2014 -0400 gdbinit.in: Skip various inline functions in rtl.h when stepping See https://sourceware.org/gdb/current/onlinedocs/gdb/Skipping-Over-Functions-and-Files.html gcc/ * gdbinit.in: Skip various inline functions in rtl.h when stepping. diff --git a/gcc/gdbinit.in b/gcc/gdbinit.in index 25c530a..2324688 100644 --- a/gcc/gdbinit.in +++ b/gcc/gdbinit.in @@ -234,4 +234,24 @@ set check type off # These are used in accessor macros. # Note that this is added at the end because older gdb versions # do not understand the 'skip' command. +# See https://sourceware.org/gdb/current/onlinedocs/gdb/Skipping-Over-Functions-and-Files.html skip file tree.h + +# Likewise, skip various inline functions in rtl.h. +skip rtx_expr_list::next +skip rtx_expr_list::element +skip rtx_insn_list::next +skip rtx_insn_list::insn +skip rtx_sequence::len +skip rtx_sequence::element +skip rtx_sequence::insn +skip INSN_UID +skip PREV_INSN +skip SET_PREV_INSN +skip NEXT_INSN +skip SET_NEXT_INSN +skip BLOCK_FOR_INSN +skip PATTERN +skip INSN_LOCATION +skip INSN_HAS_LOCATION +skip JUMP_LABEL_AS_INSN