diff --git a/harbour/source/tools/debug.c b/harbour/source/tools/debug.c new file mode 100644 index 0000000000..b04a5f7139 --- /dev/null +++ b/harbour/source/tools/debug.c @@ -0,0 +1,34 @@ +#include +#include +#include + +extern STACK stack; +extern ITEM aStatics; +PITEM _itemReturn( PITEM ); +PITEM ArrayClone( PITEM ); + +/* + __aStatic() -> Return the statics array +*/ +HARBOUR __ASTATIC() +{ + _itemReturn( &aStatics ); +} + +/* + __Static( nStatic ) -> Returns a specific static + + nStatic : Number of static +*/ +HARBOUR __STATIC() +{ + PITEM pStatic; + WORD wStatic; + + wStatic = _parni(1); + pStatic = ( ( PBASEARRAY ) aStatics.value.pBaseArray )->pItems + stack.iStatics + + wStatic - 1; + _itemReturn( pStatic ); +} + +