diff --git a/_scripts/rtype-out.txt b/_scripts/rtype-out.txt index 7783cf44..11ba3e83 100644 --- a/_scripts/rtype-out.txt +++ b/_scripts/rtype-out.txt @@ -45,14 +45,10 @@ type hmap struct { } type iface struct { - tab *itab + tab *itab|*internal/abi.ITab data unsafe.Pointer } -type itab struct { - _type *_type|*internal/abi.Type -} - type moduledata struct { text uintptr types uintptr diff --git a/_scripts/rtype.go b/_scripts/rtype.go index 5ba8b9c9..23072fb9 100644 --- a/_scripts/rtype.go +++ b/_scripts/rtype.go @@ -459,7 +459,9 @@ func addCheckVarType(V, T string, pos token.Pos) { } func addCheckFieldType(S, F, T string, opt bool, pos token.Pos) { - checkFieldTypeRules[S] = append(checkFieldTypeRules[S], &checkFieldType{S, F, T, opt, pos}) + if !strings.Contains(S, "|") { + checkFieldTypeRules[S] = append(checkFieldTypeRules[S], &checkFieldType{S, F, T, opt, pos}) + } } func addCheckConstVal(C string, V constant.Value, pos token.Pos) { @@ -547,7 +549,6 @@ func check() { allok := true for _, rule := range checkVarTypeRules { - //TODO: implement pos := fset.Position(rule.pos) def := lookupPackage(pkgmap, "runtime").Types.Scope().Lookup(rule.V) if def == nil { diff --git a/cmd/dlv/dlv_test.go b/cmd/dlv/dlv_test.go index c4e903ca..c684fe13 100644 --- a/cmd/dlv/dlv_test.go +++ b/cmd/dlv/dlv_test.go @@ -1303,6 +1303,9 @@ func TestVersion(t *testing.T) { } func TestStaticcheck(t *testing.T) { + if goversion.VersionAfterOrEqual(runtime.Version(), 1, 23) { + t.Skip("staticcheck does not support go1.23 yet") + } _, err := exec.LookPath("staticcheck") if err != nil { t.Skip("staticcheck not installed") diff --git a/pkg/proc/variables.go b/pkg/proc/variables.go index befd601e..854fe7ee 100644 --- a/pkg/proc/variables.go +++ b/pkg/proc/variables.go @@ -2272,7 +2272,7 @@ func (v *Variable) readInterface() (_type, data *Variable, isnil bool) { ityp := resolveTypedef(&v.RealType.(*godwarf.InterfaceType).TypedefType).(*godwarf.StructType) - // +rtype -field iface.tab *itab + // +rtype -field iface.tab *itab|*internal/abi.ITab // +rtype -field iface.data unsafe.Pointer // +rtype -field eface._type *_type|*internal/abi.Type // +rtype -field eface.data unsafe.Pointer @@ -2280,15 +2280,18 @@ func (v *Variable) readInterface() (_type, data *Variable, isnil bool) { for _, f := range ityp.Field { switch f.Name { case "tab": // for runtime.iface - tab, _ := v.toField(f) // +rtype *itab + tab, _ := v.toField(f) // +rtype *itab|*internal/abi.ITab tab = tab.maybeDereference() isnil = tab.Addr == 0 if !isnil { var err error - _type, err = tab.structMember("_type") // +rtype *_type|*internal/abi.Type + _type, err = tab.structMember("Type") // +rtype *internal/abi.Type if err != nil { - v.Unreadable = fmt.Errorf("invalid interface type: %v", err) - return + _type, err = tab.structMember("_type") // +rtype *_type|*internal/abi.Type + if err != nil { + v.Unreadable = fmt.Errorf("invalid interface type: %v", err) + return + } } } case "_type": // for runtime.eface diff --git a/pkg/terminal/command.go b/pkg/terminal/command.go index da6bc522..70999227 100644 --- a/pkg/terminal/command.go +++ b/pkg/terminal/command.go @@ -1164,6 +1164,13 @@ var waitReasonStrings = [...]string{ "GC worker (idle)", "preempted", "debug call", + "GC mark termination", + "stopping the world", + "flushing proc caches", + "trace goroutine status", + "trace proc status", + "page trace flush", + "coroutine", } func writeGoroutineLong(t *Term, w io.Writer, g *api.Goroutine, prefix string) {