debug why runtime.Basic doesn't work

This commit is contained in:
xushiwei
2024-05-01 12:32:09 +08:00
parent 666808b427
commit 8ae97f73d0
7 changed files with 98 additions and 63 deletions

View File

@@ -30,8 +30,8 @@ func Alloc(size uintptr) unsafe.Pointer {
// TracePanic prints panic message.
func TracePanic(v Interface) {
c.Printf(c.Str("Panic(%p)\n"), v.tab._type)
kind := abi.Kind(v.tab._type.Kind_)
c.Printf(c.Str("Panic(%d)\n"), kind)
switch {
case kind == abi.String:
s := (*String)(v.data)