projects
/
b43-tools.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
assembler/disassembler: Fix indirect mem addressing for r15
[b43-tools.git]
/
debug
/
b43-fwdump
diff --git
a/debug/b43-fwdump
b/debug/b43-fwdump
index 0e94a3026ee383965bae73190f7a5d9e47195232..24f1f0d23d8e99cbb60b24eb7180e0eec93ee100 100755
(executable)
--- a/
debug/b43-fwdump
+++ b/
debug/b43-fwdump
@@
-32,7
+32,8
@@
def usage():
print "Usage: b43-fwdump [OPTIONS]"
print ""
print "-h|--help Print this help text"
print "Usage: b43-fwdump [OPTIONS]"
print ""
print "-h|--help Print this help text"
- print "-p|--phy PHY The PHY to use. For example phy0"
+ print "-p|--phy WIPHY The WIPHY to use. For example phy0."
+ print " Can be omitted, if there is only one device in the system."
print "-b|--binary BIN The firmware binary. This is required for"
print " an instruction dump."
print "-d|--dasmopt OPT Additional options to the disassembler."
print "-b|--binary BIN The firmware binary. This is required for"
print " an instruction dump."
print "-d|--dasmopt OPT Additional options to the disassembler."
@@
-90,16
+91,6
@@
def dump_regs(prefix, regs):
stdout.write("\n")
return
stdout.write("\n")
return
-def disassembleText(text):
- input = NamedTemporaryFile()
- output = NamedTemporaryFile()
-
- input.write(text)
- input.flush()
- os.system("b43-dasm %s %s %s --paddr" % (input.name, dasmopt, output.name))
-
- return output.read()
-
def makeShortDump(dasm, pc):
dasm = dasm.splitlines()
i = 0
def makeShortDump(dasm, pc):
dasm = dasm.splitlines()
i = 0
@@
-162,7
+153,7
@@
def main():
except IOError, e:
print "Could not read binary file %s: %s" % (binary, e.strerror)
sys.exit(1)
except IOError, e:
print "Could not read binary file %s: %s" % (binary, e.strerror)
sys.exit(1)
- dasm =
disassembleText(bintext
)
+ dasm =
Disassembler(bintext, dasmopt + "--paddr").getAsm(
)
print makeShortDump(dasm, dbg.getPc())
else:
print "<No binary supplied. See --binary option>"
print makeShortDump(dasm, dbg.getPc())
else:
print "<No binary supplied. See --binary option>"