delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1994/12/15/14:30:34

From: Charles Sandmann <sandmann AT new-orleans DOT NeoSoft DOT com>
Subject: Re: Am I being debugged?
To: eliz AT is DOT elta DOT co DOT il (Eli Zaretskii)
Date: Thu, 15 Dec 1994 08:01:25 -0600 (CST)
Cc: lederman AT dstc DOT qut DOT edu DOT au, djgpp AT sun DOT soe DOT clarkson DOT edu

> >   Anyone have any ideas on how a program might discover whether it was
> >    invoked normally or via "go32 -d gdb ..."
> 
> Try looking at the original PSP of the invoked program.  Its
> address is one of the fields of the _go32_info_block variable
> declared on <go32.h>.  I didn't try this, but the command line
> tail in there just might still hold the original command line
> used to invoke your program.

I don't think this will work in V2 since the debuggers are separate
standalone programs, and the debugged program gets its own PSP image
which does not include the debugger command args.  But in V2, the
debugger gets the exceptions before the program exception handler
executes, which may change the need for this?

- Raw text -


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