Data Models¶
All data models are frozen dataclasses. Fields are populated on successful
decompilation; see DecompileResult for how
None values are used on error.
Function Structure¶
flatline.FunctionInfo
dataclass
¶
FunctionInfo(name: str, entry_address: int, size: int, is_complete: bool, prototype: FunctionPrototype, local_variables: list[VariableInfo], call_sites: list[CallSiteInfo], jump_tables: list[JumpTableInfo], diagnostics: DiagnosticFlags, varnode_count: int)
Structured post-decompile data for one function.
Populated on successful decompilation. Access via
DecompileResult.function_info.
Attributes:
| Name | Type | Description |
|---|---|---|
name |
str
|
Function name assigned by the decompiler. |
entry_address |
int
|
Function entry point virtual address. |
size |
int
|
Function body size in bytes. |
is_complete |
bool
|
Whether decompilation completed fully. |
prototype |
FunctionPrototype
|
Recovered function signature. |
local_variables |
list[VariableInfo]
|
Local scope variables. |
call_sites |
list[CallSiteInfo]
|
Call instructions within the function. |
jump_tables |
list[JumpTableInfo]
|
Recovered jump tables. |
diagnostics |
DiagnosticFlags
|
Aggregated diagnostic status flags. |
varnode_count |
int
|
Total Varnode count (complexity metric). |
flatline.FunctionPrototype
dataclass
¶
FunctionPrototype(calling_convention: str | None, parameters: list[ParameterInfo], return_type: TypeInfo, is_noreturn: bool, has_this_pointer: bool, has_input_errors: bool, has_output_errors: bool)
Recovered function signature.
Attributes:
| Name | Type | Description |
|---|---|---|
calling_convention |
str | None
|
Calling convention model name (e.g.
|
parameters |
list[ParameterInfo]
|
Recovered function parameters. |
return_type |
TypeInfo
|
Recovered return type. |
is_noreturn |
bool
|
|
has_this_pointer |
bool
|
|
has_input_errors |
bool
|
|
has_output_errors |
bool
|
|
flatline.DiagnosticFlags
dataclass
¶
DiagnosticFlags(is_complete: bool, has_unreachable_blocks: bool, has_unimplemented: bool, has_bad_data: bool, has_no_code: bool)
Aggregated boolean diagnostic flags from the decompiler.
Attributes:
| Name | Type | Description |
|---|---|---|
is_complete |
bool
|
Whether decompilation completed fully. |
has_unreachable_blocks |
bool
|
Whether unreachable basic blocks were detected. |
has_unimplemented |
bool
|
Whether unimplemented instructions were encountered. |
has_bad_data |
bool
|
Whether the decompiler flagged bad data in the function body. |
has_no_code |
bool
|
Whether the function entry contained no executable code. |
Leaf Types¶
flatline.TypeInfo
dataclass
¶
Recovered type descriptor.
Attributes:
| Name | Type | Description |
|---|---|---|
name |
str
|
Type name (e.g. |
size |
int
|
Type size in bytes. |
metatype |
str
|
Stable metatype classification string. One of
|
flatline.ParameterInfo
dataclass
¶
One function parameter.
Attributes:
| Name | Type | Description |
|---|---|---|
name |
str
|
Parameter name recovered by the decompiler. |
type |
TypeInfo
|
Recovered type descriptor. |
index |
int
|
Zero-based position in the function signature. |
storage |
StorageInfo | None
|
Storage location, or |
flatline.VariableInfo
dataclass
¶
One local variable.
Attributes:
| Name | Type | Description |
|---|---|---|
name |
str
|
Variable name recovered by the decompiler. |
type |
TypeInfo
|
Recovered type descriptor. |
storage |
StorageInfo | None
|
Storage location, or |
flatline.CallSiteInfo
dataclass
¶
One call instruction within the function.
Attributes:
| Name | Type | Description |
|---|---|---|
instruction_address |
int
|
Address of the |
target_address |
int | None
|
Resolved callee address, or |
flatline.JumpTableInfo
dataclass
¶
One recovered jump table.
Attributes:
| Name | Type | Description |
|---|---|---|
switch_address |
int
|
Address of the switch or indirect-branch instruction. |
target_count |
int
|
Number of resolved target addresses. |
target_addresses |
list[int]
|
Resolved target addresses. |
flatline.StorageInfo
dataclass
¶
Variable or parameter storage location.
Attributes:
| Name | Type | Description |
|---|---|---|
space |
str
|
Address space name (e.g. |
offset |
int
|
Byte offset within the address space. |
size |
int
|
Size in bytes. |