From 371b575d2ed3a5a6ef2d76a2f5ae5680d94e8994 Mon Sep 17 00:00:00 2001 From: Lior Halphon Date: Fri, 24 Feb 2017 18:25:27 +0200 Subject: [PATCH] Added information to stack overflow detection in the automatic tester --- Tester/main.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Tester/main.c b/Tester/main.c index 11a3109a..f60ce025 100755 --- a/Tester/main.c +++ b/Tester/main.c @@ -88,7 +88,8 @@ static void vblank(GB_gameboy_t *gb) /* Detect common crashes and stop the test early */ if (frames < test_length - 1) { if (gb->backtrace_size >= 0x200 || (gb->registers[GB_REGISTER_SP] >= 0xfe00 && gb->registers[GB_REGISTER_SP] < 0xff80)) { - GB_log(gb, "A stack overflow has probably occurred.\n"); + GB_log(gb, "A stack overflow has probably occurred. (SP = $%04x; backtrace size = %d) \n", + gb->registers[GB_REGISTER_SP], gb->backtrace_size); frames = test_length - 1; } if (gb->halted && !gb->interrupt_enable) {