From a4d569170f5310c2fcf87d53dd8cd291b400cf2b Mon Sep 17 00:00:00 2001 From: Antonio Linares Date: Sat, 28 Aug 1999 06:47:10 +0000 Subject: [PATCH] *** empty log message *** --- harbour/source/debug/debugger.prg | 10 ++++++++-- harbour/source/vm/hvm.c | 13 +++++++++++-- 2 files changed, 19 insertions(+), 4 deletions(-) diff --git a/harbour/source/debug/debugger.prg b/harbour/source/debug/debugger.prg index 111f22a8dd..6705d81381 100644 --- a/harbour/source/debug/debugger.prg +++ b/harbour/source/debug/debugger.prg @@ -73,7 +73,9 @@ function __dbgEntry( uParam ) // debugger entry point endif otherwise // called from hvm.c hb_vmDebuggerEndProc() - oDebugger:EndProc() + if oDebugger != nil + oDebugger:EndProc() + endif endcase return nil @@ -339,7 +341,11 @@ METHOD ShowCode( cModuleName ) CLASS TDebugger ASize( ::aCallStack, Len( ::aCallStack ) + 1 ) AIns( ::aCallStack, 1 ) - ::aCallStack[ 1 ] = cFunction + if Len( ::aCallStack ) == 1 + ::aCallStack[ 1 ] = ProcName( 3 ) // cFunction + else + ::aCallStack[ 1 ] = ProcName( 2 ) // cFunction + endif if ::oWndStack != nil ::oBrwStack:RefreshAll() diff --git a/harbour/source/vm/hvm.c b/harbour/source/vm/hvm.c index 307d32a48c..2ea9bb7d85 100644 --- a/harbour/source/vm/hvm.c +++ b/harbour/source/vm/hvm.c @@ -903,11 +903,18 @@ void hb_vmArrayPut( void ) static void hb_vmDebuggerEndProc( void ) { + HB_ITEM it; + + hb_itemCopy( &it, &stack.Return ); /* saves the previous returned value */ + bDebugShowLines = FALSE; hb_vmPushSymbol( hb_dynsymFind( "__DBGENTRY" )->pSymbol ); hb_vmPushNil(); hb_vmDo( 0 ); bDebugShowLines = TRUE; + + hb_itemCopy( &stack.Return, &it ); /* restores the previous returned value */ + hb_itemClear( &it ); } static void hb_vmDebuggerShowLine( WORD wLine ) /* makes the debugger shows a specific source code line */ @@ -1527,6 +1534,8 @@ void hb_vmNotEqual( void ) else if( pItem1->type != pItem2->type ) hb_errRT_BASE( EG_ARG, 1072, NULL, "<>" ); + + else hb_vmPushLogical( TRUE ); } @@ -2315,7 +2324,7 @@ void hb_stackDispCall( void ) pBase->item.asSymbol.value->szName, pBase->item.asSymbol.lineno ); else - printf( "Called from %s(%i)", + printf( "Called from %s(%i)", pBase->item.asSymbol.value->szName, pBase->item.asSymbol.lineno ); @@ -2770,7 +2779,7 @@ void hb_vmRequestBreak( PHB_ITEM pItem ) } /* NOTE: This function should normally have a parameter count check. But - since in Harbour we cannot distinguish between BREAK() function and + since in Harbour we cannot distinguish between BREAK() function and the BREAK statement, because both generate a BREAK() function call on the pcode level, we should drop the checking. */