# lua/ldebug.h File Reference

`#include "lstate.h"`

Include dependency graph for ldebug.h:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

## Defines

#define | pcRel(pc, p) (cast(int, (pc) - (p)->code) - 1)
#define | getline(f, pc) (((f)->lineinfo) ? (f)->lineinfo[pc] : 0)
#define | resethookcount(L) (L->hookcount = L->basehookcount)

## Functions

void | luaG_typeerror (lua_State *L, const TValue *o, const char *opname)
void | luaG_concaterror (lua_State *L, StkId p1, StkId p2)
void | luaG_aritherror (lua_State *L, const TValue *p1, const TValue *p2)
int | luaG_ordererror (lua_State *L, const TValue *p1, const TValue *p2)
void | luaG_runerror (lua_State *L, const char *fmt,...)
void | luaG_errormsg (lua_State *L)
int | luaG_checkcode (const Proto *pt)
int | luaG_checkopenop (Instruction i)

## Define Documentation

#define getline | ( | f,
|  | pc |  | ) | (((f)->lineinfo) ? (f)->lineinfo[pc] : 0)

Definition at line 16 of file ldebug.h.

Referenced by currentline(), and traceexec().

#define pcRel | ( | pc,
|  | p |  | ) | (cast(int, (pc) - (p)->code) - 1)

Definition at line 14 of file ldebug.h.

Referenced by currentpc(), and traceexec().

#define resethookcount | ( | L |  | ) | (L->hookcount = L->basehookcount)

Definition at line 18 of file ldebug.h.

Referenced by lua_sethook(), luaE_newthread(), preinit_state(), and traceexec().

## Function Documentation

void luaG_aritherror | ( | lua_State * | L,
|  | const TValue * | p1,
|  | const TValue * | p2 |
| ) |  |  |

Definition at line 572 of file ldebug.c.

References luaG_typeerror(), and luaV_tonumber().

Referenced by Arith().

int luaG_checkcode | ( | const Proto * | pt | ) |

Definition at line 468 of file ldebug.c.

References NO_REG, Proto::sizecode, and symbexec().

Referenced by close_func(), and LoadFunction().

int luaG_checkopenop | ( | Instruction | i | ) |

Definition at line 290 of file ldebug.c.

References check, GET_OPCODE, GETARG_B, OP_CALL, OP_RETURN, OP_SETLIST, and OP_TAILCALL.

Referenced by luaV_execute().

void luaG_concaterror | ( | lua_State * | L,
|  | StkId | p1,
|  | StkId | p2 |
| ) |  |  |

Definition at line 565 of file ldebug.c.

References lua_assert, luaG_typeerror(), ttisnumber, and ttisstring.

Referenced by luaV_concat().

void luaG_errormsg | ( | lua_State * | L | ) |

Definition at line 602 of file ldebug.c.

References lua_State::errfunc, incr_top, luaD_call(), luaD_throw(), restorestack, setobjs2s, lua_State::top, and ttisfunction.

Referenced by lua_error(), and luaG_runerror().

int luaG_ordererror | ( | lua_State * | L,
|  | const TValue * | p1,
|  | const TValue * | p2 |
| ) |  |  |

Definition at line 580 of file ldebug.c.

References luaG_runerror(), luaT_typenames, and ttype.

Referenced by lessequal(), and luaV_lessthan().

void luaG_runerror | ( | lua_State * | L,
|  | const char * | fmt,
|  |  | ... |
| ) |  |  |

Definition at line 615 of file ldebug.c.

References addinfo(), luaG_errormsg(), and luaO_pushvfstring().

Referenced by findindex(), growCI(), lua_replace(), lua_yield(), luaD_call(), luaG_ordererror(), luaG_typeerror(), luaH_set(), luaM_growaux_(), luaM_toobig(), luaV_concat(), luaV_execute(), luaV_gettable(), luaV_settable(), and setnodevector().

void luaG_typeerror | ( | lua_State * | L,
|  | const TValue * | o,
|  | const char * | opname |
| ) |  |  |

Definition at line 551 of file ldebug.c.

References lua_State::base, cast_int, lua_State::ci, getobjname(), isinstack(), luaG_runerror(), luaT_typenames, and ttype.

Referenced by luaG_aritherror(), luaG_concaterror(), luaV_execute(), luaV_gettable(), luaV_settable(), and tryfuncTM().