From d5220415d2902d44f9d00c704bd6b2e77d6928ec Mon Sep 17 00:00:00 2001 From: "David G. Holm" Date: Thu, 21 Jun 2001 18:49:58 +0000 Subject: [PATCH] See ChangeLog entry 2001-06-21 14:45 UTC-0400 David G. Holm --- harbour/source/debug/debugger.prg | 2 +- harbour/source/rtl/inkey.c | 9 --------- harbour/source/vm/hvm.c | 10 +++++++++- 3 files changed, 10 insertions(+), 11 deletions(-) diff --git a/harbour/source/debug/debugger.prg b/harbour/source/debug/debugger.prg index 962e24a0bd..78894441e1 100644 --- a/harbour/source/debug/debugger.prg +++ b/harbour/source/debug/debugger.prg @@ -184,7 +184,7 @@ procedure __dbgEntry( uParam1, uParam2, uParam3 ) // debugger entry point DispEnd() else */ - if !s_oDebugger:lGo .or. isAltdPressed() + if !s_oDebugger:lGo .or. InvokeDebug() s_oDebugger:lGo := .F. s_oDebugger:SaveAppStatus() s_oDebugger:GoToLine( uParam1 ) diff --git a/harbour/source/rtl/inkey.c b/harbour/source/rtl/inkey.c index 9b3f6bedee..31d58d85a1 100644 --- a/harbour/source/rtl/inkey.c +++ b/harbour/source/rtl/inkey.c @@ -79,7 +79,6 @@ #include #endif -static BOOL s_altdPressed = 0; static int * s_inkeyBuffer = 0; /* Harbour keyboard buffer (empty if head == tail) */ static int s_inkeyHead; /* Harbour keyboard buffer head pointer (next insert) */ static int s_inkeyTail; /* Harbour keyboard buffer tail pointer (next extract) */ @@ -223,7 +222,6 @@ void hb_inkeyPoll( void ) /* Poll the console keyboard to stuff the Harbour if( hb_set.HB_SET_DEBUG ) { ch = 0; /* Make the keystroke disappear */ - s_altdPressed = TRUE; hb_vmRequestDebug(); /* Request the debugger */ } } @@ -1106,10 +1104,3 @@ int hb_inkeyTranslate( int key, HB_inkey_enum event_mask ) } return key; } - -HB_FUNC( ISALTDPRESSED ) -{ - BOOL bAltd = s_altdPressed; - s_altdPressed = FALSE; - hb_retl( bAltd ); -} \ No newline at end of file diff --git a/harbour/source/vm/hvm.c b/harbour/source/vm/hvm.c index 805c7b0f76..19ec8f45c8 100644 --- a/harbour/source/vm/hvm.c +++ b/harbour/source/vm/hvm.c @@ -230,6 +230,7 @@ static PSYMBOLS s_pSymbols = NULL; /* to hold a linked list of all different mo static BYTE s_byErrorLevel; /* application exit errorlevel */ static BOOL s_bDebugging; +static BOOL s_bDebugRequest; /* debugger invoked via the VM */ static BOOL s_bDebugShowLines; /* update source code line on the debugger display */ static BOOL s_bDebuggerIsWorking; /* to know when __DBGENTRY is beeing invoked */ @@ -4324,7 +4325,14 @@ void hb_vmRequestCancel( void ) void hb_vmRequestDebug( void ) { HB_TRACE(HB_TR_DEBUG, ("hb_vmRequestCancel()")); - /* TODO: Cause the debugger to be invoked */ + s_bDebugRequest = TRUE; +} + +HB_FUNC( INVOKEDEBUG ) +{ + BOOL bRequest = s_bDebugRequest; + s_bDebugRequest = FALSE; + hb_retl( bRequest ); } /* $Doc$