Skip to main content
GameDev.net gamedev.net
🔒 Locked

Detecting Debugger

Started by Mayrel Dec 6, 2001 at 7:25 AM 4 replies 400+ views
Original Post
Mayrel
Mayrel
Hullo. I''m doing some development in OpenGL on a Voodoo, which, if I''m running fullscreen, makes it impossible to debug my program. What I''d like to do is to detect if my program is running in debug mode (not just if it was compiled under a debug-enabled configuration) and run in a window in that case. I know some games can detect debuggers (to make it difficult for crackers to crack), so I know it''s possible. Sadly, searching on google only revealed a handful of pages about cracking.
Just Plain Wrong
S1CA
S1CA
BOOL IsDebuggerPresent(VOID); in Windows.h/WinBase.h

Quite obvious really



For Kernel level debuggers such as SoftIce (which sits underneath Windows so can be quite stealthy) it''s more difficult. Search the web for "meltice+softice" to get some code and descriptions of methods for detecting SoftIce.

Of course the crackers have already got around that with things like FrogsIce.

--
Simon O''''Connor
Creative Asylum Ltd
www.creative-asylum.com
Simon O'Connor | Technical Director (Newcastle) Lockwood Publishing | LinkedIn | Personal site
a person
a person
if you got a second pc you can use winvnc(http://www.uk.research.att.com/vnc/winvnc.html) since you can view the desktop (if your dont make youre app cover the desktop) even though the voodoo(1/2) has control of what is displayed on the moniter. be forewarned it can be a bit slow since the video data is sent over the lan, but its not unusable.

also look on google for the winglide drivers (dont have the sute bookmarked since i have not needed them for a long time) which allow voodoo(1/2) (voodoo3+ supports windowed modes) to support windowed mode rendering at a performance hit. (you are debugging so it should not matter). also becarful with them since some the video is not as accurate as it would be without using it.

and now rereading your post i see you have a voodoo capable of windowed rendering, heh. ignore the previous stuff unless you are interested in it since it is still quite useful.

why detect the debugger, just make it an option to switch to windowed mode. heck when i debug i let it run fullscreen but not have it as an always on top window so that the debugger can be in front of the render window (well i works well in dx, but i am sure you can do the same thing in gl).

are you coding this to foil others to debug your game (if so forget it, dont waste your time) or just that you really want your program to switch to windowed mode when debuggers are presnet to make it easier for you to debug?
Mayrel
Mayrel
quote:
Original post by a person
are you coding this to foil others to debug your game (if so forget it, dont waste your time) or just that you really want your program to switch to windowed mode when debuggers are presnet to make it easier for you to debug?



Others may feel free to debug my game. I make free software, so they''ll have the source anyway.

The problem I have is that when my Voodoo4 (and, I assume, all Voodoo4s) enters fullscreen accelerated mode, Windows can''t use the screen, so I can''t see the debugger. The only trouble with windowed mode is that the Voodoo isn''t accelerated, despite what people tell me to the contrary. If it was accelerated, I''d be happy to run it in windowed mode all the time (although, naturally, people would still have the choice of fullscreen).



Just Plain Wrong
Mayrel
Mayrel
quote:
Original post by S1CA
BOOL IsDebuggerPresent(VOID); in Windows.h/WinBase.h



Sometimes google is really helpful, others it''s a complete waste of time.



Just Plain Wrong
a person
a person
what color depth are you running? i am pretty sure you need to run 16bit to get acceleration. also try the latest drivers for your card (yes their was a release about a month ago) which might help. i think the main problem is that voodoo4s dont support muliwindow rendering. also look into the mesa drivers.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.