proc: support stepping through range-over-func statements with inlining (#3755)

Extends support for stepping through range-over-func statement to
programs compiled with inlining enabled.

Updates #3733
This commit is contained in:
Alessandro Arzilli
2024-07-01 20:22:59 +02:00
committed by GitHub
parent faac701e9f
commit 608eaa3d7c
5 changed files with 616 additions and 39 deletions

View File

@ -49,6 +49,8 @@ type Stackframe struct {
SystemStack bool
// Inlined is true if this frame is actually an inlined call.
Inlined bool
// hasInlines is true if this frame is a concrete function that is executing inlined calls (i.e. if there is at least one inlined call frame on top of this one).
hasInlines bool
// Bottom is true if this is the bottom of the stack
Bottom bool
@ -403,6 +405,7 @@ func (it *stackIterator) appendInlineCalls(callback func(Stackframe) bool, frame
}
for _, entry := range reader.InlineStack(dwarfTree, callpc) {
frame.hasInlines = true
fnname, okname := entry.Val(dwarf.AttrName).(string)
fileidx, okfileidx := entry.Val(dwarf.AttrCallFile).(int64)
line, okline := entry.Val(dwarf.AttrCallLine).(int64)