From 33454920b9381f1f01b7581fb111aa99ff2ba55c Mon Sep 17 00:00:00 2001 From: Antonio Linares Date: Mon, 24 Jan 2000 15:20:57 +0000 Subject: [PATCH] 2000-01-23 13:34 GMT+1 Antonio Linares --- harbour/source/vm/hvm.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/harbour/source/vm/hvm.c b/harbour/source/vm/hvm.c index 9648aa2d8c..ccc606d994 100644 --- a/harbour/source/vm/hvm.c +++ b/harbour/source/vm/hvm.c @@ -201,6 +201,8 @@ extern POBJSYMBOLS HB_FIRSTSYMBOL, HB_LASTSYMBOL; HB_STACK hb_stack; HB_SYMB hb_symEval = { "__EVAL", FS_PUBLIC, hb_vmDoBlock, 0 }; /* symbol to evaluate codeblocks */ +BOOL hb_DebuggerIsWorking = FALSE; /* to know when __DBGENTRY is beeing invoked */ + static HB_ITEM s_aStatics; /* Harbour array to hold all application statics variables */ static BOOL s_bDebugging = FALSE; static BOOL s_bDebugShowLines = FALSE; /* update source code line on the debugger display */ @@ -1140,7 +1142,7 @@ void hb_vmExecute( BYTE * pCode, PHB_SYMB pSymbols ) break; else if( s_uiActionRequest & HB_ENDPROC_REQUESTED ) { - /* request to stop current procedure was issued + /* request to stop current procedure was issued * (from macro evaluation) */ s_uiActionRequest = 0; @@ -2639,7 +2641,9 @@ static void hb_vmModuleName( char * szModuleName ) /* PRG and function name info hb_vmPushSymbol( hb_dynsymFind( "__DBGENTRY" )->pSymbol ); hb_vmPushNil(); hb_vmPushString( szModuleName, strlen( szModuleName ) ); + hb_DebuggerIsWorking = TRUE; hb_vmDo( 1 ); + hb_DebuggerIsWorking = FALSE; s_bDebugShowLines = TRUE; } @@ -2712,7 +2716,9 @@ static void hb_vmDebuggerEndProc( void ) s_bDebugShowLines = FALSE; hb_vmPushSymbol( hb_dynsymFind( "__DBGENTRY" )->pSymbol ); hb_vmPushNil(); + hb_DebuggerIsWorking = TRUE; hb_vmDo( 0 ); + hb_DebuggerIsWorking = FALSE; s_bDebugShowLines = TRUE; hb_itemCopy( &hb_stack.Return, &item ); /* restores the previous returned value */ @@ -2727,7 +2733,9 @@ static void hb_vmDebuggerShowLine( USHORT uiLine ) /* makes the debugger shows a hb_vmPushSymbol( hb_dynsymFind( "__DBGENTRY" )->pSymbol ); hb_vmPushNil(); hb_vmPushInteger( uiLine ); + hb_DebuggerIsWorking = TRUE; hb_vmDo( 1 ); + hb_DebuggerIsWorking = FALSE; s_bDebugShowLines = TRUE; } @@ -3824,4 +3832,4 @@ HARBOUR HB___VMVARSGET( void ) { hb_itemReturn( s_aStatics.item.asArray.value->pItems + hb_stack.iStatics + hb_parni( 1 ) - 1 ); -} +} \ No newline at end of file