
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.
10 строки
172 Б
Go
10 строки
172 Б
Go
//go:build !(avr || tinygo.wasm)
|
|
|
|
package runtime
|
|
|
|
import "unsafe"
|
|
|
|
const hasReturnAddr = true
|
|
|
|
//export llvm.returnaddress
|
|
func returnAddress(level uint32) unsafe.Pointer
|