home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / emxtutor.zip / emxsrcd1.zip / emx / src / pmgdb / pmdebug.h < prev    next >
C/C++ Source or Header  |  1996-08-04  |  2KB  |  50 lines

  1. /* pmdebug.h -*- C++ -*-
  2.    Copyright (c) 1996 Eberhard Mattes
  3.  
  4. This file is part of pmgdb.
  5.  
  6. pmgdb is free software; you can redistribute it and/or modify
  7. it under the terms of the GNU General Public License as published by
  8. the Free Software Foundation; either version 2, or (at your option)
  9. any later version.
  10.  
  11. pmgdb is distributed in the hope that it will be useful,
  12. but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  14. GNU General Public License for more details.
  15.  
  16. You should have received a copy of the GNU General Public License
  17. along with pmgdb; see the file COPYING.  If not, write to
  18. the Free Software Foundation, 59 Temple Place - Suite 330,
  19. Boston, MA 02111-1307, USA.  */
  20.  
  21.  
  22. // Important: All member functions of pmdebug must be called in a
  23. // thread that has a message queue.  Moreover, thread 1 must have
  24. // a message queue (DosExitList!)
  25.  
  26. class pmdebug
  27. {
  28. public:
  29.   enum mode { off, sync, async };
  30.  
  31.   pmdebug ();
  32.   ~pmdebug ();
  33.   void set_mode (mode new_mode, HWND hwnd, int pid = 0);
  34.   mode get_mode () const { return cur_mode; }
  35.   void start ();                // About to start debuggee
  36.   void stop ();                 // Debuggee stopped
  37.   void term ();                 // Debuggee terminated
  38.   void set_pid (int in_pid) { pid = in_pid; }
  39.   void set_window (HWND hwnd) { hwndLock = hwnd; }
  40.   void exit ();
  41.  
  42. private:
  43.   mode cur_mode;
  44.   bool locked;
  45.   HWND hwndLock;
  46.   int pid;
  47. };
  48.  
  49. extern pmdebug pmdbg;
  50.