After non pcln fields were added to it in a previous commit.
Change-Id: Icf92c0774d157c61399a6fc2a3c4d2cd47a634d2
Reviewed-on: https://go-review.googlesource.com/21921
Run-TryBot: Shahar Kohanim <skohanim@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: David Crawshaw <crawshaw@golang.org>
if Debug['v'] > 1 {
fmt.Fprintf(d.ctxt.Bso, "marktext %s\n", s.Name)
}
- if s.Pcln != nil {
- for _, a := range s.Pcln.Autom {
+ if s.FuncInfo != nil {
+ for _, a := range s.FuncInfo.Autom {
d.mark(a.Gotype, s)
}
}
d.markableMethods = append(d.markableMethods, methods...)
}
- if s.Pcln != nil {
- for i := range s.Pcln.Funcdata {
- d.mark(s.Pcln.Funcdata[i], s)
+ if s.FuncInfo != nil {
+ for i := range s.FuncInfo.Funcdata {
+ d.mark(s.FuncInfo.Funcdata[i], s)
}
}
d.mark(s.Gotype, s)
return
}
- for i := range s.Pcln.File {
- f := s.Pcln.File[i]
+ for i := range s.FuncInfo.File {
+ f := s.FuncInfo.File[i]
if i := strings.Index(f.Name, "runtime/runtime.go"); i >= 0 {
gdbscript = f.Name[:i] + "runtime/runtime-gdb.py"
break
newattr(dwfunc, DW_AT_external, DW_CLS_FLAG, 1, 0)
}
- if s.Pcln == nil {
+ if s.FuncInfo == nil {
continue
}
finddebugruntimepath(s)
- pciterinit(Ctxt, &pcfile, &s.Pcln.Pcfile)
- pciterinit(Ctxt, &pcline, &s.Pcln.Pcline)
+ pciterinit(Ctxt, &pcfile, &s.FuncInfo.Pcfile)
+ pciterinit(Ctxt, &pcline, &s.FuncInfo.Pcline)
epc = pc
for pcfile.done == 0 && pcline.done == 0 {
if epc-s.Value >= int64(pcfile.nextpc) {
dt, da int
offs int64
)
- for _, a := range s.Pcln.Autom {
+ for _, a := range s.FuncInfo.Autom {
switch a.Name {
case obj.A_AUTO:
dt = DW_ABRV_AUTO
var pcsp Pciter
for Ctxt.Cursym = Ctxt.Textp; Ctxt.Cursym != nil; Ctxt.Cursym = Ctxt.Cursym.Next {
s := Ctxt.Cursym
- if s.Pcln == nil {
+ if s.FuncInfo == nil {
continue
}
// Emit a FDE, Section 6.4.1.
// First build the section contents into a byte buffer.
deltaBuf = deltaBuf[:0]
- for pciterinit(Ctxt, &pcsp, &s.Pcln.Pcsp); pcsp.done == 0; pciternext(&pcsp) {
+ for pciterinit(Ctxt, &pcsp, &s.FuncInfo.Pcsp); pcsp.done == 0; pciternext(&pcsp) {
nextpc := pcsp.nextpc
// pciterinit goes up to the end of the function,
return -1
}
- if s.Attr.External() || s.Pcln == nil {
+ if s.Attr.External() || s.FuncInfo == nil {
// external function.
// should never be called directly.
// only diagnose the direct caller.
}
// Raise limit to allow frame.
locals := int32(0)
- if s.Pcln != nil {
- locals = s.Pcln.Locals
+ if s.FuncInfo != nil {
+ locals = s.FuncInfo.Locals
}
limit = int(obj.StackLimit+locals) + int(Ctxt.FixedFrameSize())
}
var ch1 Chain
var pcsp Pciter
var r *Reloc
- for pciterinit(Ctxt, &pcsp, &s.Pcln.Pcsp); pcsp.done == 0; pciternext(&pcsp) {
+ for pciterinit(Ctxt, &pcsp, &s.FuncInfo.Pcsp); pcsp.done == 0; pciternext(&pcsp) {
// pcsp.value is in effect for [pcsp.pc, pcsp.nextpc).
// Check stack size in effect for this span.
put(s, s.Name, 'T', s.Value, s.Size, int(s.Version), s.Gotype)
locals := int32(0)
- if s.Pcln != nil {
- locals = s.Pcln.Locals
+ if s.FuncInfo != nil {
+ locals = s.FuncInfo.Locals
}
// NOTE(ality): acid can't produce a stack trace without .frame symbols
put(nil, ".frame", 'm', int64(locals)+int64(SysArch.PtrSize), 0, 0, nil)
- if s.Pcln == nil {
+ if s.FuncInfo == nil {
continue
}
- for _, a := range s.Pcln.Autom {
+ for _, a := range s.FuncInfo.Autom {
// Emit a or p according to actual offset, even if label is wrong.
// This avoids negative offsets, which cannot be encoded.
if a.Name != obj.A_AUTO && a.Name != obj.A_PARAM {
Dynimplib string
Dynimpvers string
Sect *Section
- Pcln *Pcln
+ FuncInfo *FuncInfo
P []byte
R []Reloc
}
hash []byte
}
-type Pcln struct {
+type FuncInfo struct {
Args int32
Locals int32
Autom []Auto
}
if s.Type == obj.STEXT {
- s.Pcln = new(Pcln)
- pc := s.Pcln
+ s.FuncInfo = new(FuncInfo)
+ pc := s.FuncInfo
pc.Args = r.readInt32()
pc.Locals = r.readInt32()
// pclntab initializes the pclntab symbol with
// runtime function and file name information.
-var pclntab_zpcln Pcln
+var pclntab_zpcln FuncInfo
// These variables are used to initialize runtime.firstmoduledata, see symtab.go:symtab.
var pclntabNfunc int32
var i int32
var it Pciter
var off int32
- var pcln *Pcln
+ var pcln *FuncInfo
for Ctxt.Cursym = Ctxt.Textp; Ctxt.Cursym != nil; Ctxt.Cursym = Ctxt.Cursym.Next {
last = Ctxt.Cursym
if container(Ctxt.Cursym) != 0 {
continue
}
- pcln = Ctxt.Cursym.Pcln
+ pcln = Ctxt.Cursym.FuncInfo
if pcln == nil {
pcln = &pclntab_zpcln
}
// args int32
// TODO: Move into funcinfo.
args := uint32(0)
- if Ctxt.Cursym.Pcln != nil {
- args = uint32(Ctxt.Cursym.Pcln.Args)
+ if Ctxt.Cursym.FuncInfo != nil {
+ args = uint32(Ctxt.Cursym.FuncInfo.Args)
}
off = int32(setuint32(Ctxt, ftab, int64(off), args))