From 540fd664738dfb45d4373497c4a316828e9b1a33 Mon Sep 17 00:00:00 2001 From: "Kartik K. Agaram" Date: Fri, 7 May 2021 15:21:48 -0700 Subject: a little bit more information when lookup fails Basically this should never, ever happen until I start reclaiming heap memory. I believe the only reason it happens is unprotected writes to address 0 or thereabouts. --- 120allocate.subx | 32 +++++++++++++++++++++++++++++++- 1 file changed, 31 insertions(+), 1 deletion(-) diff --git a/120allocate.subx b/120allocate.subx index fd5b5490..75712711 100644 --- a/120allocate.subx +++ b/120allocate.subx @@ -252,7 +252,37 @@ $lookup:end: c3/return $lookup:abort: - (draw-text-wrapping-right-then-down-from-cursor-over-full-screen 0 "lookup: failed" 3 0) # 3=cyan + (draw-text-wrapping-right-then-down-from-cursor-over-full-screen 0 "lookup failed: (" 3 0) # 3=cyan + (draw-int32-hex-wrapping-right-then-down-from-cursor-over-full-screen 0 *(ebp+8) 3 0) + (draw-text-wrapping-right-then-down-from-cursor-over-full-screen 0 ", " 3 0) + (draw-int32-hex-wrapping-right-then-down-from-cursor-over-full-screen 0 *(ebp+0xc) 3 0) + (draw-text-wrapping-right-then-down-from-cursor-over-full-screen 0 ") -> " 3 0) + (draw-int32-hex-wrapping-right-then-down-from-cursor-over-full-screen 0 *eax 3 0) + (draw-text-wrapping-right-then-down-from-cursor-over-full-screen 0 ". Contents of a few words starting from address 0: " 3 0) + b8/copy-to-eax 0/imm32 + (draw-int32-hex-wrapping-right-then-down-from-cursor-over-full-screen 0 *eax 2 0) + (draw-text-wrapping-right-then-down-from-cursor-over-full-screen 0 " " 2 0) + 40/increment-eax + (draw-int32-hex-wrapping-right-then-down-from-cursor-over-full-screen 0 *eax 3 0) + (draw-text-wrapping-right-then-down-from-cursor-over-full-screen 0 " " 2 0) + 40/increment-eax + (draw-int32-hex-wrapping-right-then-down-from-cursor-over-full-screen 0 *eax 3 0) + (draw-text-wrapping-right-then-down-from-cursor-over-full-screen 0 " " 2 0) + 40/increment-eax + (draw-int32-hex-wrapping-right-then-down-from-cursor-over-full-screen 0 *eax 3 0) + (draw-text-wrapping-right-then-down-from-cursor-over-full-screen 0 " " 2 0) + 40/increment-eax + (draw-int32-hex-wrapping-right-then-down-from-cursor-over-full-screen 0 *eax 3 0) + (draw-text-wrapping-right-then-down-from-cursor-over-full-screen 0 " " 2 0) + 40/increment-eax + (draw-int32-hex-wrapping-right-then-down-from-cursor-over-full-screen 0 *eax 3 0) + (draw-text-wrapping-right-then-down-from-cursor-over-full-screen 0 " " 2 0) + 40/increment-eax + (draw-int32-hex-wrapping-right-then-down-from-cursor-over-full-screen 0 *eax 3 0) + (draw-text-wrapping-right-then-down-from-cursor-over-full-screen 0 " " 2 0) + 40/increment-eax + (draw-int32-hex-wrapping-right-then-down-from-cursor-over-full-screen 0 *eax 3 0) + (draw-text-wrapping-right-then-down-from-cursor-over-full-screen 0 " " 2 0) { eb/jump loop/disp8 } -- cgit 1.4.1-2-gfad0