From 3c0657acf22716cd41d76df23fe5cef703ffa563 Mon Sep 17 00:00:00 2001 From: pierre Date: Fri, 26 Jun 1998 08:19:08 +0000 Subject: [PATCH] + all debug in ifdef SYSTEMDEBUG + added local arrays : opennames names of opened files fileopen boolean array to know if still open usefull with gdb if you get problems about too many open files !! --- rtl/dos/go32v2/dpmiexcp.pp | 26 +++++++++++++++++--------- rtl/dos/go32v2/system.pp | 32 +++++++++++++++++++++++++++++++- 2 files changed, 48 insertions(+), 10 deletions(-) diff --git a/rtl/dos/go32v2/dpmiexcp.pp b/rtl/dos/go32v2/dpmiexcp.pp index 89e3641528..67c6f6f3be 100644 --- a/rtl/dos/go32v2/dpmiexcp.pp +++ b/rtl/dos/go32v2/dpmiexcp.pp @@ -674,7 +674,7 @@ procedure djgpp_exception_toggle; local_ex : boolean; begin -{$ifdef DEBUG} +{$ifdef SYSTEMDEBUG} if exceptions_on then begin errln('Disabling FPK exceptions'); @@ -683,7 +683,7 @@ procedure djgpp_exception_toggle; begin errln('Enabling FPK exceptions'); end; -{$endif DEBUG} +{$endif SYSTEMDEBUG} { toggle here to avoid infinite recursion } { if a subfunction calls runerror !! } exceptions_on:= not exceptions_on; @@ -724,22 +724,22 @@ procedure djgpp_exception_toggle; set_rm_interrupt(cbrk_vect,cbrk_ori); free_rm_callback(cbrk_rmcb); cbrk_hooked := false; -{$ifdef DEBUG} +{$ifdef SYSTEMDEBUG} errln('back to ori rm cbrk '+hexstr(cbrk_ori.segment,4)+':'+hexstr(longint(cbrk_ori.offset),4)); -{$endif DEBUG} +{$endif SYSTEMDEBUG} end else begin get_rm_interrupt(cbrk_vect, cbrk_ori); -{$ifdef DEBUG} +{$ifdef SYSTEMDEBUG} errln('ori rm cbrk '+hexstr(cbrk_ori.segment,4)+':'+hexstr(longint(cbrk_ori.offset),4)); -{$endif DEBUG} +{$endif SYSTEMDEBUG} get_rm_callback(djgpp_cbrk_hdlr, cbrk_regs, cbrk_rmcb); set_rm_interrupt(cbrk_vect, cbrk_rmcb); -{$ifdef DEBUG} +{$ifdef SYSTEMDEBUG} errln('now rm cbrk '+hexstr(cbrk_rmcb.segment,4)+':'+hexstr(longint(cbrk_rmcb.offset),4)); -{$endif DEBUG} +{$endif SYSTEMDEBUG} cbrk_hooked := true; end; {$endif UseRMcbrk} @@ -939,7 +939,15 @@ djgpp_exception_setup; end. { $Log$ - Revision 1.3 1998-05-31 14:18:23 peter + Revision 1.4 1998-06-26 08:19:08 pierre + + all debug in ifdef SYSTEMDEBUG + + added local arrays : + opennames names of opened files + fileopen boolean array to know if still open + usefull with gdb if you get problems about too + many open files !! + + Revision 1.3 1998/05/31 14:18:23 peter * force att or direct assembling * cleanup of some files diff --git a/rtl/dos/go32v2/system.pp b/rtl/dos/go32v2/system.pp index 8bfc26b6fb..62abb7f6d0 100644 --- a/rtl/dos/go32v2/system.pp +++ b/rtl/dos/go32v2/system.pp @@ -570,12 +570,26 @@ begin if p[i]='/' then p[i]:='\'; end; +{$ifdef SYSTEMDEBUG} + + { Keep Track of open files } + const + max_files = 50; + var + opennames : array [0..max_files-1] of pchar; + openfiles : array [0..max_files-1] of boolean; + +{$endif SYSTEMDEBUG} procedure do_close(handle : longint); var regs : trealregs; begin regs.realebx:=handle; +{$ifdef SYSTEMDEBUG} + if handle0 then begin @@ -1028,7 +1050,15 @@ Begin End. { $Log$ - Revision 1.7 1998-06-15 15:17:08 daniel + Revision 1.8 1998-06-26 08:19:10 pierre + + all debug in ifdef SYSTEMDEBUG + + added local arrays : + opennames names of opened files + fileopen boolean array to know if still open + usefull with gdb if you get problems about too + many open files !! + + Revision 1.7 1998/06/15 15:17:08 daniel * RTLLITE conditional added to produce smaller RTL.