MCPcopy Create free account
hub / github.com/axmolengine/axmol / luaG_getfuncline

Function luaG_getfuncline

3rdparty/lua/plainlua/ldebug.c:86–98  ·  view source on GitHub ↗

** Get the line corresponding to instruction 'pc' in function 'f'; ** first gets a base line and from there does the increments until ** the desired instruction. */

Source from the content-addressed store, hash-verified

84** the desired instruction.
85*/
86int luaG_getfuncline (const Proto *f, int pc) {
87 if (f->lineinfo == NULL) /* no debug information? */
88 return -1;
89 else {
90 int basepc;
91 int baseline = getbaseline(f, pc, &basepc);
92 while (basepc++ < pc) { /* walk until given instruction */
93 lua_assert(f->lineinfo[basepc] != ABSLINEINFO);
94 baseline += f->lineinfo[basepc]; /* correct line */
95 }
96 return baseline;
97 }
98}
99
100
101static int getcurrentline (CallInfo *ci) {

Callers 6

luaV_executeFunction · 0.85
PrintCodeFunction · 0.85
getcurrentlineFunction · 0.85
nextlineFunction · 0.85
changedlineFunction · 0.85
luaG_traceexecFunction · 0.85

Calls 1

getbaselineFunction · 0.85

Tested by

no test coverage detected