2008-10-17 18:22 UTC+0200 Viktor Szakats (harbour.01 syenar hu)

* source/debug/dbgtwin.prg
  * source/debug/dbgbrwsr.prg
  * source/debug/tbrwtext.prg
  * source/debug/debugger.prg
    ! Fixed to not crash after switching to mono display.
      DISCLAIMER: This is a quick patch (but even this took 
      hours) and it absolutely can be wrong, incomplete in 
      any ways. I'm not using or knowing debugger code, pls 
      patch it further on.
      NOTE: Color refresh after switching mono/color mode 
            is still wrong and I've given up after trying 
            for a few hours.
    * Minor formatting.
This commit is contained in:
Viktor Szakats
2008-10-17 16:23:12 +00:00
parent edd1019b40
commit 6b060e2895
5 changed files with 32 additions and 18 deletions

View File

@@ -8,6 +8,21 @@
2008-12-31 13:59 UTC+0100 Foo Bar (foo.bar foobar.org)
*/
2008-10-17 18:22 UTC+0200 Viktor Szakats (harbour.01 syenar hu)
* source/debug/dbgtwin.prg
* source/debug/dbgbrwsr.prg
* source/debug/tbrwtext.prg
* source/debug/debugger.prg
! Fixed to not crash after switching to mono display.
DISCLAIMER: This is a quick patch (but even this took
hours) and it absolutely can be wrong, incomplete in
any ways. I'm not using or knowing debugger code, pls
patch it further on.
NOTE: Color refresh after switching mono/color mode
is still wrong and I've given up after trying
for a few hours.
* Minor formatting.
2008-10-17 16:35 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/source/rtl/console.c
! added missing #include "hbapierr.h"

View File

@@ -154,7 +154,7 @@ METHOD ForceStable()
LOCAL nRow, nCol, xData, oCol, nColX, nWid, aClr, nClr
IF !::lConfigured
::Configure()
::Configure()
ENDIF
FOR nRow := 1 TO ::rowCount
IF Empty( ::aRowState[ nRow ] )

View File

@@ -290,7 +290,7 @@ METHOD Move() Class HBDbWindow
LOCAL nKey
DO WHILE .T.
RestScreen( ,,,, ::cbackimage )
RestScreen( ,,,, ::cBackImage )
hb_dispBox( ::nTop, ::nLeft, ::nRight, ::nBottom, Replicate( Chr( 176 ), 8 ) + " " )
nKey := Inkey( 0 )
@@ -298,9 +298,9 @@ METHOD Move() Class HBDbWindow
DO CASE
CASE nKey == K_UP
IF ::ntop != 0
::ntop--
::nbottom--
IF ::nTop != 0
::nTop--
::nBottom--
ENDIF
CASE nKey == K_DOWN
@@ -334,7 +334,7 @@ METHOD Move() Class HBDbWindow
ENDCASE
IF nKey == K_ESC .OR. nKey == K_ENTER
exit
EXIT
ENDIF
ENDDO
@@ -357,7 +357,7 @@ METHOD LoadColors() CLASS HBDbWindow
::cColor := aClr[ 1 ]
IF ::Browser != NIL
::Browser:ColorSpec := aClr[ 2 ] + "," + aClr[ 5 ] + "," + aClr[ 3 ]
::Browser:ColorSpec := aClr[ 2 ] + "," + aClr[ 5 ] + "," + aClr[ 3 ] + "," + aClr[ 6 ]
ENDIF
RETURN NIL

View File

