summaryrefslogtreecommitdiff
path: root/python
diff options
context:
space:
mode:
authorChinmay <chinmay1dd@gmail.com>2020-08-16 21:23:43 -0700
committerJordan <jordan@psifertex.com>2020-08-17 19:33:34 -0400
commitd50efcaed96c505235a3239c18c35986217df873 (patch)
tree265dc3dc61d7efad060ff8e9d892b1cc5f4d2fa8 /python
parent03c47c0a8c0b4d02e1d2307c90c3e36b07ccfe68 (diff)
Incorporates review comments
Diffstat (limited to 'python')
-rw-r--r--python/function.py16
1 files changed, 14 insertions, 2 deletions
diff --git a/python/function.py b/python/function.py
index f1b478d5..4a80a83b 100644
--- a/python/function.py
+++ b/python/function.py
@@ -591,6 +591,12 @@ class PossibleValueSet(object):
:param list(ValueRange) ranges: List of ValueRanges
:rtype: PossibleValueSet
+ :Example:
+
+ >>> v_1 = ValueRange(-5, -1, 1)
+ >>> v_2 = ValueRange(7, 10, 1)
+ >>> val = PossibleValueSet.signed_range_value([v_1, v_2])
+ <signed ranges: [<range: -0x5 to -0x1>, <range: 0x7 to 0xa>]>
"""
result = PossibleValueSet()
result.value = 0
@@ -606,6 +612,12 @@ class PossibleValueSet(object):
:param list(ValueRange) ranges: List of ValueRanges
:rtype: PossibleValueSet
+ :Example:
+
+ >>> v_1 = ValueRange(0, 5, 1)
+ >>> v_2 = ValueRange(7, 10, 1)
+ >>> val = PossibleValueSet.unsigned_range_value([v_1, v_2])
+ <unsigned ranges: [<range: 0x0 to 0x5>, <range: 0x7 to 0xa>]>
"""
result = PossibleValueSet()
result.value = 0
@@ -2643,7 +2655,7 @@ class Function(object):
def set_user_var_value(self, var, def_addr, value):
"""
- `set_user_var_value` allows the user to specify a PossibleValueSet value for a (MLIL) variable at its
+ `set_user_var_value` allows the user to specify a PossibleValueSet value for an MLIL variable at its
definition site.
..warning:: Setting the variable value, triggers a reanalysis of the function and allows the dataflow
@@ -2685,7 +2697,7 @@ class Function(object):
def clear_user_var_value(self, var, def_addr):
"""
- Clears a perviously informed user variable value.
+ Clears a previously defined user variable value.
:param Variable var: Variable for which the value was informed
:param int def_addr: Address of the definition site of the variable