I’m encountering a panic issue with runtime.assertE2I in my program. Since
I can’t reproduce it consistently, I want to debug this function to
understand its purpose and find the cause of the panic.
Here’s the relevant stack trace:
log.msgpanic({0x6281f60, 0xc099c50810}) /usr/local/go/src/runtime/panic.go:987
+0x3ba fp=0xc04e9bab20 sp=0xc04e9baa60 pc=0x43b91a runtime.assertE2I(0x62fa080,
0x12?) /usr/local/go/src/runtime/iface.go:451 +0x6d fp=0xc04e9bab48
sp=0xc04e9bab20 pc=0x40d5ed
I’m having trouble setting a breakpoint on runtime.assertE2I using Delve.
Does anyone know how I can achieve this?
*Additional Description:* When I tried to reproduce the issue with the
following code:
type MyInterface interface {
`Method()`
}
type MyStruct struct{}
func main() {
`var i interface{} = MyStruct{}`
`_ = i.(MyInterface)`
}
I found that the panic occurs in runtime.typeAssert instead of
runtime.assertE2I. I’m not sure why this happens.
--
You received this message because you are subscribed to the Google Groups
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/golang-nuts/dc810cfc-c85b-422e-8ae6-7882ee0d9402n%40googlegroups.com.