ldebug.h 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. /*
  2. ** $Id: ldebug.h,v 2.17 2018/05/02 18:17:59 roberto Exp roberto $
  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 resethookcount(L) (L->hookcount = L->basehookcount)
  11. /*
  12. ** mark for entries in 'lineinfo' array that has absolute information in
  13. ** 'abslineinfo' array
  14. */
  15. #define ABSLINEINFO (-0x80)
  16. LUAI_FUNC int luaG_getfuncline (const Proto *f, int pc);
  17. LUAI_FUNC l_noret luaG_typeerror (lua_State *L, const TValue *o,
  18. const char *opname);
  19. LUAI_FUNC l_noret luaG_concaterror (lua_State *L, const TValue *p1,
  20. const TValue *p2);
  21. LUAI_FUNC l_noret luaG_opinterror (lua_State *L, const TValue *p1,
  22. const TValue *p2,
  23. const char *msg);
  24. LUAI_FUNC l_noret luaG_tointerror (lua_State *L, const TValue *p1,
  25. const TValue *p2);
  26. LUAI_FUNC l_noret luaG_ordererror (lua_State *L, const TValue *p1,
  27. const TValue *p2);
  28. LUAI_FUNC l_noret luaG_runerror (lua_State *L, const char *fmt, ...);
  29. LUAI_FUNC const char *luaG_addinfo (lua_State *L, const char *msg,
  30. TString *src, int line);
  31. LUAI_FUNC l_noret luaG_errormsg (lua_State *L);
  32. LUAI_FUNC int luaG_traceexec (lua_State *L, const Instruction *pc);
  33. #endif