GCC Middle and Back End API Reference
gdbhooks.BreakOnPass Class Reference
Inheritance diagram for gdbhooks.BreakOnPass:
Collaboration diagram for gdbhooks.BreakOnPass:

Public Member Functions

 __init__ (self)
 
 complete (self, text, word)
 
 invoke (self, arg, from_tty)
 

Data Fields

 pass_names
 

Detailed Description

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 (); }

Constructor & Destructor Documentation

◆ __init__()

gdbhooks.BreakOnPass.__init__ ( self)

References ggc_alloc().

Member Function Documentation

◆ complete()

gdbhooks.BreakOnPass.complete ( self,
text,
word )

◆ invoke()

gdbhooks.BreakOnPass.invoke ( self,
arg,
from_tty )

References ggc_alloc().

Field Documentation

◆ pass_names

gdbhooks.BreakOnPass.pass_names

The documentation for this class was generated from the following file: