Skip to content

Commit

Permalink
angr/analyses: disambiguate types in docstrings
Browse files Browse the repository at this point in the history
Fixes "WARNING: more than one target found for cross-reference".

Actually Sphinx authors seem to agree that in the case similar to the
one that we are running into, Sphinx should prefer the type from the
current module.  But this is [not implemented yet](
sphinx-doc/sphinx#4961).
  • Loading branch information
mephi42 committed Sep 15, 2018
1 parent 934823f commit a6fc7d4
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 6 deletions.
9 changes: 5 additions & 4 deletions angr/analyses/ddg.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand All @@ -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()
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -862,7 +862,8 @@ 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.
Expand Down
3 changes: 2 additions & 1 deletion angr/analyses/reaching_definitions/reaching_definitions.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
3 changes: 2 additions & 1 deletion angr/analyses/reassembler.py
Original file line number Diff line number Diff line change
Expand Up @@ -379,7 +379,8 @@ 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.Label label:
The label that is just assigned.
:return: None
"""

Expand Down

0 comments on commit a6fc7d4

Please sign in to comment.