ESP8266 Better Exception Code Names (#358)

This commit is contained in:
Otto Winter 2019-01-19 16:50:17 +01:00 committed by GitHub
parent ab40156c16
commit e4a2677de4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -63,7 +63,7 @@ def get_idedata(config):
# ESP logs stack trace decoder, based on https://github.com/me-no-dev/EspExceptionDecoder # ESP logs stack trace decoder, based on https://github.com/me-no-dev/EspExceptionDecoder
ESP8266_EXCEPTION_CODES = { ESP8266_EXCEPTION_CODES = {
0: "Illegal instruction", 0: "Illegal instruction (Is the flash damaged?)",
1: "SYSCALL instruction", 1: "SYSCALL instruction",
2: "InstructionFetchError: Processor internal physical address or data error during " 2: "InstructionFetchError: Processor internal physical address or data error during "
"instruction fetch", "instruction fetch",
@ -71,7 +71,7 @@ ESP8266_EXCEPTION_CODES = {
4: "Level1Interrupt: Level-1 interrupt as indicated by set level-1 bits in the INTERRUPT " 4: "Level1Interrupt: Level-1 interrupt as indicated by set level-1 bits in the INTERRUPT "
"register", "register",
5: "Alloca: MOVSP instruction, if caller's registers are not in the register file", 5: "Alloca: MOVSP instruction, if caller's registers are not in the register file",
6: "IntegerDivideByZero: QUOS, QUOU, REMS, or REMU divisor operand is zero", 6: "Integer Divide By Zero",
7: "reserved", 7: "reserved",
8: "Privileged: Attempt to execute a privileged operation when CRING ? 0", 8: "Privileged: Attempt to execute a privileged operation when CRING ? 0",
9: "LoadStoreAlignmentCause: Load or store to an unaligned address", 9: "LoadStoreAlignmentCause: Load or store to an unaligned address",
@ -96,10 +96,8 @@ ESP8266_EXCEPTION_CODES = {
26: "LoadStorePrivilege: A load or store referenced a virtual address at a ring level less " 26: "LoadStorePrivilege: A load or store referenced a virtual address at a ring level less "
"than ", "than ",
27: "reserved", 27: "reserved",
28: "LoadProhibited: A load referenced a page mapped with an attribute that does not permit " 28: "Access to invalid address: LOAD (wild pointer?)",
"loads", 29: "Access to invalid address: STORE (wild pointer?)",
29: "StoreProhibited: A store referenced a page mapped with an attribute that does not permit "
"stores",
} }
@ -126,7 +124,7 @@ def _parse_register(config, regex, line):
_decode_pc(config, match.group(1)) _decode_pc(config, match.group(1))
STACKTRACE_ESP8266_EXCEPTION_TYPE_RE = re.compile(r'Exception \(([0-9]*)\):') STACKTRACE_ESP8266_EXCEPTION_TYPE_RE = re.compile(r'[eE]xception \((\d+)\):')
STACKTRACE_ESP8266_PC_RE = re.compile(r'epc1=0x(4[0-9a-fA-F]{7})') STACKTRACE_ESP8266_PC_RE = re.compile(r'epc1=0x(4[0-9a-fA-F]{7})')
STACKTRACE_ESP8266_EXCVADDR_RE = re.compile(r'excvaddr=0x(4[0-9a-fA-F]{7})') STACKTRACE_ESP8266_EXCVADDR_RE = re.compile(r'excvaddr=0x(4[0-9a-fA-F]{7})')
STACKTRACE_ESP32_PC_RE = re.compile(r'PC\s*:\s*(?:0x)?(4[0-9a-fA-F]{7})') STACKTRACE_ESP32_PC_RE = re.compile(r'PC\s*:\s*(?:0x)?(4[0-9a-fA-F]{7})')