Skip to content

Commit

Permalink
a little bit more information when lookup fails
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
akkartik committed May 7, 2021
1 parent d3f1762 commit 540fd66
Showing 1 changed file with 31 additions and 1 deletion.
32 changes: 31 additions & 1 deletion 120allocate.subx
Expand Up @@ -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
}
Expand Down

0 comments on commit 540fd66

Please sign in to comment.