diff --git a/Resources/Germany/Messages b/Resources/Germany/Messages index adc7ac1a1b426af24f14eba6e8be6a4ae4413136..3143cae0fc5504a28c8b5901cea17620bc58aa86 100644 Binary files a/Resources/Germany/Messages and b/Resources/Germany/Messages differ diff --git a/Resources/UK/Messages b/Resources/UK/Messages index 88d9d18abeb0280dafd2f95c20a1811ddacc9be6..9de0e9756ad1653289a7b59939f42a33fac7f47e 100644 Binary files a/Resources/UK/Messages and b/Resources/UK/Messages differ diff --git a/VersionASM b/VersionASM index a6cce42190aee32514d26b08aa1d813df87ed2ee..119298b0b856a012460605e80c64876aca31160f 100644 --- a/VersionASM +++ b/VersionASM @@ -11,13 +11,13 @@ GBLS Module_HelpVersion GBLS Module_ComponentName GBLS Module_ComponentPath -Module_MajorVersion SETS "2.00" -Module_Version SETA 200 +Module_MajorVersion SETS "2.01" +Module_Version SETA 201 Module_MinorVersion SETS "" -Module_Date SETS "15 Aug 2017" -Module_ApplicationDate SETS "15-Aug-17" +Module_Date SETS "21 Feb 2018" +Module_ApplicationDate SETS "21-Feb-18" Module_ComponentName SETS "Debugger" Module_ComponentPath SETS "castle/RiscOS/Sources/Programmer/Debugger" -Module_FullVersion SETS "2.00" -Module_HelpVersion SETS "2.00 (15 Aug 2017)" +Module_FullVersion SETS "2.01" +Module_HelpVersion SETS "2.01 (21 Feb 2018)" END diff --git a/VersionNum b/VersionNum index f6d47f53e59bf36b5ad4e2b66c7fe225b09ac927..e16ec4b95d3711032a7ea9b6e34df0519898ca61 100644 --- a/VersionNum +++ b/VersionNum @@ -1,23 +1,23 @@ -/* (2.00) +/* (2.01) * * This file is automatically maintained by srccommit, do not edit manually. * Last processed by srccommit version: 1.1. * */ -#define Module_MajorVersion_CMHG 2.00 +#define Module_MajorVersion_CMHG 2.01 #define Module_MinorVersion_CMHG -#define Module_Date_CMHG 15 Aug 2017 +#define Module_Date_CMHG 21 Feb 2018 -#define Module_MajorVersion "2.00" -#define Module_Version 200 +#define Module_MajorVersion "2.01" +#define Module_Version 201 #define Module_MinorVersion "" -#define Module_Date "15 Aug 2017" +#define Module_Date "21 Feb 2018" -#define Module_ApplicationDate "15-Aug-17" +#define Module_ApplicationDate "21-Feb-18" #define Module_ComponentName "Debugger" #define Module_ComponentPath "castle/RiscOS/Sources/Programmer/Debugger" -#define Module_FullVersion "2.00" -#define Module_HelpVersion "2.00 (15 Aug 2017)" -#define Module_LibraryVersionInfo "2:0" +#define Module_FullVersion "2.01" +#define Module_HelpVersion "2.01 (21 Feb 2018)" +#define Module_LibraryVersionInfo "2:1" diff --git a/c/exc b/c/exc index a1c868c9509dc8a882d91e14aecad87b08356b90..b42a867e84826444f2a28977618eea5aaf7bd80c 100644 --- a/c/exc +++ b/c/exc @@ -632,10 +632,12 @@ void ExcDescribeAddr(exc_context_t *ctx, uint32_t addr, char *buf, size_t len) } #endif +#if 0 static bool ExcLooksLikePSR(uint32_t val) { return ((val & 0x0ffff010) == 0x10); } +#endif static bool ExcLooksLikeSWINum(uint32_t val) { @@ -945,9 +947,10 @@ static bool DescribeBlocks(exc_context_t *ctx) ctx->print(ctx->print_param,"\n"); break; case ExcDump_Chunk_OSMem16: - for(int i=0;i<((blocklen-12)/4);i+=3) + for(int i=0;(i*12)<(blocklen-12);i++) { - snprintf(temp,sizeof(temp),ExcGetMsg(ctx,EXC_MSG_BLOCK_OSMEM16), pos[2]+i, pos[i+3], pos[i+4], pos[i+5]); + int j=i*3; + snprintf(temp,sizeof(temp),ExcGetMsg(ctx,EXC_MSG_BLOCK_OSMEM16), pos[2]+i, pos[j+3], pos[j+4], pos[j+5]); ctx->print(ctx->print_param,temp); } break; @@ -1010,15 +1013,51 @@ static bool AnnotateReg(exc_context_t *ctx, uint32_t regno) static void AnnotateAll(exc_context_t *ctx) { AnnotateReg(ctx, ExcDump_Reg_R15); - excresult r13 = ExcPeekReg(ctx, ExcDump_Reg_R13_irq); + + eprocmode mode = (eprocmode) (ExcPeekReg(ctx, ExcDump_Reg_CPSR).val & 0x1f); + excresult r13; uint32_t mem16[3]; - bool mem16_ok = ExcPeekOSMem16(ctx, 2, mem16); - uint32_t low = mem16[0]; - uint32_t high = mem16[0] + mem16[2]; + bool mem16_ok; + uint32_t low,high; + bool nl = true; + + /* The kernel doesn't tell us the original ABT/UND SP/R14, except for the case where the abort came from ABT/UND mode itself. So only attempt an ABT/UND stack dump if the abort came from that mode (otherwise we'll just be confusing the user by showing whatever junk the kernel has on the stack) */ + if ((mode == ABT32) || (mode == UND32)) + { + r13 = ExcPeekReg(ctx, ExcDump_Reg_R13); + mem16_ok = ExcPeekOSMem16(ctx, (mode == ABT32 ? 4 : 5), mem16); + low = mem16[0]; + high = mem16[0] + mem16[2]; + if (r13.ok && mem16_ok && (r13.val < high)) + { + /* R14 may be &DEADDEAD if the CPU corrupted it in the process of raising the exception */ + excresult r14 = ExcPeekReg(ctx, ExcDump_Reg_R14); + if ((r14.ok && (r14.val != 0xDEADDEAD) && AnnotateReg(ctx, ExcDump_Reg_R14)) || nl) + { + nl = false; + ctx->print(ctx->print_param, "\n"); + } + if (r13.val < low) + { + r13.val = low; + } + ctx->print(ctx->print_param, ExcGetMsg(ctx, (mode == ABT32 ? EXC_MSG_ABT_STACK : EXC_MSG_UND_STACK))); + Annotate(ctx,r13.val,high,mode,0); + DumpAnnotations(ctx, r13.val, high-4); + ClearAnnotations(ctx); + ctx->print(ctx->print_param,"\n"); + } + } + + r13 = ExcPeekReg(ctx, ExcDump_Reg_R13_irq); + mem16_ok = ExcPeekOSMem16(ctx, 2, mem16); + low = mem16[0]; + high = mem16[0] + mem16[2]; if (r13.ok && mem16_ok && (r13.val < high)) { - if (AnnotateReg(ctx, ExcDump_Reg_R14_irq)) + if (AnnotateReg(ctx, ExcDump_Reg_R14_irq) || nl) { + nl = false; ctx->print(ctx->print_param, "\n"); } if (r13.val < low) @@ -1043,8 +1082,9 @@ static void AnnotateAll(exc_context_t *ctx) high = mem16[0] + mem16[2]; if (r13.ok && mem16_ok && (r13.val < high)) { - if (AnnotateReg(ctx, ExcDump_Reg_R14_svc)) + if (AnnotateReg(ctx, ExcDump_Reg_R14_svc) || nl) { + nl = false; ctx->print(ctx->print_param, "\n"); } if (r13.val < low) @@ -1061,8 +1101,9 @@ static void AnnotateAll(exc_context_t *ctx) r13 = ExcPeekReg(ctx, ExcDump_Reg_R13_usr); if (r13.ok) { - if (AnnotateReg(ctx, ExcDump_Reg_R14_usr)) + if (AnnotateReg(ctx, ExcDump_Reg_R14_usr) || nl) { + nl = false; ctx->print(ctx->print_param, "\n"); } high = r13.val + 1024; diff --git a/h/exc b/h/exc index e6d5b5847f1bf29b942efa75d40185e803538b2c..211389b7a6411a8353f4a60b01a98520387de50d 100644 --- a/h/exc +++ b/h/exc @@ -63,6 +63,8 @@ typedef enum { EXC_MSG_USR_STACK, EXC_MSG_END, EXC_MSG_CALLTO, + EXC_MSG_ABT_STACK, + EXC_MSG_UND_STACK, } exc_msg; /* This represents a single annotation block/column (e.g. decoded stack frame) */ diff --git a/s/ExceptionDump b/s/ExceptionDump index 89f18e3019b5b69074c283a8038a24efce5def89..874c392526963e15b6ff46e536f137f18f455190 100644 --- a/s/ExceptionDump +++ b/s/ExceptionDump @@ -253,7 +253,7 @@ ExcDump_Init ROUT ; We need space for the following: ; * Error block (256 + 8) ; * Register dump (ExcDump_Reg_Count*4 + 8) - ; * SVC, IRQ, ABT, UND stacks (??? + 12)*4 + ; * SVC, IRQ, ABT, UND stacks (???*4) ; * OS_Memory 16 items for the above (12 + 12*4) ; * IRQsema value (16) ; * IRQsema OS_RSI6 item (16) @@ -824,5 +824,7 @@ ExceptionMsgs = "X22", 0 ; EXC_MSG_USR_STACK = "X23", 0 ; EXC_MSG_END = "X24", 0 ; EXC_MSG_CALLTO + = "X25", 0 ; EXC_MSG_ABT_STACK + = "X26", 0 ; EXC_MSG_UND_STACK END