home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / sd386v50.zip / sd386src.zip / ESP.H < prev    next >
Text File  |  1995-10-17  |  7KB  |  131 lines

  1. /*****************************************************************************/
  2. /* File:                                             IBM INTERNAL USE ONLY   */
  3. /*   esp.h                                                                917*/
  4. /*                                                                           */
  5. /* Description:                                                              */
  6. /*                                                                           */
  7. /*   Debuggee startup/queue management.                                      */
  8. /*                                                                           */
  9. /* History:                                                                  */
  10. /*                                                                           */
  11. /*   03/08/94 Created                                                        */
  12. /*                                                                           */
  13. /*****************************************************************************/
  14.  
  15. /*****************************************************************************/
  16. /* Esp Message definitions.                                                  */
  17. /*****************************************************************************/
  18. #define ESP_QMSG_END_SESSION   0        /* From the Session Manager.         */
  19. #define ESP_QMSG_NEW_SESSION   1        /* From the Session Manager.         */
  20.  
  21. #define ESP_QMSG_CTRL_BREAK      200
  22. #define ESP_QMSG_DISCONNECT      201
  23. #define ESP_QMSG_CONNECT_REQUEST 202
  24. #define ESP_QMSG_QUE_TERM        203
  25. #define ESP_QMSG_ERROR           204
  26. #define ESP_QMSG_EMPTY           205
  27. #define ESP_QMSG_NEW_PROCESS     206
  28. #define ESP_QMSG_OPEN_CONNECT    207
  29. #define ESP_QMSG_SELECT_SESSION  208
  30. #define ESP_QMSG_SELECT_ESP      209
  31. #define ESP_QMSG_PARENT_TERM     210
  32. #define ESP_QMSG_CHILD_TERM      211
  33. #define ESP_QMSG_GIVE_ACCESS     212
  34.  
  35.  
  36. /*****************************************************************************/
  37. /* - Termination que messages.                                               */
  38. /*****************************************************************************/
  39. #define ESP_TERMINATE            300
  40. #define ESP_PROBE_TERM           301
  41.  
  42. /*****************************************************************************/
  43. /* Esp run time options.                                                     */
  44. /*****************************************************************************/
  45. typedef struct _espflags
  46. {
  47.  int   Verbose       : 1;               /* trace DosDebug() calls.           */
  48.  int   IsParentEsp   : 1;               /* is this a parent probe.           */
  49.  int   UseExecPgm    : 1;               /* Use DosExecPgm for parent.     919*/
  50.  int   DebugChild    : 1;               /* Debug child process(es).       919*/
  51.  int   SingleMultiple: 1;               /* Single child or multiple.      919*/
  52.  int   DosDebugTrace : 1;               /* Trace DosDebug traffic.        919*/
  53.  int   UseDebug      : 1;               /* spawn a debugger instead of esp.  */
  54.  int   Reserved      :25;                                               /*919*/
  55. }ESP_FLAGS;
  56.  
  57. /*****************************************************************************/
  58. /* - Esp invocation parameters structure.                                    */
  59. /*****************************************************************************/
  60. typedef struct _espparms
  61. {
  62.  ESP_FLAGS EspFlags;
  63.  ULONG     ProcessID;                   /* pid this session is debugging.    */
  64.  ULONG     SessionID;                   /* sid for the pid being debugged.   */
  65.  LHANDLE   handle;                      /* com port handle inherited from    */
  66. }ESP_PARMS;
  67.  
  68. typedef struct _esprunopts
  69. {
  70.  ESP_FLAGS EspFlags;
  71.  ULONG     NameBlockSize;
  72.  char      NameBlock;
  73. }ESP_RUN_OPTS;
  74.  
  75. /*****************************************************************************/
  76. /* Structure of the termination/session queue data element. This             */
  77. /* structure is allocated in shared memory.                                  */
  78. /*****************************************************************************/
  79. typedef struct
  80. {
  81.  USHORT ChildSid;                        /* child session id.                */
  82.  USHORT ChildPid;                        /* child process id.                */
  83.  USHORT ParentSid;                       /* parent session id.               */
  84.  USHORT ParentPid;                       /* parent process id.               */
  85. }ESP_QUE_ELEMENT;                        /*                                  */
  86.  
  87. /*****************************************************************************/
  88. /* - error structure for esp error messages.                                 */
  89. /*****************************************************************************/
  90. #define MAX_QUE_ERROR_MSG_LEN 256
  91. typedef struct
  92. {
  93.  ULONG  rc;
  94.  char   ErrorMsg[MAX_QUE_ERROR_MSG_LEN];
  95. }QUE_ERR_ELEMENT;
  96.  
  97. /*****************************************************************************/
  98. /* - flag structure and defines for spawning a probe.                        */
  99. /*****************************************************************************/
  100. #define ESP_VISIBLE   0
  101. #define ESP_INVISIBLE 1
  102.  
  103. #define ESP_USE_DOSEXECPGM       0
  104. #define ESP_USE_DOSSTARTSESSION  1
  105.  
  106. typedef struct _espspawnflags
  107. {
  108.  int   Visible       : 1; /* make the probe visible or invisible when        */
  109.                           /* started with DosStartSession().                 */
  110.  int   SpawnMethod   : 1; /* use DosExecPgm() or DosStartSession() to spawn  */
  111.  int   SpawnOrigin   : 1; /* use DosExecPgm() or DosStartSession() to spawn  */
  112.  int   Reserved      :30; /* the probe.                                      */
  113. }ESP_SPAWN_FLAGS;
  114.  
  115.  
  116. /*****************************************************************************/
  117. /* - defines for SpawnOrigin. The parent probe is spawned by the parent      */
  118. /*   debugger when debugging single machine child/multiple process(es).      */
  119. /*****************************************************************************/
  120. #define ESP_SPAWN_FROM_DBG  0
  121. #define ESP_SPAWN_FROM_ESP  1
  122.  
  123. /*****************************************************************************/
  124. /* - structure defining a new process notification.                          */
  125. /*****************************************************************************/
  126. typedef struct _newpid
  127. {
  128.  struct _newpid *next;
  129.  USHORT          pid;
  130. }NEWPID;
  131.