ldebug.h 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. /*
  2. ** $Id: ldebug.h,v 2.14.1.1 2017/04/19 17:20:42 roberto Exp $
  3. ** Auxiliary functions from Debug Interface module
  4. ** See Copyright Notice in lua.h
  5. */
  6. #ifndef ldebug_h
  7. #define ldebug_h
  8. #include "lstate.h"
  9. #define pcRel(pc, p) (cast(int, (pc) - (p)->code) - 1)
  10. // #define getfuncline(f,pc) (((f)->lineinfo) ? (f)->lineinfo[pc] : -1)
  11. int getfuncline(Proto *p, int pc);
  12. #define resethookcount(L) (L->hookcount = L->basehookcount)
  13. LUAI_FUNC l_noret luaG_typeerror (lua_State *L, const TValue *o,
  14. const char *opname);
  15. LUAI_FUNC l_noret luaG_concaterror (lua_State *L, const TValue *p1,
  16. const TValue *p2);
  17. LUAI_FUNC l_noret luaG_opinterror (lua_State *L, const TValue *p1,
  18. const TValue *p2,
  19. const char *msg);
  20. LUAI_FUNC l_noret luaG_tointerror (lua_State *L, const TValue *p1,
  21. const TValue *p2);
  22. LUAI_FUNC l_noret luaG_ordererror (lua_State *L, const TValue *p1,
  23. const TValue *p2);
  24. LUAI_FUNC l_noret luaG_runerror (lua_State *L, const char *fmt, ...);
  25. LUAI_FUNC const char *luaG_addinfo (lua_State *L, const char *msg,
  26. TString *src, int line);
  27. LUAI_FUNC l_noret luaG_errormsg (lua_State *L);
  28. LUAI_FUNC void luaG_traceexec (lua_State *L);
  29. #endif