MCPcopy Create free account
hub / github.com/DFHack/dfhack / PrintDebug

Function PrintDebug

depends/lua/src/luac.c:416–441  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

414}
415
416static void PrintDebug(const Proto* f)
417{
418 int i,n;
419 n=f->sizek;
420 printf("constants (%d) for %p:\n",n,VOID(f));
421 for (i=0; i<n; i++)
422 {
423 printf("\t%d\t",i+1);
424 PrintConstant(f,i);
425 printf("\n");
426 }
427 n=f->sizelocvars;
428 printf("locals (%d) for %p:\n",n,VOID(f));
429 for (i=0; i<n; i++)
430 {
431 printf("\t%d\t%s\t%d\t%d\n",
432 i,getstr(f->locvars[i].varname),f->locvars[i].startpc+1,f->locvars[i].endpc+1);
433 }
434 n=f->sizeupvalues;
435 printf("upvalues (%d) for %p:\n",n,VOID(f));
436 for (i=0; i<n; i++)
437 {
438 printf("\t%d\t%s\t%d\t%d\n",
439 i,UPVALNAME(i),f->upvalues[i].instack,f->upvalues[i].idx);
440 }
441}
442
443static void PrintFunction(const Proto* f, int full)
444{

Callers 1

PrintFunctionFunction · 0.85

Calls 1

PrintConstantFunction · 0.85

Tested by

no test coverage detected