about summary refs log tree commit diff stats
path: root/example/symbol_exec/depgraph.py
diff options
context:
space:
mode:
authorFabrice Desclaux <fabrice.desclaux@cea.fr>2016-03-17 08:56:30 +0100
committerFabrice Desclaux <fabrice.desclaux@cea.fr>2016-03-21 15:09:22 +0100
commit02935e7796b6fa185feb439315bcf7bb31015af9 (patch)
treeef42a6d8bf6b0438b4eb373d9eaf114bef8829f0 /example/symbol_exec/depgraph.py
parent752d7fb00c46aefc87f8a1c8f3aab450e7dc1b44 (diff)
downloadmiasm-02935e7796b6fa185feb439315bcf7bb31015af9.tar.gz
miasm-02935e7796b6fa185feb439315bcf7bb31015af9.zip
Example/dg: fix print solutions
Diffstat (limited to 'example/symbol_exec/depgraph.py')
-rw-r--r--example/symbol_exec/depgraph.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/example/symbol_exec/depgraph.py b/example/symbol_exec/depgraph.py
index c0eeb134..d30b1ef0 100644
--- a/example/symbol_exec/depgraph.py
+++ b/example/symbol_exec/depgraph.py
@@ -91,6 +91,9 @@ for sol_nb, sol in enumerate(dg.get(current_block.label, elements, line_nb, set(
         if sat:
             constraints = {}
             for element in sol.constraints:
-                constraints[element] = hex(
-                    sol.constraints[element].as_long())
+                try:
+                    result = hex(sol.constraints[element].as_long())
+                except AttributeError:
+                    result = str(sol.constraints[element])
+                constraints[element] = result
         print "\tSatisfiability: %s %s" % (sat, constraints)