about summary refs log tree commit diff stats
path: root/example/disasm/full.py
diff options
context:
space:
mode:
authorFabrice Desclaux <fabrice.desclaux@cea.fr>2020-08-22 12:47:01 +0200
committerFabrice Desclaux <fabrice.desclaux@cea.fr>2020-08-31 07:50:01 +0200
commit80e40a3d2ca735db955807ad0605b43ca22e4e35 (patch)
tree4d41d7b53565f833444d3520eb22eed3e8bf26f1 /example/disasm/full.py
parent5d8beb271d9890241a6d61dd476fab26ca37ebbf (diff)
downloadmiasm-80e40a3d2ca735db955807ad0605b43ca22e4e35.tar.gz
miasm-80e40a3d2ca735db955807ad0605b43ca22e4e35.zip
Avoid generate default locationdb
Diffstat (limited to 'example/disasm/full.py')
-rw-r--r--example/disasm/full.py14
1 files changed, 11 insertions, 3 deletions
diff --git a/example/disasm/full.py b/example/disasm/full.py
index 57263a6f..9e739109 100644
--- a/example/disasm/full.py
+++ b/example/disasm/full.py
@@ -15,6 +15,7 @@ from miasm.expression.simplifications import expr_simp
 from miasm.analysis.ssa import SSADiGraph
 from miasm.ir.ir import AssignBlock, IRBlock
 from miasm.analysis.simplifier import IRCFGSimplifierCommon, IRCFGSimplifierSSA
+from miasm.core.locationdb import LocationDB
 
 log = logging.getLogger("dis")
 console_handler = logging.StreamHandler()
@@ -75,13 +76,20 @@ args = parser.parse_args()
 if args.verbose:
     log_asmblock.setLevel(logging.DEBUG)
 
+loc_db = LocationDB()
 log.info('Load binary')
 if args.rawbinary:
-    cont = Container.fallback_container(open(args.filename, "rb").read(),
-                                        vm=None, addr=args.base_address)
+    cont = Container.fallback_container(
+        open(args.filename, "rb").read(),
+        vm=None, addr=args.base_address,
+        loc_db=loc_db,
+    )
 else:
     with open(args.filename, "rb") as fdesc:
-        cont = Container.from_stream(fdesc, addr=args.base_address)
+        cont = Container.from_stream(
+            fdesc, addr=args.base_address,
+            loc_db=loc_db,
+        )
 
 default_addr = cont.entry_point
 bs = cont.bin_stream