print call stack on all low-level errors
This commit is contained in:
parent
2d4fb39dac
commit
0e9503d739
|
@ -220,9 +220,7 @@ $_append-4:end:
|
||||||
$_append-4:abort:
|
$_append-4:abort:
|
||||||
(draw-text-wrapping-right-then-down-from-cursor-over-full-screen 0 "_append-4: stream full at " 3 0) # 3=cyan
|
(draw-text-wrapping-right-then-down-from-cursor-over-full-screen 0 "_append-4: stream full at " 3 0) # 3=cyan
|
||||||
(draw-int32-hex-wrapping-right-then-down-from-cursor-over-full-screen 0 %eax 3 0)
|
(draw-int32-hex-wrapping-right-then-down-from-cursor-over-full-screen 0 %eax 3 0)
|
||||||
{
|
(abort "")
|
||||||
eb/jump loop/disp8
|
|
||||||
}
|
|
||||||
# never gets here
|
# never gets here
|
||||||
|
|
||||||
# . . vim:nowrap:textwidth=0
|
# . . vim:nowrap:textwidth=0
|
||||||
|
|
|
@ -39,10 +39,7 @@ $read-byte:end:
|
||||||
c3/return
|
c3/return
|
||||||
|
|
||||||
$read-byte:abort:
|
$read-byte:abort:
|
||||||
(draw-text-wrapping-right-then-down-from-cursor-over-full-screen 0 "read-byte: empty stream" 3 0) # 3=cyan
|
(abort "read-byte: empty stream")
|
||||||
{
|
|
||||||
eb/jump loop/disp8
|
|
||||||
}
|
|
||||||
# never gets here
|
# never gets here
|
||||||
|
|
||||||
== data
|
== data
|
||||||
|
|
|
@ -43,10 +43,7 @@ $append-byte:end:
|
||||||
c3/return
|
c3/return
|
||||||
|
|
||||||
$append-byte:abort:
|
$append-byte:abort:
|
||||||
(draw-text-wrapping-right-then-down-from-cursor-over-full-screen 0 "append-byte: out of space\n" 3 0) # 3=cyan
|
(abort "append-byte: out of space")
|
||||||
{
|
|
||||||
eb/jump loop/disp8
|
|
||||||
}
|
|
||||||
# never gets here
|
# never gets here
|
||||||
|
|
||||||
test-append-byte-single:
|
test-append-byte-single:
|
||||||
|
|
|
@ -888,10 +888,7 @@ $from-hex-char:letter:
|
||||||
c3/return
|
c3/return
|
||||||
|
|
||||||
$from-hex-char:abort:
|
$from-hex-char:abort:
|
||||||
(draw-text-wrapping-right-then-down-from-cursor-over-full-screen 0 "invalid hex char" 3 0) # 3=cyan
|
(abort "invalid hex char")
|
||||||
{
|
|
||||||
eb/jump loop/disp8
|
|
||||||
}
|
|
||||||
# never gets here
|
# never gets here
|
||||||
|
|
||||||
# . . vim:nowrap:textwidth=0
|
# . . vim:nowrap:textwidth=0
|
||||||
|
|
|
@ -130,10 +130,7 @@ $allocate-raw:end:
|
||||||
c3/return
|
c3/return
|
||||||
|
|
||||||
$allocate-raw:abort:
|
$allocate-raw:abort:
|
||||||
(draw-text-wrapping-right-then-down-from-cursor-over-full-screen 0 "allocate: failed" 3 0) # 3=cyan
|
(abort "allocate: failed")
|
||||||
{
|
|
||||||
eb/jump loop/disp8
|
|
||||||
}
|
|
||||||
# never gets here
|
# never gets here
|
||||||
|
|
||||||
test-allocate-raw-success:
|
test-allocate-raw-success:
|
||||||
|
@ -282,10 +279,7 @@ $lookup:abort:
|
||||||
(draw-text-wrapping-right-then-down-from-cursor-over-full-screen 0 " " 2 0)
|
(draw-text-wrapping-right-then-down-from-cursor-over-full-screen 0 " " 2 0)
|
||||||
40/increment-eax
|
40/increment-eax
|
||||||
(draw-int32-hex-wrapping-right-then-down-from-cursor-over-full-screen 0 *eax 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 " " 2 0)
|
(abort "\n")
|
||||||
{
|
|
||||||
eb/jump loop/disp8
|
|
||||||
}
|
|
||||||
# never gets here
|
# never gets here
|
||||||
|
|
||||||
test-lookup-success:
|
test-lookup-success:
|
||||||
|
@ -554,10 +548,7 @@ allocate-region: # ad: (addr allocation-descriptor), n: int, out: (addr handle
|
||||||
# we bloat a potentially cold segment in RAM so we can abort with a single
|
# we bloat a potentially cold segment in RAM so we can abort with a single
|
||||||
# instruction.
|
# instruction.
|
||||||
$allocate-region:abort:
|
$allocate-region:abort:
|
||||||
(draw-text-wrapping-right-then-down-from-cursor-over-full-screen 0 "allocate-region: failed to allocate" 3 0) # 3=cyan
|
(abort "allocate-region: failed to allocate")
|
||||||
{
|
|
||||||
eb/jump loop/disp8
|
|
||||||
}
|
|
||||||
# never gets here
|
# never gets here
|
||||||
|
|
||||||
# Claim the next 'n+4' bytes of memory and initialize the first 4 to n.
|
# Claim the next 'n+4' bytes of memory and initialize the first 4 to n.
|
||||||
|
|
|
@ -58,10 +58,7 @@ $new-stream:end:
|
||||||
c3/return
|
c3/return
|
||||||
|
|
||||||
$new-stream:abort:
|
$new-stream:abort:
|
||||||
(draw-text-wrapping-right-then-down-from-cursor-over-full-screen 0 "new-stream: size too large" 3 0) # 3=cyan
|
(abort "new-stream: size too large")
|
||||||
{
|
|
||||||
eb/jump loop/disp8
|
|
||||||
}
|
|
||||||
# never gets here
|
# never gets here
|
||||||
|
|
||||||
test-new-stream:
|
test-new-stream:
|
||||||
|
|
|
@ -848,10 +848,7 @@ $write-slice:end:
|
||||||
c3/return
|
c3/return
|
||||||
|
|
||||||
$write-slice:abort:
|
$write-slice:abort:
|
||||||
(draw-text-wrapping-right-then-down-from-cursor-over-full-screen 0 "write-slice: out of space" 3 0) # 3=cyan
|
(abort "write-slice: out of space")
|
||||||
{
|
|
||||||
eb/jump loop/disp8
|
|
||||||
}
|
|
||||||
# never gets here
|
# never gets here
|
||||||
|
|
||||||
test-write-slice:
|
test-write-slice:
|
||||||
|
@ -970,10 +967,7 @@ $slice-to-string:end:
|
||||||
c3/return
|
c3/return
|
||||||
|
|
||||||
$slice-to-string:abort:
|
$slice-to-string:abort:
|
||||||
(draw-text-wrapping-right-then-down-from-cursor-over-full-screen 0 "slice-to-string: out of space\n" 3 0) # 3=cyan
|
(abort "slice-to-string: out of space")
|
||||||
{
|
|
||||||
eb/jump loop/disp8
|
|
||||||
}
|
|
||||||
# never gets here
|
# never gets here
|
||||||
|
|
||||||
test-slice-to-string:
|
test-slice-to-string:
|
||||||
|
|
|
@ -114,10 +114,7 @@ $write-int32-decimal:end:
|
||||||
c3/return
|
c3/return
|
||||||
|
|
||||||
$write-int32-decimal:abort:
|
$write-int32-decimal:abort:
|
||||||
(draw-text-wrapping-right-then-down-from-cursor-over-full-screen 0 "write-int32-decimal: stream out of space" 3 0) # 3=cyan
|
(abort "write-int32-decimal: stream out of space")
|
||||||
{
|
|
||||||
eb/jump loop/disp8
|
|
||||||
}
|
|
||||||
# never gets here
|
# never gets here
|
||||||
|
|
||||||
test-write-int32-decimal:
|
test-write-int32-decimal:
|
||||||
|
@ -419,10 +416,7 @@ $to-decimal-digit:end:
|
||||||
c3/return
|
c3/return
|
||||||
|
|
||||||
$to-decimal-digit:abort:
|
$to-decimal-digit:abort:
|
||||||
(draw-text-wrapping-right-then-down-from-cursor-over-full-screen 0 "to-decimal-digit: not a digit character" 3 0) # 3=cyan
|
(abort "to-decimal-digit: not a digit character")
|
||||||
{
|
|
||||||
eb/jump loop/disp8
|
|
||||||
}
|
|
||||||
# never gets here
|
# never gets here
|
||||||
|
|
||||||
# . . vim:nowrap:textwidth=0
|
# . . vim:nowrap:textwidth=0
|
||||||
|
|
|
@ -98,10 +98,7 @@ $write-to-stream:end:
|
||||||
c3/return
|
c3/return
|
||||||
|
|
||||||
$write-to-stream:abort:
|
$write-to-stream:abort:
|
||||||
(draw-text-wrapping-right-then-down-from-cursor-over-full-screen 0 "write-to-stream: stream full" 3 0) # 3=cyan
|
(abort "write-to-stream: stream full")
|
||||||
{
|
|
||||||
eb/jump loop/disp8
|
|
||||||
}
|
|
||||||
# never gets here
|
# never gets here
|
||||||
|
|
||||||
read-from-stream: # s: (addr stream _), out: (addr byte), n: int
|
read-from-stream: # s: (addr stream _), out: (addr byte), n: int
|
||||||
|
@ -151,10 +148,7 @@ $read-from-stream:end:
|
||||||
c3/return
|
c3/return
|
||||||
|
|
||||||
$read-from-stream:abort:
|
$read-from-stream:abort:
|
||||||
(draw-text-wrapping-right-then-down-from-cursor-over-full-screen 0 "read-from-stream: stream empty" 3 0) # 3=cyan
|
(abort "read-from-stream: stream empty")
|
||||||
{
|
|
||||||
eb/jump loop/disp8
|
|
||||||
}
|
|
||||||
# never gets here
|
# never gets here
|
||||||
|
|
||||||
stream-first: # s: (addr stream byte) -> result/eax: byte
|
stream-first: # s: (addr stream byte) -> result/eax: byte
|
||||||
|
|
Loading…
Reference in New Issue