ailment
— angr Intermediate Language
- class ailment.IRSBConverter
Bases:
Converter
- static convert(irsb, manager)
Convert the given IRSB to an AIL block
- Parameters
irsb – The IRSB to convert
manager – The manager to use
- Returns
Returns the converted block
Converter
- exception ailment.converter_common.SkipConversionNotice
Bases:
Exception
- class ailment.converter_vex.VEXExprConverter
Bases:
Converter
- static simop_from_vexop(vex_op)
- static generic_name_from_vex_op(vex_op)
- static convert(expr, manager)
- Parameters
expr –
- Returns
- static convert_list(exprs, manager)
- static register(offset, bits, manager)
- static tmp(tmp_idx, bits, manager)
- static RdTmp(expr, manager)
- static Get(expr, manager)
- static Load(expr, manager)
- static Unop(expr, manager)
- static Binop(expr, manager)
- static Const(expr, manager)
- static const_n(expr, manager)
- static ITE(expr, manager)
Expressions
- class ailment.expression.Expression(*args, **kwargs)
Bases:
TaggedObject
The base class of all AIL expressions.
Create a new instance and set _tags attribute.
Since TaggedObject override __getattr__ method and try to access the _tags attribute, infinite recursion could occur if _tags not ready to exists.
This behavior causes an infinite recursion error when copying TaggedObject with copy.deepcopy.
Hence, we set _tags attribute here to prevent this problem.
- depth
- has_atom(atom, identity=True)
- likes(atom)
- replace(old_expr, new_expr)
- class ailment.expression.Atom(*args, **kwargs)
Bases:
Expression
Create a new instance and set _tags attribute.
Since TaggedObject override __getattr__ method and try to access the _tags attribute, infinite recursion could occur if _tags not ready to exists.
This behavior causes an infinite recursion error when copying TaggedObject with copy.deepcopy.
Hence, we set _tags attribute here to prevent this problem.
- variable
- variable_offset
- copy()
- class ailment.expression.Const(*args, **kwargs)
Bases:
Atom
Create a new instance and set _tags attribute.
Since TaggedObject override __getattr__ method and try to access the _tags attribute, infinite recursion could occur if _tags not ready to exists.
This behavior causes an infinite recursion error when copying TaggedObject with copy.deepcopy.
Hence, we set _tags attribute here to prevent this problem.
- value
- bits
- property size
- likes(other)
- property sign_bit
- class ailment.expression.Tmp(*args, **kwargs)
Bases:
Atom
Create a new instance and set _tags attribute.
Since TaggedObject override __getattr__ method and try to access the _tags attribute, infinite recursion could occur if _tags not ready to exists.
This behavior causes an infinite recursion error when copying TaggedObject with copy.deepcopy.
Hence, we set _tags attribute here to prevent this problem.
- tmp_idx
- bits
- property size
- likes(other)
- class ailment.expression.Register(*args, **kwargs)
Bases:
Atom
Create a new instance and set _tags attribute.
Since TaggedObject override __getattr__ method and try to access the _tags attribute, infinite recursion could occur if _tags not ready to exists.
This behavior causes an infinite recursion error when copying TaggedObject with copy.deepcopy.
Hence, we set _tags attribute here to prevent this problem.
- reg_offset
- bits
- property size
- likes(atom)
- class ailment.expression.Op(*args, **kwargs)
Bases:
Expression
Create a new instance and set _tags attribute.
Since TaggedObject override __getattr__ method and try to access the _tags attribute, infinite recursion could occur if _tags not ready to exists.
This behavior causes an infinite recursion error when copying TaggedObject with copy.deepcopy.
Hence, we set _tags attribute here to prevent this problem.
- op
- property verbose_op
- class ailment.expression.UnaryOp(*args, **kwargs)
Bases:
Op
Create a new instance and set _tags attribute.
Since TaggedObject override __getattr__ method and try to access the _tags attribute, infinite recursion could occur if _tags not ready to exists.
This behavior causes an infinite recursion error when copying TaggedObject with copy.deepcopy.
Hence, we set _tags attribute here to prevent this problem.
- operand
- bits
- variable
- variable_offset
- likes(other)
- replace(old_expr, new_expr)
- property operands
- property size
- has_atom(atom, identity=True)
- class ailment.expression.Convert(*args, **kwargs)
Bases:
UnaryOp
Create a new instance and set _tags attribute.
Since TaggedObject override __getattr__ method and try to access the _tags attribute, infinite recursion could occur if _tags not ready to exists.
This behavior causes an infinite recursion error when copying TaggedObject with copy.deepcopy.
Hence, we set _tags attribute here to prevent this problem.
- from_bits
- to_bits
- is_signed
- likes(other)
- replace(old_expr, new_expr)
- class ailment.expression.Reinterpret(*args, **kwargs)
Bases:
UnaryOp
Create a new instance and set _tags attribute.
Since TaggedObject override __getattr__ method and try to access the _tags attribute, infinite recursion could occur if _tags not ready to exists.
This behavior causes an infinite recursion error when copying TaggedObject with copy.deepcopy.
Hence, we set _tags attribute here to prevent this problem.
- from_bits
- from_type
- to_bits
- to_type
- likes(other)
- replace(old_expr, new_expr)
- copy() Reinterpret
- class ailment.expression.BinaryOp(*args, **kwargs)
Bases:
Op
Create a new instance and set _tags attribute.
Since TaggedObject override __getattr__ method and try to access the _tags attribute, infinite recursion could occur if _tags not ready to exists.
This behavior causes an infinite recursion error when copying TaggedObject with copy.deepcopy.
Hence, we set _tags attribute here to prevent this problem.
- OPSTR_MAP = {'Add': '+', 'And': '&', 'CmpEQ': '==', 'CmpF': '==f', 'CmpGE': '>=', 'CmpGEs': '>=s', 'CmpGT': '>', 'CmpGTs': '>s', 'CmpLE': '<=', 'CmpLEs': '<=s', 'CmpLT': '<', 'CmpLTs': '<s', 'CmpNE': '!=', 'Concat': 'CONCAT', 'Div': '/', 'DivMod': '/m', 'LogicalAnd': '&&', 'LogicalOr': '||', 'Mul': '*', 'Or': '|', 'Sar': '>>a', 'Shl': '<<', 'Shr': '>>', 'Sub': '-', 'Xor': '^'}
- COMPARISON_NEGATION = {'CmpEQ': 'CmpNE', 'CmpGE': 'CmpLT', 'CmpGEs': 'CmpLTs', 'CmpGT': 'CmpLE', 'CmpGTs': 'CmpLEs', 'CmpLE': 'CmpGT', 'CmpLEs': 'CmpGTs', 'CmpLT': 'CmpGE', 'CmpLTs': 'CmpGEs', 'CmpNE': 'CmpEQ'}
- operands
- bits
- signed
- variable
- variable_offset
- likes(other)
- has_atom(atom, identity=True)
- replace(old_expr, new_expr)
- property verbose_op
- property size
- class ailment.expression.Load(*args, **kwargs)
Bases:
Expression
Create a new instance and set _tags attribute.
Since TaggedObject override __getattr__ method and try to access the _tags attribute, infinite recursion could occur if _tags not ready to exists.
This behavior causes an infinite recursion error when copying TaggedObject with copy.deepcopy.
Hence, we set _tags attribute here to prevent this problem.
- addr
- size
- endness
- guard
- alt
- variable
- variable_offset
- property bits
- has_atom(atom, identity=True)
- replace(old_expr, new_expr)
- likes(other)
- class ailment.expression.ITE(*args, **kwargs)
Bases:
Expression
Create a new instance and set _tags attribute.
Since TaggedObject override __getattr__ method and try to access the _tags attribute, infinite recursion could occur if _tags not ready to exists.
This behavior causes an infinite recursion error when copying TaggedObject with copy.deepcopy.
Hence, we set _tags attribute here to prevent this problem.
- cond
- iffalse
- iftrue
- bits
- variable
- variable_offset
- likes(atom)
- has_atom(atom, identity=True)
- replace(old_expr, new_expr)
- property size
- class ailment.expression.DirtyExpression(*args, **kwargs)
Bases:
Expression
Create a new instance and set _tags attribute.
Since TaggedObject override __getattr__ method and try to access the _tags attribute, infinite recursion could occur if _tags not ready to exists.
This behavior causes an infinite recursion error when copying TaggedObject with copy.deepcopy.
Hence, we set _tags attribute here to prevent this problem.
- dirty_expr
- bits
- likes(other)
- copy() DirtyExpression
- replace(old_expr, new_expr)
- property size
- class ailment.expression.VEXCCallExpression(*args, **kwargs)
Bases:
Expression
Create a new instance and set _tags attribute.
Since TaggedObject override __getattr__ method and try to access the _tags attribute, infinite recursion could occur if _tags not ready to exists.
This behavior causes an infinite recursion error when copying TaggedObject with copy.deepcopy.
Hence, we set _tags attribute here to prevent this problem.
- cee_name
- operands
- bits
- likes(other)
- copy() VEXCCallExpression
- replace(old_expr, new_expr)
- property size
- class ailment.expression.BasePointerOffset(*args, **kwargs)
Bases:
Expression
Create a new instance and set _tags attribute.
Since TaggedObject override __getattr__ method and try to access the _tags attribute, infinite recursion could occur if _tags not ready to exists.
This behavior causes an infinite recursion error when copying TaggedObject with copy.deepcopy.
Hence, we set _tags attribute here to prevent this problem.
- bits
- base
- offset
- variable
- variable_offset
- property size
- likes(other)
- replace(old_expr, new_expr)
- copy() BasePointerOffset
- class ailment.expression.StackBaseOffset(*args, **kwargs)
Bases:
BasePointerOffset
Create a new instance and set _tags attribute.
Since TaggedObject override __getattr__ method and try to access the _tags attribute, infinite recursion could occur if _tags not ready to exists.
This behavior causes an infinite recursion error when copying TaggedObject with copy.deepcopy.
Hence, we set _tags attribute here to prevent this problem.
- copy() StackBaseOffset
Statement
- class ailment.statement.Statement(*args, **kwargs)
Bases:
TaggedObject
The base class of all AIL statements.
Create a new instance and set _tags attribute.
Since TaggedObject override __getattr__ method and try to access the _tags attribute, infinite recursion could occur if _tags not ready to exists.
This behavior causes an infinite recursion error when copying TaggedObject with copy.deepcopy.
Hence, we set _tags attribute here to prevent this problem.
- replace(old_expr, new_expr)
- eq(expr0, expr1)
- class ailment.statement.Assignment(*args, **kwargs)
Bases:
Statement
Assignment statement: expr_a = expr_b
Create a new instance and set _tags attribute.
Since TaggedObject override __getattr__ method and try to access the _tags attribute, infinite recursion could occur if _tags not ready to exists.
This behavior causes an infinite recursion error when copying TaggedObject with copy.deepcopy.
Hence, we set _tags attribute here to prevent this problem.
- dst
- src
- likes(other)
- replace(old_expr, new_expr)
- copy() Assignment
- class ailment.statement.Store(*args, **kwargs)
Bases:
Statement
Create a new instance and set _tags attribute.
Since TaggedObject override __getattr__ method and try to access the _tags attribute, infinite recursion could occur if _tags not ready to exists.
This behavior causes an infinite recursion error when copying TaggedObject with copy.deepcopy.
Hence, we set _tags attribute here to prevent this problem.
- addr
- data
- size
- endness
- variable
- guard
- offset
- likes(other)
- replace(old_expr, new_expr)
- class ailment.statement.Jump(*args, **kwargs)
Bases:
Statement
Create a new instance and set _tags attribute.
Since TaggedObject override __getattr__ method and try to access the _tags attribute, infinite recursion could occur if _tags not ready to exists.
This behavior causes an infinite recursion error when copying TaggedObject with copy.deepcopy.
Hence, we set _tags attribute here to prevent this problem.
- target
- likes(other)
- replace(old_expr, new_expr)
- copy()
- class ailment.statement.ConditionalJump(*args, **kwargs)
Bases:
Statement
Create a new instance and set _tags attribute.
Since TaggedObject override __getattr__ method and try to access the _tags attribute, infinite recursion could occur if _tags not ready to exists.
This behavior causes an infinite recursion error when copying TaggedObject with copy.deepcopy.
Hence, we set _tags attribute here to prevent this problem.
- condition
- true_target
- false_target
- likes(other)
- replace(old_expr, new_expr)
- copy() ConditionalJump
- class ailment.statement.Call(*args, **kwargs)
Bases:
Expression
,Statement
Call is both an expression and a statement. The return expression of a call is defined as the ret_expr if and only if the callee function has one return expression.
Create a new instance and set _tags attribute.
Since TaggedObject override __getattr__ method and try to access the _tags attribute, infinite recursion could occur if _tags not ready to exists.
This behavior causes an infinite recursion error when copying TaggedObject with copy.deepcopy.
Hence, we set _tags attribute here to prevent this problem.
- target
- calling_convention
- prototype
- args
- ret_expr
- likes(other)
- property bits
- property size
- property verbose_op
- property op
- replace(old_expr, new_expr)
- copy()
- class ailment.statement.Return(*args, **kwargs)
Bases:
Statement
Create a new instance and set _tags attribute.
Since TaggedObject override __getattr__ method and try to access the _tags attribute, infinite recursion could occur if _tags not ready to exists.
This behavior causes an infinite recursion error when copying TaggedObject with copy.deepcopy.
Hence, we set _tags attribute here to prevent this problem.
- target
- ret_exprs
- likes(other)
- replace(old_expr, new_expr)
- copy()
- class ailment.statement.DirtyStatement(*args, **kwargs)
Bases:
Statement
Wrapper around the original statement, which is usually not convertible (temporarily).
Create a new instance and set _tags attribute.
Since TaggedObject override __getattr__ method and try to access the _tags attribute, infinite recursion could occur if _tags not ready to exists.
This behavior causes an infinite recursion error when copying TaggedObject with copy.deepcopy.
Hence, we set _tags attribute here to prevent this problem.
- dirty_stmt
- copy() DirtyStatement
Misc. Things
- class ailment.block.Block(addr, original_size, statements=None, idx=None)
Bases:
object
Describes an AIL block.
- addr
- original_size
- statements
- idx
- copy(statements=None)
- likes(other)
- class ailment.manager.Manager(name: Optional[str] = None, arch=None)
Bases:
object
- next_atom()
- reset()
- property ins_addr: Optional[int]
- class ailment.tagged_object.TaggedObject(*args, **kwargs)
Bases:
object
A class that takes arbitrary tags.
Create a new instance and set _tags attribute.
Since TaggedObject override __getattr__ method and try to access the _tags attribute, infinite recursion could occur if _tags not ready to exists.
This behavior causes an infinite recursion error when copying TaggedObject with copy.deepcopy.
Hence, we set _tags attribute here to prevent this problem.
- idx
- initialize_tags(tags)
- property tags: Dict
- ailment.utils.get_bits(expr: Union[int, Bits, Expression]) Optional[int]
- ailment.utils.stable_hash(t: Tuple) int
- ailment.utils.is_none_or_likeable(arg1, arg2, is_list=False)
Returns whether two things are both None or can like each other