Index: tools/disasm.py |
diff --git a/tools/disasm.py b/tools/disasm.py |
index 681b4256dfe005058a409ea960377d6580579dd6..6fa81cab9388fe232540fb43aacf586f402ec580 100644 |
--- a/tools/disasm.py |
+++ b/tools/disasm.py |
@@ -53,12 +53,12 @@ _ARCH_MAP = { |
} |
-def GetDisasmLines(filename, offset, size, arch, inplace): |
+def GetDisasmLines(filename, offset, size, arch, inplace, arch_flags=""): |
tmp_name = None |
if not inplace: |
# Create a temporary file containing a copy of the code. |
assert arch in _ARCH_MAP, "Unsupported architecture '%s'" % arch |
- arch_flags = _ARCH_MAP[arch] |
+ arch_flags = arch_flags + " " + _ARCH_MAP[arch] |
tmp_name = tempfile.mktemp(".v8code") |
command = "dd if=%s of=%s bs=1 count=%d skip=%d && " \ |
"%s %s -D -b binary %s %s" % ( |
@@ -66,8 +66,8 @@ def GetDisasmLines(filename, offset, size, arch, inplace): |
OBJDUMP_BIN, ' '.join(_COMMON_DISASM_OPTIONS), arch_flags, |
tmp_name) |
else: |
- command = "%s %s --start-address=%d --stop-address=%d -d %s " % ( |
- OBJDUMP_BIN, ' '.join(_COMMON_DISASM_OPTIONS), |
+ command = "%s %s %s --start-address=%d --stop-address=%d -d %s " % ( |
+ OBJDUMP_BIN, ' '.join(_COMMON_DISASM_OPTIONS), arch_flags, |
offset, |
offset + size, |
filename) |