www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2002/09/14/11:53:32

Date: Sat, 14 Sep 2002 17:53:06 +0200 (MET DST)
From: Gisle Vanem <giva AT bgnett DOT no>
To: djgpp AT delorie DOT com
Subject: Detecting debugger
Message-ID: <Pine.UW2.3.95.1020914174437.4257A-100000@bryggen.bgnett.no>
MIME-Version: 1.0
Reply-To: djgpp AT delorie DOT com

Hi,

I have a strange situation where running a program under a debugger
(RHIDE or GDB) will hang the debugger on the call to a particular
function. So I need to prevent calling this function when the program
is a debugee. How do I detect running under a debugger?

For the record, here is that function:

static inline void Wait (void)   /* wait until timer changes */
{
  unsigned long t = _farpeekl (_dos_ds,0x46C);
  while (_farpeekl(_dos_ds,0x46C) == t)
        ((void)0);
}


Gisle V.

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019