GDB (xrefs)
Loading...
Searching...
No Matches
Classes | Functions
gdb.command.xmethods Namespace Reference

Classes

class  DisableXMethod
 
class  EnableXMethod
 
class  InfoXMethod
 

Functions

 validate_xm_regexp (part_name, regexp)
 
 parse_xm_command_args (arg)
 
 get_global_method_matchers (locus_re, matcher_re)
 
 get_method_matchers_in_loci (loci, locus_re, matcher_re)
 
 print_xm_info (xm_dict, name_re)
 
 set_xm_status1 (xm_dict, name_re, status)
 
 set_xm_status (arg, status)
 
 register_xmethod_commands ()
 

Function Documentation

◆ get_global_method_matchers()

gdb.command.xmethods.get_global_method_matchers ( locus_re,
matcher_re )
Returns a dict of matching globally registered xmethods.

Arguments:
    locus_re: Even though only globally registered xmethods are
              looked up, they will be looked up only if 'global' matches
              LOCUS_RE.
    matcher_re: The regular expression matching the names of xmethods.

Returns:
    A dict of matching globally registered xmethod matchers.  The only
    key in the dict will be 'global'.

Definition at line 66 of file xmethods.py.

Referenced by gdb.command.xmethods.InfoXMethod.invoke(), and gdb.command.xmethods.set_xm_status().

◆ get_method_matchers_in_loci()

gdb.command.xmethods.get_method_matchers_in_loci ( loci,
locus_re,
matcher_re )
Returns a dict of matching registered xmethods in the LOCI.

Arguments:
    loci: The list of loci to lookup matching xmethods in.
    locus_re: If a locus is an objfile, then xmethod matchers will be
              looked up in it only if its filename matches the regular
              expression LOCUS_RE.  If a locus is the current progspace,
              then xmethod matchers will be looked up in it only if the
              string "progspace" matches LOCUS_RE.
    matcher_re: The regular expression to match the xmethod matcher
                names.

Returns:
    A dict of matching xmethod matchers.  The keys of the dict are the
    filenames of the loci the xmethod matchers belong to.

Definition at line 86 of file xmethods.py.

Referenced by gdb.command.xmethods.InfoXMethod.invoke(), and gdb.command.xmethods.set_xm_status().

◆ parse_xm_command_args()

gdb.command.xmethods.parse_xm_command_args ( arg)
Parses the arguments passed to a xmethod command.

Arguments:
    arg: The argument string passed to a xmethod command.

Returns:
    A 3-tuple: (<locus matching regular expression>,
                <matcher matching regular expression>,
                <name matching regular experession>)

Definition at line 30 of file xmethods.py.

References gdb.command.xmethods.validate_xm_regexp().

Referenced by gdb.command.xmethods.InfoXMethod.invoke(), and gdb.command.xmethods.set_xm_status().

◆ print_xm_info()

gdb.command.xmethods.print_xm_info ( xm_dict,
name_re )
Print a dictionary of xmethods.

Definition at line 118 of file xmethods.py.

References get_status_string().

Referenced by gdb.command.xmethods.InfoXMethod.invoke().

◆ register_xmethod_commands()

gdb.command.xmethods.register_xmethod_commands ( )

◆ set_xm_status()

gdb.command.xmethods.set_xm_status ( arg,
status )
Set the status (enabled/disabled) of xmethods matching ARG.
This is a helper function for enable/disable commands.  ARG is the
argument string passed to the commands.

Definition at line 159 of file xmethods.py.

References gdb.current_progspace(), gdb.command.xmethods.get_global_method_matchers(), gdb.command.xmethods.get_method_matchers_in_loci(), gdb.objfiles(), gdb.command.xmethods.parse_xm_command_args(), and gdb.command.xmethods.set_xm_status1().

Referenced by gdb.command.xmethods.EnableXMethod.invoke(), and gdb.command.xmethods.DisableXMethod.invoke().

◆ set_xm_status1()

gdb.command.xmethods.set_xm_status1 ( xm_dict,
name_re,
status )
Set the status (enabled/disabled) of a dictionary of xmethods.

Definition at line 142 of file xmethods.py.

Referenced by gdb.command.xmethods.set_xm_status().

◆ validate_xm_regexp()

gdb.command.xmethods.validate_xm_regexp ( part_name,
regexp )

Definition at line 23 of file xmethods.py.

Referenced by gdb.command.xmethods.parse_xm_command_args().