Move debugging/introspection functionality to lj_debug.c.

This commit is contained in:
Mike Pall
2011-06-07 21:37:24 +02:00
parent b44ccd4263
commit 585cf05dbd
13 changed files with 521 additions and 457 deletions

23
src/lj_debug.h Normal file
View File

@@ -0,0 +1,23 @@
/*
** Debugging and introspection.
** Copyright (C) 2005-2011 Mike Pall. See Copyright Notice in luajit.h
*/
#ifndef _LJ_DEBUG_H
#define _LJ_DEBUG_H
#include "lj_obj.h"
LJ_FUNC cTValue *lj_debug_frame(lua_State *L, int level, int *size);
LJ_FUNC BCLine LJ_FASTCALL lj_debug_line(GCproto *pt, BCPos pc);
LJ_FUNC const char *lj_debug_uvname(cTValue *o, uint32_t idx, TValue **tvp);
LJ_FUNC const char *lj_debug_slotname(GCproto *pt, const BCIns *pc,
BCReg slot, const char **name);
LJ_FUNC const char *lj_debug_funcname(lua_State *L, TValue *frame,
const char **name);
LJ_FUNC void lj_debug_shortname(char *out, const char *src);
LJ_FUNC void lj_debug_addloc(lua_State *L, const char *msg,
cTValue *frame, cTValue *nextframe);
LJ_FUNC void lj_debug_pushloc(lua_State *L, GCproto *pt, BCPos pc);
#endif