From 64ad3af226c7b1cd617933064d752fccf4461cbf Mon Sep 17 00:00:00 2001 From: Eddie Runia Date: Thu, 6 May 1999 10:23:44 +0000 Subject: [PATCH] First version of the debug additions. Not included in makefile yet. --- harbour/source/tools/debug.c | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 harbour/source/tools/debug.c 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 ); +} + +