Improve error reporting

extensions
Volodymyr Shymanskyy 3 years ago
parent 2c1a2af2c8
commit b6dbfa6234

@ -247,24 +247,20 @@ d_m3Decoder (BranchTable)
{ {
u32 slot = fetch (u32); u32 slot = fetch (u32);
sprintf (o_string, "slot: %" PRIu32 "; targets: ", slot); o_string += sprintf (o_string, "slot: %" PRIu32 "; targets: ", slot);
// IM3Function function = fetch2 (IM3Function); // IM3Function function = fetch2 (IM3Function);
i32 targets = fetch (i32); i32 targets = fetch (i32);
char str [1000];
for (i32 i = 0; i < targets; ++i) for (i32 i = 0; i < targets; ++i)
{ {
pc_t addr = fetch (pc_t); pc_t addr = fetch (pc_t);
sprintf (str, "%" PRIi32 "=%p, ", i, addr); o_string += sprintf (o_string, "%" PRIi32 "=%p, ", i, addr);
strcat (o_string, str);
} }
pc_t addr = fetch (pc_t); pc_t addr = fetch (pc_t);
sprintf (str, "def=%p ", addr); sprintf (o_string, "def=%p ", addr);
strcat (o_string, str);
} }
@ -312,7 +308,7 @@ void dump_code_page (IM3CodePage i_codePage, pc_t i_startPC)
if (i.info) if (i.info)
{ {
char infoString [1000] = { 0 }; char infoString [8*1024] = { 0 };
DecodeOperation (infoString, i.opcode, op, i.info, & pc); DecodeOperation (infoString, i.opcode, op, i.info, & pc);

@ -176,9 +176,9 @@ for cmd in commands:
stats.timeout += 1 stats.timeout += 1
fail("Timeout") fail("Timeout")
continue continue
except subprocess.CalledProcessError: except subprocess.CalledProcessError as e:
stats.crashed += 1 stats.crashed += 1
fail("Crashed") fail(f"Exited with error code {e.returncode}")
continue continue
if "expect_sha1" in cmd: if "expect_sha1" in cmd:

Loading…
Cancel
Save