From b7670cc2be845951bfd569b81e79381dc825cd1b Mon Sep 17 00:00:00 2001 From: Antonio Linares Date: Wed, 25 Aug 1999 07:12:42 +0000 Subject: [PATCH] *** empty log message *** --- harbour/ChangeLog | 29 +++++++++++++++++------------ harbour/source/debug/debugger.prg | 26 +++++++++++++++++++++++--- 2 files changed, 40 insertions(+), 15 deletions(-) diff --git a/harbour/ChangeLog b/harbour/ChangeLog index a683e6ce64..fdef45a95a 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -1,23 +1,28 @@ +19990825-09:02 GMT+1 Antonio Linares + * source/debug/debugger.prg + + Breakpoints already working. + (Notice the Harbour debugger does not debug multiple files yet). + 19990825-01:15 GMT+1 Victor Szel * source/rtl/extend.c - ! hb_parinfo() fixed so that it will return proper type information for + ! hb_parinfo() fixed so that it will return proper type information for parameters passed by reference, like in Clipper. ! hb_par*() functions accept zero parameter again to access self. NOTE: added about this. * tests/working/fileio.prg source/rtl/filesys.c - ! FREAD() fixed, it now checks second parameter correctly using + ! FREAD() fixed, it now checks second parameter correctly using hb_parinfo(). - + Some new tests added, one test put between + + Some new tests added, one test put between HARBOUR_STRICT_CLIPPER_COMPATIBILITY guards, see next. ! FREAD() uses hb_parcsiz() (hb_parclen()+1) as the maximum number of - bytes which could be read. Modified FREAD() but put between - HARBOUR_STRICT_CLIPPER_COMPATIBILITY guards, since this is a rather - unexpected behaviour, plus it can overwrite the terminating zero byte + bytes which could be read. Modified FREAD() but put between + HARBOUR_STRICT_CLIPPER_COMPATIBILITY guards, since this is a rather + unexpected behaviour, plus it can overwrite the terminating zero byte in the string buffer. - + NOTE: added about an incompatibility in hb_fsSeek()/hb_fsWrite() + + NOTE: added about an incompatibility in hb_fsSeek()/hb_fsWrite() behaviour. * contrib/odbc/odbc.c @@ -56,7 +61,7 @@ * include/hbdefs.h ! ISBYREF() macro changed to call hb_parinfo() instead of hb_param(), - it was not working previously since hb_param() was automatically + it was not working previously since hb_param() was automatically dereferencing the parameter. FOPEN() parameter checking was not working correctly because of this. @@ -65,7 +70,7 @@ FRead() IS NOT WORKING RIGHT NOW ) doc/subcodes.txt - * Huge cleanup, reformatted, eliminated usage of internal structures, + * Huge cleanup, reformatted, eliminated usage of internal structures, fixed types, standardized variable names, explicit constants changed to manifest constants, fixed a whole bunch of bugs, simplified code fragments, optimalized variable usage and scope. 65535U -> (USHORT)-1 @@ -77,7 +82,7 @@ ! FREAD() will check if the passed buffer size is smaller than the required read length. ! FREAD(): Added warning about the fact, that the buffer returned by - hb_parc() will be directly modified. (this is strictly prohibited by + hb_parc() will be directly modified. (this is strictly prohibited by Clipper doc). ! hb_fsCreate() didn't reset the last error code on success. ! hb_fsDelete(), hb_fsRename(), hb_fsLock(), hb_fsCommit() - the not @@ -99,7 +104,7 @@ ! MIN(), MAX() code fixed to behave exactly like Clipper, it will now return a DOUBLE if any parameter is DOUBLE, it will return LONG if any parameter is LONG, otherwise it will return INT, the HB_ITEM - decimals now are only accessed for DOUBLE types (and of course only set + decimals now are only accessed for DOUBLE types (and of course only set for DOUBLE return types). The bug could be observed by running AC_TEST pressing PgDn at the bottom of the list then pressing Up button, the index display was shown with decimals in it. @@ -152,7 +157,7 @@ ! Fixes by Luiz Rafael Culik implemented. * source/rtl/strings.c - + Added a new runtime error for ALLTRIM(), this error has been + + Added a new runtime error for ALLTRIM(), this error has been introduced in Clipper 5.3. (Put between HB_COMPATIBILITY_CLIPPER_53 guard) % Some PHB_ITEM accesses changed to type checking macros, only where diff --git a/harbour/source/debug/debugger.prg b/harbour/source/debug/debugger.prg index 48c76f05c0..a30a75ae02 100644 --- a/harbour/source/debug/debugger.prg +++ b/harbour/source/debug/debugger.prg @@ -2,7 +2,7 @@ * $Id$ */ -/* Harbour debugger first outline +/* Harbour debugger * Copyright(C) 1999 by Antonio Linares * * This program is free software; you can redistribute it and/or modify @@ -52,6 +52,9 @@ function __dbgEntry( uParam ) // debugger entry point case ValType( uParam ) == "N" // called from hvm.c hb_vmDebugShowLines() if oDebugger != nil oDebugger:SaveAppStatus() + if oDebugger:lGo + oDebugger:lGo = ! oDebugger:IsBreakPoint( uParam ) + endif if ! oDebugger:lGo oDebugger:GoToLine( uParam ) oDebugger:HandleEvent() @@ -72,7 +75,7 @@ CLASS TDebugger DATA aWindows, nCurrentWindow DATA oPullDown - DATA oWndCode, oWndCommand + DATA oWndCode, oWndCommand, oWndStack DATA oBar, oBrwText, cPrgName DATA cImage DATA lEnd @@ -88,6 +91,7 @@ CLASS TDebugger METHOD HandleEvent() METHOD Hide() METHOD InputBox( cMsg, uValue ) + METHOD IsBreakPoint( nLine ) METHOD NextWindow() METHOD Open() METHOD PrevWindow() @@ -95,6 +99,7 @@ CLASS TDebugger METHOD SaveAppStatus() METHOD Show() METHOD ShowAppScreen() + METHOD ShowCallStack() METHOD ShowCode( cModuleName ) METHOD ToggleBreakPoint() @@ -271,6 +276,17 @@ METHOD ShowAppScreen() CLASS TDebugger return nil +METHOD ShowCallStack() CLASS TDebugger + + if ::oWndStack == nil + ::oWndStack = TDbWindow():New( 1, MaxCol() - 15, MaxRow() - 1, MaxCol(),; + "Stack", "BG+/B" ) + ::oWndStack:Show( .f. ) + AAdd( ::aWindows, ::oWndStack ) + endif + +return nil + static function CompareLine( Self ) return { | a | a[ 1 ] == Self:oBrwText:nLine } @@ -322,6 +338,10 @@ METHOD InputBox( cMsg, uValue ) CLASS TDebugger return If( LastKey() != K_ESC, uTemp, uValue ) +METHOD IsBreakPoint( nLine ) CLASS TDebugger + +return AScan( ::aBreakPoints, { | aBreak, n | aBreak[ 1 ] == nLine } ) != 0 + METHOD GotoLine( nLine ) CLASS TDebugger ::oBrwText:GotoLine( nLine ) @@ -912,7 +932,7 @@ function BuildMenu( oDebugger ) // Builds the debugger pulldown menu MENUITEM " &WorkAreas F6" ACTION Alert( "Not implemented yet!" ) MENUITEM " &App screen F4 " ACTION oDebugger:ShowAppScreen() SEPARATOR - MENUITEM " &CallStack" ACTION Alert( "Not implemented yet!" ) + MENUITEM " &CallStack" ACTION oDebugger:ShowCallStack() ENDMENU MENUITEM " &Run "