types module¶
-
class
NamedTypeReference
(type_class=<NamedTypeReferenceClass.UnknownNamedTypeClass: 0>, type_id=None, name=None, handle=None)[source]¶ Bases:
object
-
name
¶
-
type_class
¶
-
type_id
¶
-
-
class
Structure
(handle=None)[source]¶ Bases:
object
-
alignment
¶ Structure alignment
-
members
¶ Structure member list (read-only)
-
packed
¶
-
type
¶
-
union
¶
-
width
¶ Structure width
-
-
class
Symbol
(sym_type, addr, short_name, full_name=None, raw_name=None, handle=None, binding=None, namespace=None)[source]¶ Bases:
object
Symbols are defined as one of the following types:
SymbolType Description FunctionSymbol Symbol for Function that exists in the current binary ImportAddressSymbol Symbol defined in the Import Address Table ImportedFunctionSymbol Symbol for Function that is not defined in the current binary DataSymbol Symbol for Data in the current binary ImportedDataSymbol Symbol for Data that is not defined in the current binary ExternalSymbol Symbols for data and code that reside outside the BinaryView -
address
¶ Symbol address (read-only)
-
auto
¶
-
binding
¶ Symbol binding (read-only)
-
full_name
¶ Symbol full name (read-only)
-
name
¶ Symbol name (read-only)
-
namespace
¶ Symbol namespace (read-only)
-
raw_name
¶ Symbol raw name (read-only)
-
short_name
¶ Symbol short name (read-only)
-
type
¶ Symbol type (read-only)
-
-
class
Type
(handle, platform=None, confidence=255)[source]¶ Bases:
object
-
classmethod
float
(width, altname='')[source]¶ float
class method for creating an floating point Types.Parameters: - width (int) – width of the floating point number in bytes
- altname (string) – alternate name for type
-
classmethod
function
(ret, params, calling_convention=None, variable_arguments=None, stack_adjust=None)[source]¶ function
class method for creating an function Type.Parameters: - ret (Type) – width of the integer in bytes
- params (list(Type)) – list of parameter Types
- calling_convention (CallingConvention) – optional argument for function calling convention
- variable_arguments (bool) – optional argument for functions that have a variable number of arguments
-
classmethod
int
(width, sign=None, altname='')[source]¶ int
class method for creating an int Type.Parameters:
-
alignment
¶ Type alignment (read-only)
-
calling_convention
¶ Calling convention (read-only)
-
can_return
¶ Whether type can return (read-only)
-
const
¶ Whether type is const (read/write)
-
count
¶ Type count (read-only)
-
element_type
¶ Target (read-only)
-
enumeration
¶ Type enumeration (read-only)
-
has_variable_arguments
¶ Whether type has variable arguments (read-only)
-
modified
¶ Whether type is modified (read-only)
-
named_type_reference
¶ Reference to a named type (read-only)
-
offset
¶ Offset into structure (read-only)
-
parameters
¶ Type parameters list (read-only)
-
return_value
¶ Return value (read-only)
-
signed
¶ Wether type is signed (read-only)
-
stack_adjustment
¶ Stack adjustment for function (read-only)
-
structure
¶ Structure of the type (read-only)
-
target
¶ Target (read-only)
-
tokens
¶ Type string as a list of tokens (read-only)
-
type_class
¶ Type class (read-only)
-
width
¶ Type width (read-only)
-
classmethod
-
preprocess_source
(source, filename=None, include_dirs=[])[source]¶ preprocess_source
run the C preprocessor on the given source or source filename.Parameters: Returns: returns a tuple of (preprocessed_source, error_string)
Return type: Example: >>> source = "#define TEN 10\nint x[TEN];\n" >>> preprocess_source(source) ('#line 1 "input"\n\n#line 2 "input"\n int x [ 10 ] ;\n', '') >>>