2
0

ldebug.h 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. /*
  2. ** $Id: ldebug.h $
  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 const char *luaG_findlocal (lua_State *L, CallInfo *ci, int n,
  18. StkId *pos);
  19. LUAI_FUNC l_noret luaG_typeerror (lua_State *L, const TValue *o,
  20. const char *opname);
  21. LUAI_FUNC l_noret luaG_forerror (lua_State *L, const TValue *o,
  22. const char *what);
  23. LUAI_FUNC l_noret luaG_concaterror (lua_State *L, const TValue *p1,
  24. const TValue *p2);
  25. LUAI_FUNC l_noret luaG_opinterror (lua_State *L, const TValue *p1,
  26. const TValue *p2,
  27. const char *msg);
  28. LUAI_FUNC l_noret luaG_tointerror (lua_State *L, const TValue *p1,
  29. const TValue *p2);
  30. LUAI_FUNC l_noret luaG_ordererror (lua_State *L, const TValue *p1,
  31. const TValue *p2);
  32. LUAI_FUNC l_noret luaG_runerror (lua_State *L, const char *fmt, ...);
  33. LUAI_FUNC const char *luaG_addinfo (lua_State *L, const char *msg,
  34. TString *src, int line);
  35. LUAI_FUNC l_noret luaG_errormsg (lua_State *L);
  36. LUAI_FUNC int luaG_traceexec (lua_State *L, const Instruction *pc);
  37. #endif