proc: fix runtime type handling for Go 1.21 (#3370)

Go 1.21 renamed runtime._type to internal/abi.Type and changed the name
of its fields. Update Delve so that it uses the new names for loading
interfaces and generic type parameters.
This commit is contained in:
Alessandro Arzilli
2023-05-15 19:21:52 +02:00
committed by GitHub
parent e95ae9c21b
commit 674bd63996
7 changed files with 59 additions and 31 deletions

View File

@ -4647,7 +4647,10 @@ func TestCgoStacktrace2(t *testing.T) {
// If a panic happens during cgo execution the stacktrace should show the C
// function that caused the problem.
withTestProcess("cgosigsegvstack", t, func(p *proc.Target, grp *proc.TargetGroup, fixture protest.Fixture) {
grp.Continue()
err := grp.Continue()
if _, exited := err.(proc.ErrProcessExited); exited {
t.Fatal("process exited")
}
frames, err := proc.ThreadStacktrace(p.CurrentThread(), 100)
assertNoError(err, t, "Stacktrace()")
logStacktrace(t, p, frames)
@ -5099,6 +5102,7 @@ func TestStepOutPreservesGoroutine(t *testing.T) {
candg := []*proc.G{}
bestg := []*proc.G{}
for _, g := range gs {
t.Logf("stacktracing goroutine %d (%v)\n", g.ID, g.CurrentLoc)
frames, err := g.Stacktrace(20, 0)
assertNoError(err, t, "Stacktrace")
for _, frame := range frames {