From 6153da2b058239401186c8b5082312037d2c1457 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Przemys=C5=82aw=20Czerpak?= Date: Fri, 5 Jul 2013 14:12:46 +0200 Subject: [PATCH] 2013-07-05 14:12 UTC+0200 Przemyslaw Czerpak (druzus/at/poczta.onet.pl) * src/debug/dbgentry.c ! added missing casting * src/debug/debugger.prg + show in call stack references to code compiled without debug info * src/rtl/itemseri.c * ignore HB_HASH_RESORT flag during hash serialization --- ChangeLog.txt | 10 ++++++++++ src/debug/dbgentry.c | 2 +- src/debug/debugger.prg | 4 +++- src/rtl/itemseri.c | 4 ++-- 4 files changed, 16 insertions(+), 4 deletions(-) diff --git a/ChangeLog.txt b/ChangeLog.txt index d4bff1b3ad..90f33378b7 100644 --- a/ChangeLog.txt +++ b/ChangeLog.txt @@ -10,6 +10,16 @@ * Change, ! Fix, % Optimization, + Addition, - Removal, ; Comment */ +2013-07-05 14:12 UTC+0200 Przemyslaw Czerpak (druzus/at/poczta.onet.pl) + * src/debug/dbgentry.c + ! added missing casting + + * src/debug/debugger.prg + + show in call stack references to code compiled without debug info + + * src/rtl/itemseri.c + * ignore HB_HASH_RESORT flag during hash serialization + 2013-07-05 04:35 UTC+0400 Phil Krylov (phil a t newstar.rinet.ru) * src/debug/debugger.prg ! Fixed debugger crashes on some commands in the command window. diff --git a/src/debug/dbgentry.c b/src/debug/dbgentry.c index 8558e95616..53477dd0ff 100644 --- a/src/debug/dbgentry.c +++ b/src/debug/dbgentry.c @@ -1767,7 +1767,7 @@ HB_FUNC( __DBGISBREAK ) void * ptr = hb_parptr( 1 ); if( ptr ) - hb_retni( hb_dbgIsBreakPoint( ptr, + hb_retni( hb_dbgIsBreakPoint( ( HB_DEBUGINFO * ) ptr, hb_dbgStripModuleName( hb_parc( 2 ) ), hb_parni( 3 ) ) ); } diff --git a/src/debug/debugger.prg b/src/debug/debugger.prg index dacc2da8e2..cafd18f85a 100644 --- a/src/debug/debugger.prg +++ b/src/debug/debugger.prg @@ -1835,7 +1835,9 @@ METHOD LoadCallStack() CLASS HBDebugger // a procedure with debug info ::aProcStack[ i - nDebugLevel + 1 ] := ::aCallStack[ nPos ] ELSE - ::aProcStack[ i - nDebugLevel + 1 ] := {, ProcName( i ) + "(" + hb_ntos( ProcLine( i ) ) + ")", , nLevel, , } + ::aProcStack[ i - nDebugLevel + 1 ] := iif( ProcLine( i ) != 0, ; + { ProcFile( i ), ProcName( i ), ProcLine( i ), nLevel, {}, {} }, ; + {, ProcName( i ) + "(" + hb_ntos( ProcLine( i ) ) + ")", , nLevel, , } ) ENDIF NEXT diff --git a/src/rtl/itemseri.c b/src/rtl/itemseri.c index 6ae0ff8265..abf256e2fc 100644 --- a/src/rtl/itemseri.c +++ b/src/rtl/itemseri.c @@ -492,7 +492,7 @@ static HB_SIZE hb_itemSerialSize( PHB_ITEM pItem, HB_BOOL fNumSize, } else { - if( hb_hashGetFlags( pItem ) != HB_HASH_FLAG_DEFAULT ) + if( ( hb_hashGetFlags( pItem ) & ~HB_HASH_RESORT ) != HB_HASH_FLAG_DEFAULT ) nSize = 3; else nSize = 0; @@ -815,7 +815,7 @@ static HB_SIZE hb_serializeItem( PHB_ITEM pItem, HB_BOOL fNumSize, int iFlags = hb_hashGetFlags( pItem ); PHB_ITEM pDefVal = hb_hashGetDefault( pItem ); - if( iFlags != HB_HASH_FLAG_DEFAULT ) + if( ( iFlags & ~HB_HASH_RESORT ) != HB_HASH_FLAG_DEFAULT ) { pBuffer[ nOffset++ ] = HB_SERIAL_HASHFLAGS; HB_PUT_LE_UINT16( &pBuffer[ nOffset ], iFlags );