A custom command for putting breakpoints on the execute hook of passes.
This is largely a workaround for issues with tab-completion in gdb when
setting breakpoints on methods on classes within anonymous namespaces.
Example of use: putting a breakpoint on "final"
(gdb) break-on-pass
Press <TAB>; it autocompletes to "pass_":
(gdb) break-on-pass pass_
Press <TAB>:
Display all 219 possibilities? (y or n)
Press "n"; then type "f":
(gdb) break-on-pass pass_f
Press <TAB> to autocomplete to pass classnames beginning with "pass_f":
pass_fast_rtl_dce pass_fold_builtins
pass_feedback_split_functions pass_forwprop
pass_final pass_fre
pass_fixup_cfg pass_free_cfg
Type "in<TAB>" to complete to "pass_final":
(gdb) break-on-pass pass_final
...and hit <RETURN>:
Breakpoint 6 at 0x8396ba: file ../../src/gcc/final.c, line 4526.
...and we have a breakpoint set; continue execution:
(gdb) cont
Continuing.
Breakpoint 6, (anonymous namespace)::pass_final::execute (this=0x17fb990) at ../../src/gcc/final.c:4526
4526 virtual unsigned int execute (function *) { return rest_of_handle_final (); }