提交 3048b960 编写于 作者: A aarzilli 提交者: Derek Parker

proc: correctly extract name of functions that have been inlined

If a function can be inlined it will appear as two entries in
debug_info. A DW_TAG_subprogram entry with DW_AT_inlined = true (that
will be used as the abstract origin) and a second DW_TAG_subprogram
entry with an abstract origin.
To retrieve the name of this second entry we must load its abstract
origin.
上级 b8ed126b
......@@ -398,6 +398,13 @@ outer:
highpc = ranges[0][1] + bi.staticBase
}
name, ok2 := entry.Val(dwarf.AttrName).(string)
if !ok2 {
originOffset, hasAbstractOrigin := entry.Val(dwarf.AttrAbstractOrigin).(dwarf.Offset)
if hasAbstractOrigin {
name, ok2 = abstractOriginNameTable[originOffset]
}
}
var fn Function
if (ok1 == !inlined) && ok2 {
if inlined {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册