Fix ARM9 exceptions displaying ARM11-specific info

This commit is contained in:
Aurora Wright
2017-10-07 20:57:42 +02:00
parent 348b175994
commit 1e4431dcc9
2 changed files with 5 additions and 5 deletions

View File

@@ -142,8 +142,8 @@ def main(args=None):
print("Exception type: {0}{1}".format("unknown" if exceptionType >= len(handledExceptionNames) else handledExceptionNames[exceptionType], typeDetailsStr))
xfsr = registers[18] if exceptionType == 2 else registers[17] if exceptionType == 3 else 0
if xfsr != 0:
if processor == 11 and exceptionType >= 2:
xfsr = registers[18] if exceptionType == 2 else registers[17]
print("Fault status: " + faultStatusSources[xfsr & 0xf])
if additionalDataSize != 0:
@@ -155,7 +155,7 @@ def main(args=None):
print(makeRegisterLine(registerNames[i], registers[i], registerNames[i+1], registers[i+1]))
if nbRegisters % 2 == 1: print("{0:<15}{1:<20}".format(registerNames[nbRegisters - 1], "{0:08x}".format(registers[nbRegisters - 1])))
if exceptionType == 3:
if processor == 11 and exceptionType == 3:
print("{0:<15}{1:<20}Access type: {2}".format("FAR", "{0:08x}".format(registers[19]), "Write" if registers[17] & (1 << 11) != 0 else "Read"))
thumb = registers[16] & 0x20 != 0