[Search for users] [Overall Top Noters] [List of all Conferences] [Download this site]

Conference noted::hackers_v1

Title:-={ H A C K E R S }=-
Notice:Write locked - see NOTED::HACKERS
Moderator:DIEHRD::MORRIS
Created:Thu Feb 20 1986
Last Modified:Mon Aug 03 1992
Last Successful Update:Fri Jun 06 1997
Number of topics:680
Total number of notes:5456

76.0. "Hacking With DEBUG" by VAXUUM::DYER () Mon Nov 19 1984 17:44

	The following is from VAXWRK""::SYS$NOTES:VMSNOTES.  It describes a way
to tell if the program being run is using the debugger or not.  Of interest to
us, though, are the points raised in the last paragraph.
	Anyone up to the challenge?
		<_Jym_>

-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

  RANI::LEICHTERJ         VMSnotes - VMS Related Info        14-OCT-1984 09:26  
  Note #433.1                -{ Detecting DEBUG }-                     1 of 12  

I don't believe there is any supported way to do this.  Hackery that will
work is pretty simple, though:  The debugger establishes primary and last-chance
exception vectors in user mode.  You can use a $SETEXV to look at the vectors.
I don't know what you would expect to see, but I'd guess 0 if non-DEBUG, non-0
is DEBUG.

Of course, this tells you nothing about the actual state DEBUG is in - it may
not actually be doing anything noticeable.

I love it, though - a way to design programs that show bugs when run without
the debugger, work fine when you add the debugger.  Great for driving program-
mers nuts.  Used to be, these babies were few and far between, and found as a
matter of luck.  Now, we can build them to spec.
							-- Jerry

-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
T.RTitleUserPersonal
Name
DateLines