GDB (xrefs)
Loading...
Searching...
No Matches
Static Public Member Functions | Static Public Attributes | Static Protected Attributes | List of all members
gdb.command.explore.Explorer Class Reference
Inheritance diagram for gdb.command.explore.Explorer:

Static Public Member Functions

 guard_expr (expr)
 
 explore_expr (expr, value, is_child)
 
 explore_type (name, datatype, is_child)
 
 init_env ()
 
 is_scalar_type (type)
 
 return_to_parent_value ()
 
 return_to_parent_value_prompt ()
 
 return_to_enclosing_type ()
 
 return_to_enclosing_type_prompt ()
 
 guard_expr (expr)
 
 explore_expr (expr, value, is_child)
 
 explore_type (name, datatype, is_child)
 
 init_env ()
 
 is_scalar_type (type)
 
 return_to_parent_value ()
 
 return_to_parent_value_prompt ()
 
 return_to_enclosing_type ()
 
 return_to_enclosing_type_prompt ()
 

Static Public Attributes

dict type_code_to_explorer_map = {}
 

Static Protected Attributes

tuple _SCALAR_TYPE_LIST
 

Detailed Description

Internal class which invokes other explorers.

Definition at line 22 of file explore.py.

Member Function Documentation

◆ explore_expr() [1/2]

gdb.command.explore.Explorer.explore_expr ( expr,
value,
is_child )
static
Main function to explore an expression value.

Arguments:
    expr: The expression string that is being explored.
    value: The gdb.Value value of the expression.
    is_child: Boolean value to indicate if the expression is a child.
              An expression is a child if it is derived from the main
              expression entered by the user.  For example, if the user
              entered an expression which evaluates to a struct, then
              when exploring the fields of the struct, is_child is set
              to True internally.

Returns:
    No return value.

Definition at line 66 of file explore.py.

◆ explore_expr() [2/2]

gdb.command.explore.Explorer.explore_expr ( expr,
value,
is_child )
static
Main function to explore an expression value.

Arguments:
    expr: The expression string that is being explored.
    value: The gdb.Value value of the expression.
    is_child: Boolean value to indicate if the expression is a child.
              An expression is a child if it is derived from the main
              expression entered by the user.  For example, if the user
              entered an expression which evaluates to a struct, then
              when exploring the fields of the struct, is_child is set
              to True internally.

Returns:
    No return value.

Definition at line 66 of file explore.py.

◆ explore_type() [1/2]

gdb.command.explore.Explorer.explore_type ( name,
datatype,
is_child )
static
Main function to explore a data type.

Arguments:
    name: The string representing the path to the data type being
          explored.
    datatype: The gdb.Type value of the data type being explored.
    is_child: Boolean value to indicate if the name is a child.
              A name is a child if it is derived from the main name
              entered by the user.  For example, if the user entered
              the name of struct type, then when exploring the fields
              of the struct, is_child is set to True internally.

Returns:
    No return value.

Definition at line 91 of file explore.py.

◆ explore_type() [2/2]

gdb.command.explore.Explorer.explore_type ( name,
datatype,
is_child )
static
Main function to explore a data type.

Arguments:
    name: The string representing the path to the data type being
          explored.
    datatype: The gdb.Type value of the data type being explored.
    is_child: Boolean value to indicate if the name is a child.
              A name is a child if it is derived from the main name
              entered by the user.  For example, if the user entered
              the name of struct type, then when exploring the fields
              of the struct, is_child is set to True internally.

Returns:
    No return value.

Definition at line 91 of file explore.py.

◆ guard_expr() [1/2]

gdb.command.explore.Explorer.guard_expr ( expr)
static

Definition at line 38 of file explore.py.

◆ guard_expr() [2/2]

gdb.command.explore.Explorer.guard_expr ( expr)
static

Definition at line 38 of file explore.py.

◆ init_env() [1/2]

gdb.command.explore.Explorer.init_env ( )
static
Initializes the Explorer environment.
This function should be invoked before starting any exploration.  If
invoked before an exploration, it need not be invoked for subsequent
explorations.

Definition at line 116 of file explore.py.

◆ init_env() [2/2]

gdb.command.explore.Explorer.init_env ( )
static
Initializes the Explorer environment.
This function should be invoked before starting any exploration.  If
invoked before an exploration, it need not be invoked for subsequent
explorations.

