Package bakmei :: Module sql_singleton :: Class __impl |

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

## Type __impl

    object --+
             |
            __impl

Implementation of the singleton interface

Method Summary
| `__del__(self)`
| `_impl__init_connection(self, DSN)`
| ``connection`(self, DSN)` return the SQL connection object
| `create_bakmei_database(self, DSN)`
| `cursor(self)`
| ``isNumber`(value)` Checks to see if a value is a number.
| `select_args(self, DSN, function_id)`
| `select_basic_block(self, DSN, basic_block_id)`
| `select_basic_block_num_instructions(self, DSN, basic_block_id)`
| `select_basic_block_sorted_instructions(self, DSN, basic_block_id)`
| `select_frame_info(self, DSN, function_id)`
| `select_function(self, DSN, function_id)`
| `select_function_basic_block_by_address(self, DSN, function_id, address)`
| ``select_function_basic_block_references`(self, DSN, function_id)` Returns a list of tuples consisting of the source basic block address and the destination basic block address.
| `select_function_basic_blocks(self, DSN, function_id)`
| `select_function_instruction_references_to(self, DSN, function_id)`
| `select_function_num_instructions(self, DSN, function_id)`
| `select_function_num_vars(self, DSN, function_id, var_type)`
| `select_instruction(self, DSN, instruction_id)`
| `select_instruction_operands(self, DSN, instruction_id)`
| `select_instruction_references_to(self, DSN, instruction_id)`
| `select_local_vars(self, DSN, function_id)`
| `select_module(self, DSN, module_id)`
| ``select_module_function_references`(self, DSN, module_id)` Returns a list of tuples consisting of the source function address and the destination function address.
| `select_module_functions(self, DSN, module_id)`
| `select_module_imported_functions(self, DSN, module_id)`
| ``select_module_instruction_by_address`(self, DSN, module_id, address)` Retrieve all the instruction ID that corresponds to the address in the given module
| `select_module_library_functions(self, DSN, module_id)`
| `select_module_num_functions(self, DSN, module_id)`
[(Integer, String)] | ``select_modules`(self, DSN)` Retrieve the name and IDs of all modules in the database.
| `select_operand(self, DSN, operand_id)`
| ``select_rpc_functions`(self, DSN, module_id)` Retrieve all the RPC function IDs for the given module
| ``select_rpc_functions_by_uuid`(self, DSN, module_id, uuid)` Retrieve all the RPC function IDs for the given UUID in the module
| ``select_rpc_uuids`(self, DSN, module_id)` Retrieve all the RPC UUIDs for the given module
| `test(self)`
| `update_basic_block_end_address(self, DSN, basic_block_id, address)`
| `update_basic_block_start_address(self, DSN, basic_block_id, address)`
| `update_function_arg_size(self, DSN, function_id, size)`
| `update_function_end_address(self, DSN, function_id, address)`
| `update_function_exported(self, DSN, function_id, exported)`
| `update_function_flags(self, DSN, function_id, flags)`
| `update_function_frame_size(self, DSN, function_id, size)`
| `update_function_local_var_size(self, DSN, function_id, size)`
| `update_function_name(self, DSN, function_id, name)`
| `update_function_ret_size(self, DSN, function_id, size)`
| `update_function_saved_reg_size(self, DSN, function_id, size)`
| `update_function_start_address(self, DSN, function_id, address)`
| `update_instruction_address(self, DSN, instruction_id, address)`
| `update_instruction_bytes(self, DSN, instruction_id, byte_string)`
| `update_instruction_comment(self, DSN, instruction_id, comment)`
| `update_instruction_flags(self, DSN, instruction_id, flags)`
| `update_instruction_mnemonic(self, DSN, instruction_id, mnemonic)`
| `update_instruction_operand(self, DSN, instruction_id, operand_seq, value)`
| `update_module_base(self, DSN, module_id, base)`
| `update_module_comment(self, DSN, module_id, comment, author)`
| `update_module_name(self, DSN, module_id, name)`
| `update_module_signature(self, DSN, module_id, signature)`
| `update_operand_text(self, DSN, operand_id, text)`
Inherited from object
| ``__init__`(...)` x.__init__(...) initializes x; see x.__class__.__doc__ for signature
| ``__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)

Class Variable Summary
`NoneType` | `_impl__active_DSN` = None
`str` | `_impl__active_syntax` = `'sqlite'`
`dict` | `_impl__sql` = `{}`
`str` | `INSERT_BASIC_BLOCK` = `'INSERT INTO basic_block (start_add...`
`str` | `INSERT_FUNCTION` = `'INSERT INTO function (module, start_a...`
`str` | `INSERT_INSTRUCTION` = `'INSERT INTO instruction (address, ...`
`str` | `INSERT_MODULE` = `'INSERT INTO module (name, base, version...`
`str` | `INSERT_OPERAND` = `'INSERT INTO operand (instruction, posi...`

Method Details

### connection(self, DSN=None)

return the SQL connection object

### isNumber(value)

Checks to see if a value is a number.

### select_function_basic_block_references(self, DSN, function_id)

Returns a list of tuples consisting of the source basic block address and the destination basic block address.

### select_module_function_references(self, DSN, module_id)

Returns a list of tuples consisting of the source function address and the destination function address.

### select_module_instruction_by_address(self, DSN, module_id, address)

Retrieve all the instruction ID that corresponds to the address in the given module

### select_modules(self, DSN)

Retrieve the name and IDs of all modules in the database.

  Parameters:
    `DSN` - The database source name.
    (type=String)
  Returns:
    A list of tuples containing the module ID and the module name.
    (type=[(Integer, String)])

### select_rpc_functions(self, DSN, module_id)

Retrieve all the RPC function IDs for the given module

### select_rpc_functions_by_uuid(self, DSN, module_id, uuid)

Retrieve all the RPC function IDs for the given UUID in the module

### select_rpc_uuids(self, DSN, module_id)

Retrieve all the RPC UUIDs for the given module

Class Variable Details

### _impl__active_DSN

  Type:
    `NoneType`
  Value:

        None

### _impl__active_syntax

  Type:
    `str`
  Value:

        'sqlite'

### _impl__sql

  Type:
    `dict`
  Value:

        {}

### INSERT_BASIC_BLOCK

  Type:
    `str`
  Value:

        'INSERT INTO basic_block (start_address, end_address, function, module\
        ) VALUES (%d, %d, %d, %d);'

### INSERT_FUNCTION

  Type:
    `str`
  Value:

        'INSERT INTO function (module, start_address, end_address, name) VALUE\
        S (%d, %d, %d, %s);'

### INSERT_INSTRUCTION

  Type:
    `str`
  Value:

        'INSERT INTO instruction (address, basic_block, function, module, mnem\
        onic, bytes) VALUES (%d, %d, %d, %d, %s, %s);'

### INSERT_MODULE

  Type:
    `str`
  Value:

        'INSERT INTO module (name, base, version) VALUES (%s, %d, %s);'

### INSERT_OPERAND

  Type:
    `str`
  Value:

        'INSERT INTO operand (instruction, position, operand_text) VALUES (%d,\
         %d, %s);'

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