-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 dasmLineIsPC(line, pc):
+ m = re.match(r'.*/\*\s+([0-9a-fA-F]+)\s+\*/.*', line, re.DOTALL)
+ if not m:
+ return False
+ linePC = int(m.group(1), 16)
+ return pc == linePC