GDB (xrefs)
Public Member Functions | Public Attributes | List of all members
gdb-gdb.TypeFlag Class Reference

Public Member Functions

def __init__ (self, name, value)
 
def __cmp__ (self, other)
 

Public Attributes

 name
 
 value
 
 short_name
 

Detailed Description

A class that allows us to store a flag name, its short name,
and its value.

In the GDB sources, struct type has a component called instance_flags
in which the value is the addition of various flags.  These flags are
defined by two enumerates: type_flag_value, and type_instance_flag_value.
This class helps us recreate a list with all these flags that is
easy to manipulate and sort.  Because all flag names start with either
TYPE_FLAG_ or TYPE_INSTANCE_FLAG_, a short_name attribute is provided
that strips this prefix.

ATTRIBUTES
  name:  The enumeration name (eg: "TYPE_FLAG_UNSIGNED").
  value: The associated value.
  short_name: The enumeration name, with the suffix stripped.

Definition at line 21 of file gdb-gdb.py.

Constructor & Destructor Documentation

def gdb-gdb.TypeFlag.__init__ (   self,
  name,
  value 
)

Definition at line 38 of file gdb-gdb.py.

Member Function Documentation

def gdb-gdb.TypeFlag.__cmp__ (   self,
  other 
)
Sort by value order.

Definition at line 44 of file gdb-gdb.py.

Member Data Documentation

gdb-gdb.TypeFlag.name

Definition at line 39 of file gdb-gdb.py.

gdb-gdb.TypeFlag.short_name

Definition at line 41 of file gdb-gdb.py.

gdb-gdb.TypeFlag.value

Definition at line 40 of file gdb-gdb.py.


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