[TynesideLUG] Archaic programming: InvokeDebugger()
Ian Bruntlett
ian.bruntlett at gmail.com
Sat Jan 6 14:53:46 UTC 2024
Hi Casey,
Here is the really old code to drive into the debugger...
HTH,
Ian
extern void BreakPoint(void);
#pragma aux BreakPoint = 0xcc;
#if defined(__WATCOMC__)
static struct __iobuf (*pFiles)[_NFILES]= (struct __iobuf (*)[_NFILES])
__iob;
#endif
// shows if in a break point, used to co-operate with SKIPBRK.DBG
static int DBG_InBreak=0;
void InvokeDebugger(void)
{ // once the debugger is entered, use SKIPBRK to move past break point
// if you want to de-activate this function, use /OkDbg=0
static BOOLEAN OkDbg=TRUE;
// use ?/w pFiles to see array of FILE typedef'ed structs
pFiles=(struct __iobuf (*)[_NFILES])__iob;
if (FALSE!=OkDbg)
{
DBG_InBreak=1;
BreakPoint();
DBG_InBreak=0;
}
// end if
}// End InvokeDebugger
--
-- ACCU - Professionalism in programming - http://www.accu.org
-- My writing - https://sites.google.com/site/ianbruntlett/
-- Free Software page -
https://github.com/ian-bruntlett/TECH-Manuals/blob/main/tm-free-software.md
More information about the Tyneside
mailing list