Package bakmei :: Module basic_block :: Class basic_block |

[show private | hide private]
[frames | no frames]

## Type basic_block

    object --+
             |
          node --+
                 |
                basic_block

A basic block instruction container.

Author: Cameron Hotchkies, Pedram Amini

Contact: chotchkies@tippingpoint.com

Organization: www.openrce.org

License: GNU General Public License 2.0 or later

Method Summary
| ``__init__`(self, DSN, database_id)` Initializes a basic block instance.
Boolean | ``overwrites_register`(self, register)` Indicates if the given register is modified by this block.
String | ``render_node_gml`(self, graph)` Overload the default node.render_node_gml() routine to create a custom label.
pydot.Node() | ``render_node_graphviz`(self, graph)` Overload the default node.render_node_graphviz() routine to create a custom label.
String | ``render_node_udraw`(self, graph)` Overload the default node.render_node_udraw() routine to create a custom label.
String | ``render_node_udraw_update`(self)` Overload the default node.render_node_udraw_update() routine to create a custom label.
Inherited from object
| ``__delattr__`(...)` x.__delattr__('name') <==> del x.name
| ``__getattribute__`(...)` x.__getattribute__('name') <==> x.name
| ``__hash__`(x)` x.__hash__() <==> hash(x)
| ``__new__`(T, S, ...)` T.__new__(S, ...) -> a new object with type S, a subtype of T
| ``__reduce__`(...)` helper for pickle
| ``__reduce_ex__`(...)` helper for pickle
| ``__repr__`(x)` x.__repr__() <==> repr(x)
| ``__setattr__`(...)` x.__setattr__('name', value) <==> x.name = value
| ``__str__`(x)` x.__str__() <==> str(x)

Property Summary
| `ea_end`: The ending address of the basic block.
| `ea_start`: The starting address of the basic block.
| `instructions`: The instructions in the basic block keyed by address.
| `nodes`: The instructions in the basic block keyed by address.
| `num_instructions`: The number of instructions in the basic block.
| `sorted_instructions`: A list of instructions within the basic block sorted by address
Inherited from node
| `id`: The basic block id (internal use only)

Class Variable Summary
Integer | `dbid`: Database Identifier
String | `DSN`: Database location
`dict` | `ext` = `{}`
`NoneType` | `function` = None
`NoneType` | `module` = None
Inherited from node
`int` | `border_color` = 15658734
`int` | `color` = 15661055
`float` | `gml_height` = 0.0
`float` | `gml_line_width` = 1.0
`str` | `gml_pattern` = `'1'`
`int` | `gml_stipple` = 1
`str` | `gml_type` = `'rectangle'`
`float` | `gml_width` = 0.0
`float` | `gml_width_shape` = 1.0
`int` | `id` = 0
`str` | `label` = `''`
`int` | `number` = 0
`str` | `shape` = `'box'`
`NoneType` | `udraw_image` = None
`str` | `udraw_info` = `''`

Method Details

### __init__(self, DSN, database_id)
(Constructor)

Initializes a basic block instance.

  Parameters:
    `DSN` - The data source for the basic block to draw from.
    (type=String)
    `database_id` - The record ID of the basic block.
    (type=Integer)
  Overrides:
    `pgraph.node.node.__init__`

### overwrites_register(self, register)

Indicates if the given register is modified by this block.

  Parameters:
    `register` - The text representation of the register
    (type=String)
  Returns:
    True if the register is modified by any instruction in this block.
    (type=Boolean)

### render_node_gml(self, graph)

Overload the default node.render_node_gml() routine to create a custom label. Pass control to the default node renderer and then return the merged content.

  Returns:
    Contents of rendered node.
    (type=String)
  Overrides:
    `pgraph.node.node.render_node_gml`

### render_node_graphviz(self, graph)

Overload the default node.render_node_graphviz() routine to create a custom label. Pass control to the default node renderer and then return the merged content.

  Parameters:
    `graph` - Top level graph object containing the current node
    (type=pgraph.graph)
  Returns:
    Pydot object representing node
    (type=pydot.Node())
  Overrides:
    `pgraph.node.node.render_node_graphviz`

### render_node_udraw(self, graph)

Overload the default node.render_node_udraw() routine to create a custom label. Pass control to the default node renderer and then return the merged content.

  Parameters:
    `graph` - Top level graph object containing the current node
    (type=pgraph.graph)
  Returns:
    Contents of rendered node.
    (type=String)
  Overrides:
    `pgraph.node.node.render_node_udraw`

### render_node_udraw_update(self)

Overload the default node.render_node_udraw_update() routine to create a custom label. Pass control to the default node renderer and then return the merged content.

  Returns:
    Contents of rendered node.
    (type=String)
  Overrides:
    `pgraph.node.node.render_node_udraw_update`

Property Details

### ea_end

The ending address of the basic block.

### ea_start

The starting address of the basic block.

### id

The basic block id (internal use only)

### instructions

The instructions in the basic block keyed by address.

### nodes

The instructions in the basic block keyed by address.

### num_instructions

The number of instructions in the basic block.

### sorted_instructions

A list of instructions within the basic block sorted by address

Class Variable Details

### dbid

Database Identifier

  Type:
    Integer
  Value:

        None

### DSN

Database location

  Type:
    String
  Value:

        None

### ext

  Type:
    `dict`
  Value:

        {}

### function

  Type:
    `NoneType`
  Value:

        None

### module

  Type:
    `NoneType`
  Value:

        None

Generated by Epydoc 2.1 on Wed Mar 14 16:32:07 2007 | http://epydoc.sf.net