Definition at line 116 of file explore.py.

◆ is_scalar_type() [1/2]

gdb.command.explore.Explorer.is_scalar_type ( type)
static
Checks whether a type is a scalar type.
A type is a scalar type of its type is
    gdb.TYPE_CODE_CHAR or
    gdb.TYPE_CODE_INT or
    gdb.TYPE_CODE_BOOL or
    gdb.TYPE_CODE_FLT or
    gdb.TYPE_CODE_VOID or
    gdb.TYPE_CODE_ENUM.

Arguments:
    type: The type to be checked.

Returns:
    'True' if 'type' is a scalar type. 'False' otherwise.

Definition at line 139 of file explore.py.

◆ is_scalar_type() [2/2]

gdb.command.explore.Explorer.is_scalar_type ( type)
static
Checks whether a type is a scalar type.
A type is a scalar type of its type is
    gdb.TYPE_CODE_CHAR or
    gdb.TYPE_CODE_INT or
    gdb.TYPE_CODE_BOOL or
    gdb.TYPE_CODE_FLT or
    gdb.TYPE_CODE_VOID or
    gdb.TYPE_CODE_ENUM.

Arguments:
    type: The type to be checked.

Returns:
    'True' if 'type' is a scalar type. 'False' otherwise.

Definition at line 139 of file explore.py.

◆ return_to_enclosing_type() [1/2]

gdb.command.explore.Explorer.return_to_enclosing_type ( )
static
A utility function which prints that the current exploration session
is returning to the enclosing type.  Useful when exploring types.

Definition at line 173 of file explore.py.

◆ return_to_enclosing_type() [2/2]

gdb.command.explore.Explorer.return_to_enclosing_type ( )
static
A utility function which prints that the current exploration session
is returning to the enclosing type.  Useful when exploring types.

Definition at line 173 of file explore.py.

◆ return_to_enclosing_type_prompt() [1/2]

gdb.command.explore.Explorer.return_to_enclosing_type_prompt ( )
static
A utility function which prompts the user to press the 'enter' key
so that the exploration session can shift back to the enclosing type.
Useful when exploring types.

Definition at line 180 of file explore.py.

◆ return_to_enclosing_type_prompt() [2/2]

gdb.command.explore.Explorer.return_to_enclosing_type_prompt ( )
static
A utility function which prompts the user to press the 'enter' key
so that the exploration session can shift back to the enclosing type.
Useful when exploring types.

Definition at line 180 of file explore.py.

◆ return_to_parent_value() [1/2]

gdb.command.explore.Explorer.return_to_parent_value ( )
static
A utility function which prints that the current exploration session
is returning to the parent value. Useful when exploring values.

Definition at line 158 of file explore.py.

◆ return_to_parent_value() [2/2]

gdb.command.explore.Explorer.return_to_parent_value ( )
static
A utility function which prints that the current exploration session
is returning to the parent value. Useful when exploring values.

Definition at line 158 of file explore.py.

◆ return_to_parent_value_prompt() [1/2]

gdb.command.explore.Explorer.return_to_parent_value_prompt ( )
static
A utility function which prompts the user to press the 'enter' key
so that the exploration session can shift back to the parent value.
Useful when exploring values.

Definition at line 165 of file explore.py.

◆ return_to_parent_value_prompt() [2/2]

gdb.command.explore.Explorer.return_to_parent_value_prompt ( )
static
A utility function which prompts the user to press the 'enter' key
so that the exploration session can shift back to the parent value.
Useful when exploring values.

Definition at line 165 of file explore.py.

Member Data Documentation

◆ _SCALAR_TYPE_LIST

tuple gdb.command.explore.Explorer._SCALAR_TYPE_LIST
staticprotected
Initial value:
= (
gdb.TYPE_CODE_CHAR,
gdb.TYPE_CODE_INT,
gdb.TYPE_CODE_BOOL,
gdb.TYPE_CODE_FLT,
gdb.TYPE_CODE_VOID,
gdb.TYPE_CODE_ENUM,
)

Definition at line 28 of file explore.py.

◆ type_code_to_explorer_map

dict gdb.command.explore.Explorer.type_code_to_explorer_map = {}
static

Definition at line 26 of file explore.py.


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