From 30fbdcc7b564f53bcacd0e969b3cfdf05fa89e21 Mon Sep 17 00:00:00 2001 From: mephi42 Date: Sat, 15 Sep 2018 11:12:27 +0200 Subject: [PATCH] angr/analyses: disambiguate types in docstrings Fixes "WARNING: more than one target found for cross-reference". Actually Sphinx authors seem to agree that in the case we are running into, Sphinx should prefer the type from the current module. But this is not implemented yet: https://github.com/sphinx-doc/sphinx/issues/4961. --- angr/analyses/ddg.py | 8 ++++---- .../analyses/reaching_definitions/reaching_definitions.py | 3 ++- angr/analyses/reassembler.py | 2 +- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/angr/analyses/ddg.py b/angr/analyses/ddg.py index 3700e1e1f34..038afc5d2fb 100644 --- a/angr/analyses/ddg.py +++ b/angr/analyses/ddg.py @@ -124,7 +124,7 @@ def branch(self): Create a branch of the current live definition collection. :return: A new LiveDefinition instance. - :rtype: LiveDefinitions + :rtype: angr.analyses.ddg.LiveDefinitions """ ld = LiveDefinitions() @@ -139,7 +139,7 @@ def copy(self): Make a hard copy of `self`. :return: A new LiveDefinition instance. - :rtype: LiveDefinitions + :rtype: angr.analyses.ddg.LiveDefinitions """ ld = LiveDefinitions() @@ -799,7 +799,7 @@ def _track(self, state, live_defs, statements): :param live_defs: All live definitions prior to reaching this program point. :param list statements: A list of VEX statements. :returns: A list of new live definitions. - :rtype: LiveDefinitions + :rtype: angr.analyses.ddg.LiveDefinitions """ # Make a copy of live_defs @@ -862,7 +862,7 @@ def _def_lookup(self, variable): # pylint:disable=no-self-use This is a backward lookup in the previous defs. Note that, as we are using VSA, it is possible that `variable` is affected by several definitions. - :param LiveDefinitions live_defs: The collection of live definitions. + :param angr.analyses.ddg.LiveDefinitions live_defs: The collection of live definitions. :param SimVariable: The variable to lookup for definitions. :returns: A dict {stmt:labels} where label is the number of individual addresses of `addr_list` (or the actual set of addresses depending on the keep_addrs flag) that are definted by stmt. diff --git a/angr/analyses/reaching_definitions/reaching_definitions.py b/angr/analyses/reaching_definitions/reaching_definitions.py index f2eb6989fc7..1ee6e31e948 100644 --- a/angr/analyses/reaching_definitions/reaching_definitions.py +++ b/angr/analyses/reaching_definitions/reaching_definitions.py @@ -243,7 +243,8 @@ def __init__(self, func=None, block=None, func_graph=None, max_iterations=3, tra :param iterable observation_points: A collection of tuples of (ins_addr, OP_TYPE) defining where reaching definitions should be copied and stored. OP_TYPE can be OP_BEFORE or OP_AFTER. - :param LiveDefinitions init_state: An optional initialization state. The analysis creates and works on a + :param angr.analyses.reaching_definitions.reaching_definitions.LiveDefinitions init_state: + An optional initialization state. The analysis creates and works on a copy. :param bool init_func: Whether stack and arguments are initialized or not. :param SimCC cc: Calling convention of the function. diff --git a/angr/analyses/reassembler.py b/angr/analyses/reassembler.py index 03e6bc28026..23ef3b18d53 100644 --- a/angr/analyses/reassembler.py +++ b/angr/analyses/reassembler.py @@ -379,7 +379,7 @@ def label_got(self, addr, label): Mark a certain label as assigned (to an instruction or a block of data). :param int addr: The address of the label. - :param Label label: The label that is just assigned. + :param angr.analyses.reassembler.LabelLabel label: The label that is just assigned. :return: None """