(regno, pc int)
| 175 | } |
| 176 | |
| 177 | func (fn *LFunction) LocalName(regno, pc int) (string, bool) { |
| 178 | if fn.IsG { |
| 179 | return "", false |
| 180 | } |
| 181 | p := fn.Proto |
| 182 | for i := 0; i < len(p.DbgLocals) && p.DbgLocals[i].StartPc < pc; i++ { |
| 183 | if pc < p.DbgLocals[i].EndPc { |
| 184 | regno-- |
| 185 | if regno == 0 { |
| 186 | return p.DbgLocals[i].Name, true |
| 187 | } |
| 188 | } |
| 189 | } |
| 190 | return "", false |
| 191 | } |
| 192 | |
| 193 | /* }}} */ |