2004-01-27 19:10 UTC+0100 Ryszard Glab <rglab@imid.med.pl>
* source/compiler/harbour.c
* fixed generation of pcode in codeblocks with no
local variables or parameters
* source/debug/debugger.prg
* fixed refreshing of variables in monitor window
This commit is contained in:
@@ -8,6 +8,14 @@
|
||||
2002-12-01 23:12 UTC+0100 Foo Bar <foo.bar@foobar.org>
|
||||
*/
|
||||
|
||||
2004-01-27 19:10 UTC+0100 Ryszard Glab <rglab@imid.med.pl>
|
||||
* source/compiler/harbour.c
|
||||
* fixed generation of pcode in codeblocks with no
|
||||
local variables or parameters
|
||||
|
||||
* source/debug/debugger.prg
|
||||
* fixed refreshing of variables in monitor window
|
||||
|
||||
2004-01-27 16:10 UTC+0100 Ryszard Glab <rglab@imid.med.pl>
|
||||
* source/compiler/harbour.c
|
||||
* the compiler generates module name inside
|
||||
|
||||
@@ -3837,23 +3837,21 @@ void hb_compCodeBlockEnd( void )
|
||||
}
|
||||
wLocalsCnt = wLocals;
|
||||
|
||||
if( ( pCodeblock->lPCodePos + 3 ) <= 255 && pCodeblock->wParamCount == 0 && wLocals == 0 )
|
||||
/* NOTE: 3 = HB_P_PUSHBLOCK + BYTE( size ) + _ENDBLOCK */
|
||||
wSize = ( USHORT ) pCodeblock->lPCodePos + 3 ;
|
||||
if( hb_comp_bDebugInfo )
|
||||
{
|
||||
wSize += (3 + strlen( hb_comp_files.pLast->szFileName ) + strlen( pFunc->szName ));
|
||||
wSize += wLocalsLen;
|
||||
}
|
||||
if( wSize <= 255 && pCodeblock->wParamCount == 0 && wLocals == 0 )
|
||||
{
|
||||
/* NOTE: 3 = HB_P_PUSHBLOCKSHORT + BYTE( size ) + _ENDBLOCK */
|
||||
wSize = ( USHORT ) pCodeblock->lPCodePos + 3;
|
||||
|
||||
hb_compGenPCode2( HB_P_PUSHBLOCKSHORT, ( BYTE ) wSize, ( BOOL ) 0 );
|
||||
}
|
||||
else
|
||||
{
|
||||
/* NOTE: 8 = HB_P_PUSHBLOCK + USHORT( size ) + USHORT( wParams ) + USHORT( wLocals ) + _ENDBLOCK */
|
||||
wSize = ( USHORT ) pCodeblock->lPCodePos + 8 + wLocals * 2;
|
||||
if( hb_comp_bDebugInfo )
|
||||
{
|
||||
wSize += (3 + strlen( hb_comp_files.pLast->szFileName ) + strlen( pFunc->szName ));
|
||||
wSize += wLocalsLen;
|
||||
}
|
||||
|
||||
/* NOTE: 8 = HB_P_PUSHBLOCK + USHORT( size ) + USHORT( wParams ) + USHORT( wLocals ) + _ENDBLOCK */
|
||||
wSize += (5+ wLocals * 2);
|
||||
hb_compGenPCode3( HB_P_PUSHBLOCK, HB_LOBYTE( wSize ), HB_HIBYTE( wSize ), ( BOOL ) 0 );
|
||||
hb_compGenPCode2( HB_LOBYTE( pCodeblock->wParamCount ), HB_HIBYTE( pCodeblock->wParamCount ), ( BOOL ) 0 );
|
||||
hb_compGenPCode2( HB_LOBYTE( wLocals ), HB_HIBYTE( wLocals ), ( BOOL ) 0 );
|
||||
|
||||
@@ -260,9 +260,6 @@ procedure __dbgEntry( nMode, uParam1, uParam2, uParam3 ) // debugger entry poin
|
||||
else
|
||||
AAdd( s_oDebugger:aVars, ATAIL( s_oDebugger:aCallStack[ 1 ][ CSTACK_LOCALS ] ) )
|
||||
endif
|
||||
// if s_oDebugger:oBrwVars != nil
|
||||
// s_oDebugger:oBrwVars:RefreshAll()
|
||||
// endif
|
||||
endif
|
||||
|
||||
case nMode == HB_DBG_STATICNAME
|
||||
@@ -276,9 +273,7 @@ procedure __dbgEntry( nMode, uParam1, uParam2, uParam3 ) // debugger entry poin
|
||||
return // We can not use s_oDebugger yet, so we return
|
||||
endif
|
||||
|
||||
// IF Len( s_oDebugger:aCallStack )>0 .AND. valtype( s_oDebugger:aCallStack[ 1, CSTACK_STATICS ])=='A'
|
||||
AAdd( s_oDebugger:aCallStack[ 1 ][ CSTACK_STATICS ], { cVarName, nVarIndex, "Static",, nSFrame } )
|
||||
// endif
|
||||
AAdd( s_oDebugger:aCallStack[ 1 ][ CSTACK_STATICS ], { cVarName, nVarIndex, "Static",, nSFrame } )
|
||||
|
||||
if s_oDebugger:lShowStatics
|
||||
if ( nAt := AScan( s_oDebugger:aVars,; // Is there another var with this name ?
|
||||
@@ -287,9 +282,6 @@ procedure __dbgEntry( nMode, uParam1, uParam2, uParam3 ) // debugger entry poin
|
||||
else
|
||||
AAdd( s_oDebugger:aVars, ATAIL( s_oDebugger:aCallStack[ 1 ][ CSTACK_STATICS ] ) )
|
||||
endif
|
||||
// if s_oDebugger:oBrwVars != nil
|
||||
// s_oDebugger:oBrwVars:RefreshAll()
|
||||
// endif
|
||||
endif
|
||||
|
||||
case nMode == HB_DBG_ENDPROC // called from hvm.c hb_vmDebuggerEndProc()
|
||||
@@ -1635,7 +1627,10 @@ METHOD ShowVars() CLASS TDebugger
|
||||
::oWndVars:Refresh()
|
||||
endif
|
||||
endif
|
||||
if Len( ::aVars ) > 0
|
||||
if lRepaint //.AND. Len( ::aVars ) > 0
|
||||
IF( ::oBrwVars:Cargo[1] > (::oBrwVars:nBottom - ::oBrwVars:nTop -1) )
|
||||
::oBrwVars:gotop()
|
||||
ENDIF
|
||||
::oBrwVars:RefreshAll()
|
||||
::oBrwVars:ForceStable()
|
||||
endif
|
||||
|
||||
Reference in New Issue
Block a user