@@ -178,7 +178,6 @@ CREATE CLASS HBDebugger
VAR oWndStack
VAR oWndVars
VAR oBar
VAR oBrwText
VAR cPrgName
VAR oBrwStack
@@ -261,7 +260,7 @@ CREATE CLASS HBDebugger
METHOD CallStackProcessKey( nKey )
METHOD ClrModal() INLINE iif( ::lMonoDisplay, "N/W, W+/W, W/N, W+/N",;
"N/W, R/W, N/BG, R/BG" )
"N/W, R/W, N/BG, R/BG" )
METHOD CodeblockTrace()
METHOD CodeWindowProcessKey( nKey )
@@ -520,7 +519,7 @@ METHOD BuildBrowseStack() CLASS HBDebugger
IF ::oBrwStack == NIL
::oBrwStack := HBDbBrowser():New( 2, ::nMaxCol - 14, ::nMaxRow - 7, ::nMaxCol - 1 )
::oBrwStack:ColorSpec := ::aColors[ 3 ] + "," + ::aColors[ 4 ] + "," + ::aColors[ 5 ]
::oBrwStack:ColorSpec := ::aColors[ 3 ] + "," + ::aColors[ 4 ] + "," + ::aColors[ 5 ] + "," + ::aColors[ 6 ]
::oBrwStack:goTopBlock := { || ::oBrwStack:Cargo := 1 }
::oBrwStack:goBottomBlock := { || ::oBrwStack:Cargo := Len( ::aProcStack ) }
::oBrwStack:skipBlock := { | nSkip, nOld | nOld := ::oBrwStack:Cargo,;
@@ -2437,7 +2436,7 @@ METHOD ShowCallStack() CLASS HBDebugger
ENDIF
::oWndStack:bPainted := { || ::oBrwStack:ColorSpec := __DbgColors()[ 2 ] + "," + ;
__DbgColors()[ 5 ] + "," + __DbgColors()[ 4 ],;
__DbgColors()[ 5 ] + "," + __DbgColors()[ 4 ] + "," + __DbgColors()[ 6 ],;
::oBrwStack:RefreshAll(), ::oBrwStack:ForceStable() }
::oWndStack:bGotFocus := { || SetCursor( SC_NONE ) }
@@ -2613,7 +2612,7 @@ METHOD ShowVars() CLASS HBDebugger
::nMaxCol - iif( ::oWndStack != NIL, ::oWndStack:nWidth(), 0 ) - 1 )
::oBrwVars:Cargo := { 1, {} } // Actual highlighted row
::oBrwVars:ColorSpec := ::aColors[ 2 ] + "," + ::aColors[ 5 ] + "," + ::aColors[ 3 ]
::oBrwVars:ColorSpec := ::aColors[ 2 ] + "," + ::aColors[ 5 ] + "," + ::aColors[ 3 ] + "," + ::aColors[ 6 ]
::oBrwVars:goTopBlock := { || ::oBrwVars:cargo[ 1 ] := Min( 1, Len( ::aVars ) ) }
::oBrwVars:goBottomBlock := { || ::oBrwVars:cargo[ 1 ] := Max( 1, Len( ::aVars ) ) }
::oBrwVars:skipBlock := { | nSkip, nOld | ;
@@ -3076,7 +3075,7 @@ METHOD WatchpointsShow() CLASS HBDebugger
::oWndPnt:Browser := ::oBrwPnt
::oBrwPnt:Cargo := { 1, {} } // Actual highlighted row
::oBrwPnt:ColorSpec := ::aColors[ 2 ] + "," + ::aColors[ 5 ] + "," + ::aColors[ 3 ]
::oBrwPnt:ColorSpec := ::aColors[ 2 ] + "," + ::aColors[ 5 ] + "," + ::aColors[ 3 ] + "," + ::aColors[ 6 ]
::oBrwPnt:goTopBlock := { || ::oBrwPnt:cargo[ 1 ] := Min( 1, Len(::aWatch ) ) }
::oBrwPnt:goBottomBlock := { || ::oBrwPnt:cargo[ 1 ] := Len( ::aWatch ) }
::oBrwPnt:skipBlock := { | nSkip, nOld | nOld := ::oBrwPnt:Cargo[ 1 ],;

View File

@@ -232,8 +232,8 @@ METHOD Resize( nTop, nLeft, nBottom, nRight ) CLASS HBBrwText
lResize := .T.
ENDIF
IF lResize
::oBrw:Resize( nTop, nLeft, nBottom, nRight )
::nWidth := nRight - nLeft + 1
::oBrw:Resize( nTop, nLeft, nBottom, nRight )
::nWidth := nRight - nLeft + 1
ENDIF
RETURN Self
@@ -246,11 +246,11 @@ METHOD GetLineColor() CLASS HBBrwText
lBreak := AScan( ::aBreakPoints, ::nRow ) > 0
IF lBreak
aColor := { 3, 2 }
aColor := { 3, 2 }
ELSEIF ::nRow == ::nActiveLine
aColor := { 4, 4 }
aColor := { 4, 4 }
ELSE
aColor := { 1, 2 }
aColor := { 1, 2 }
ENDIF
RETURN aColor