runtime: print the address where a panic happened

This is not very useful in itself, but makes it possible to detect this
address in the output. See the next commit.

This adds around 50 bytes to each binary (except for AVR and wasm). This
is unfortunate, but I think this feature is quite useful still.
A future enhancement might be to create a build tag for extended panic
information that's not set by default.
This commit is contained in:
Ayke van Laethem
2023-04-25 01:22:55 +02:00
committed by Ron Evans
parent 59838338ba
commit 3392827c3e
14 changed files with 67 additions and 16 deletions
+2
View File
@@ -13,6 +13,8 @@ const TargetBits = 32
const deferExtraRegs = 0
const callInstSize = 1 // unknown and irrelevant (llvm.returnaddress doesn't work), so make something up
//go:extern __heap_base
var heapStartSymbol [0]byte