mirror of
https://github.com/go-delve/delve.git
synced 2025-10-27 20:23:41 +08:00
proc: use DW_AT_trampoline to detect auto-generated code (#3528)
Use the trampoline attribute to detect auto-generated code. This fixes a bug where stepping into a method of a generic type called through an interface will take the debugger into an auto-generated wrapper that does not have a dictionary and using next will step out of the wrapper. Fixes a bug reported on the #delve channel of the gophers slack server.
This commit is contained in:
committed by
GitHub
parent
04bb7fda33
commit
788df884e6
@ -1191,7 +1191,7 @@ func extractVarInfoFromEntry(tgt *Target, bi *BinaryInfo, image *Image, regs op.
|
||||
t, err = resolveParametricType(bi, mem, t, dictAddr)
|
||||
if err != nil {
|
||||
// Log the error, keep going with t, which will be the shape type
|
||||
logflags.DebuggerLogger().Errorf("could not resolve parametric type of %s", n)
|
||||
logflags.DebuggerLogger().Errorf("could not resolve parametric type of %s: %v", n, err)
|
||||
}
|
||||
|
||||
addr, pieces, descr, err := bi.Location(entry, dwarf.AttrLocation, regs.PC(), regs, mem)
|
||||
|
||||
Reference in New Issue
Block a user