From f8687791c32688a78b5e6667b2af9689816e41af Mon Sep 17 00:00:00 2001 From: Rusty Wagner Date: Fri, 10 Feb 2017 16:37:32 -0500 Subject: Merge in pull requests that never made it into dev --- python/architecture.py | 4 ++-- python/binaryview.py | 2 +- python/types.py | 14 ++++++++++++++ 3 files changed, 17 insertions(+), 3 deletions(-) (limited to 'python') diff --git a/python/architecture.py b/python/architecture.py index f1440ca3..3e899d68 100644 --- a/python/architecture.py +++ b/python/architecture.py @@ -1160,8 +1160,8 @@ class Architecture(object): def get_instruction_low_level_il(self, data, addr, il): """ - ``get_instruction_low_level_il`` appends LowLevelILExpr objects for the instruction at the given virtual - address ``addr`` with data ``data``. + ``get_instruction_low_level_il`` appends LowLevelILExpr objects to ``il`` for the instruction at the given + virtual address ``addr`` with data ``data``. :param str data: max_instruction_length bytes from the binary at virtual address ``addr`` :param int addr: virtual address of bytes in ``data`` diff --git a/python/binaryview.py b/python/binaryview.py index 476f2be6..c021024f 100644 --- a/python/binaryview.py +++ b/python/binaryview.py @@ -1933,7 +1933,7 @@ class BinaryView(object): def get_basic_blocks_starting_at(self, addr): """ - ``get_basic_blocks_at`` get a list of :py:Class:`BasicBlock` objects which start at the provided virtual address. + ``get_basic_blocks_starting_at`` get a list of :py:Class:`BasicBlock` objects which start at the provided virtual address. :param int addr: virtual address of BasicBlock desired :return: a list of :py:Class:`BasicBlock` objects diff --git a/python/types.py b/python/types.py index 8582e4e0..62a441cd 100644 --- a/python/types.py +++ b/python/types.py @@ -237,6 +237,12 @@ class Type(object): @classmethod def int(self, width, sign = True, altname=""): + """ + ``int`` class method for creating an int Type. + + :param int width: width of the integer in bytes + :param bool sign: optional variable representing signedness + """ return Type(core.BNCreateIntegerType(width, sign, altname)) @classmethod @@ -267,6 +273,14 @@ class Type(object): @classmethod def function(self, ret, params, calling_convention=None, variable_arguments=False): + """ + ``function`` class method for creating an function Type. + + :param Type ret: width of the integer in bytes + :param list(Type) params: list of parameter Types + :param CallingConvention calling_convention: optional argument for function calling convention + :param bool variable_arguments: optional argument for functions that have a variable number of arguments + """ param_buf = (core.BNNameAndType * len(params))() for i in xrange(0, len(params)): if isinstance(params[i], Type): -- cgit v1.3.1