lldb: fix struct vars debugging
This commit is contained in:
33
ssa/decl.go
33
ssa/decl.go
@@ -17,7 +17,6 @@
|
||||
package ssa
|
||||
|
||||
import (
|
||||
"go/token"
|
||||
"go/types"
|
||||
"log"
|
||||
"strconv"
|
||||
@@ -327,36 +326,4 @@ func (p Function) SetRecover(blk BasicBlock) {
|
||||
p.recov = blk
|
||||
}
|
||||
|
||||
func (p Function) scopeMeta(b diBuilder, pos token.Position) DIScopeMeta {
|
||||
if p.diFunc == nil {
|
||||
sig := p.Type.raw.Type.(*types.Signature)
|
||||
rt := p.Prog.Type(sig.Results(), InGo)
|
||||
paramTypes := make([]llvm.Metadata, len(p.params)+1)
|
||||
paramTypes[0] = b.diType(rt, pos).ll
|
||||
for i, t := range p.params {
|
||||
paramTypes[i+1] = b.diType(t, pos).ll
|
||||
}
|
||||
diFuncType := b.di.CreateSubroutineType(llvm.DISubroutineType{
|
||||
File: b.file(pos.Filename).ll,
|
||||
Parameters: paramTypes,
|
||||
})
|
||||
p.diFunc = &aDIFunction{
|
||||
b.di.CreateFunction(
|
||||
b.file(pos.Filename).ll,
|
||||
llvm.DIFunction{
|
||||
Type: diFuncType,
|
||||
Name: p.Name(),
|
||||
LinkageName: p.Name(),
|
||||
File: b.file(pos.Filename).ll,
|
||||
Line: pos.Line,
|
||||
IsDefinition: true,
|
||||
Optimized: false,
|
||||
},
|
||||
),
|
||||
}
|
||||
p.impl.SetSubprogram(p.diFunc.ll)
|
||||
}
|
||||
return &aDIScopeMeta{p.diFunc.ll}
|
||||
}
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user