1 | /************************* Module Header *******************************\ |
---|
2 | * * |
---|
3 | * Module Name: PDPUBLIC.H (new file for 180062) * |
---|
4 | * * |
---|
5 | * Process Dump public interface for DosDumpProcess API * |
---|
6 | * * |
---|
7 | * Copyright (c) International Business Machines Corporation 1997 * |
---|
8 | ************************************************************************ |
---|
9 | * Change * |
---|
10 | * |
---|
11 | * Activity Date BY Reason * |
---|
12 | * -------- ---- ---------- * |
---|
13 | * 180062 09/01/97 LRN New for DosDumpProcess and * |
---|
14 | * DosQueryRasInfo enhancements * |
---|
15 | \***********************************************************************/ |
---|
16 | |
---|
17 | //XLATOFF |
---|
18 | #ifndef __PDPUBLIC__ |
---|
19 | #define __PDPUBLIC__ |
---|
20 | |
---|
21 | #pragma pack(1) |
---|
22 | |
---|
23 | /* The following are the error return codes for DosDumpProcess */ |
---|
24 | |
---|
25 | #define ERROR_INVALID_PATHNAME 70000 |
---|
26 | #define ERROR_INVALID_PROCESSNAME 70001 |
---|
27 | #define ERROR_INVALID_ADDRRANGE 70002 |
---|
28 | #define ERROR_INVALID_SYSTEM_OPTIONS 70003 |
---|
29 | #define ERROR_INVALID_USER_OPTIONS 70004 |
---|
30 | #define ERROR_OUT_OF_FREESPACE 70005 |
---|
31 | #define ERROR_INVALID_PARAMETERS 70006 |
---|
32 | #define ERROR_UPDATE_FAILED 70007 |
---|
33 | #define ERROR_DATA_NOT_DISPLAYED 70008 |
---|
34 | #define ERROR_INVALID_LOCATION 70009 |
---|
35 | #define ERROR_INVALID_PID 70010 |
---|
36 | #define ERROR_INVALID_PROCESS 70011 |
---|
37 | #define ERROR_INVALID_NUMBER 70012 |
---|
38 | #define ERROR_PDUMP_NOT_ENABLED 70013 |
---|
39 | #define ERROR_NO_PROCESSES_FOUND 70014 |
---|
40 | #define ERROR_INTERNAL_ERROR 70015 |
---|
41 | #define ERROR_INVALID_FREESPACE 70016 |
---|
42 | #define ERROR_DUPLICATE_PARAMETER 70017 |
---|
43 | #define ERROR_NOTVALID_IN_CONFIGSYS 70018 |
---|
44 | #define ERROR_INVALID_PARENTS 70019 |
---|
45 | #define ERROR_INVALID_CHILDREN 70020 |
---|
46 | #define ERROR_INVALID_KILL 70021 |
---|
47 | #define ERROR_INVALID_UPDATE_OPTION 70022 |
---|
48 | #define ERROR_INVALID_DO_PARAMETER 70023 |
---|
49 | #define ERROR_INVALID_DO_PD_COMBINATION 70024 |
---|
50 | #define ERROR_CANT_OPEN_DUMP_FILE 70025 /* drive or directory invalid */ |
---|
51 | #define ERROR_INVALID_PADDRALL 70026 |
---|
52 | |
---|
53 | #define PACKET_DDPREQUEST_REV 1 /* 1st revision */ |
---|
54 | |
---|
55 | typedef struct _DDPREQUEST { |
---|
56 | ULONG packet_size; /* Size (in bytes) of this packet */ |
---|
57 | ULONG packet_revision_number; /* PACKET_DDPREQUEST_REV */ |
---|
58 | ULONG flags; /* See DDPREQUEST flags below */ |
---|
59 | PSZ pPathName; /* Ptr to drive letter or pathname Null terminated. */ |
---|
60 | ULONG FreeSpace; /* Amount (in KB) of free space that should remain on drive after dump is complete. */ |
---|
61 | struct _PDOPTIONS *pSystemDefaults; /* Ptr to System Defaults struct */ |
---|
62 | struct _PDOPTIONS *pUserDefaults; /* Ptr to User Defaults struct */ |
---|
63 | struct _PDPROCESS *pProcessInfo; /* Ptr to linked list of structures which describe what to dump for particular process(es) */ |
---|
64 | ULONG NumberofProcesses; /* Number of processes in the linked list pointed to by pProcessInfo. Only specified when pProcessInfo non-null. */ |
---|
65 | } DDPREQUEST; |
---|
66 | typedef DDPREQUEST *PDDREQUEST; |
---|
67 | |
---|
68 | |
---|
69 | /* Defines for Flag field (first param on DosDumpProcess). These are |
---|
70 | mutually exclusive. */ |
---|
71 | #define DDP_DISABLEPROCDUMP 0x00000000L /* Disable PD facility */ |
---|
72 | #define DDP_ENABLEPROCDUMP 0x00000001L /* Enable PD facility */ |
---|
73 | #define DDP_PERFORMPROCDUMP 0x00000002L /* Force a PD dump */ |
---|
74 | #define DDP_DDPREQUEST 0x10000000L /* New type request */ |
---|
75 | |
---|
76 | |
---|
77 | /* Defines for DDPREQUEST flags (flags field within DDPREQUEST structure */ |
---|
78 | /* DDP_DISABLEPROCDUMP, DDP_ENABLEPROCDUMP and DDP_PERFORMPROCDUMP can also be specified in the DDPREQUEST flags. */ |
---|
79 | /*#define DDP_ENABLEPROCDUMP 0x00000001L*/ /* Enable PD facility...mutually exclusive with other DDP flags except for DDP_CHANGE_FREESPACE. Can specify pPathName and/orFreeSpace (nulls will use defaults). To specify zero for FreeSpace, specify DDP_CHANGE_FREESPACE. */ |
---|
80 | /*#define DDP_PERFORMPROCDUMP 0x00000002L*/ /* Force a PD dump...mutually exclusive with other DDP flags. Must specify pProcessInfo and NumberOfProcesses. */ |
---|
81 | #define DDP_SETOPTIONS 0x00000010L /* Set options...mutually exclusive with other DDP flags except for DDP_CHANGE_FREESPACE. Used for: pPathName, FreeSpace, pSystemDefaults, pUserDefaults, pProcessInfo/NumberOfProcesses. Specify null/zeros for options you do not want to set. To set zero for FreeSpace, specify DDP_CHANGE_FREESPACE. */ |
---|
82 | #define DDP_REQDISABLEPROCDUMP 0x00000020L /* Disable PD facility...mutually exclusive with other DDP flags */ |
---|
83 | |
---|
84 | /* Any combination of these "RESET" flags which follow can be set together, but none of the following can be set when DDP_SETOPTIONS is specified. */ |
---|
85 | #define DDP_RESETSYSTEMDEFAULTS 0x00000040L /* Reset System defaults */ |
---|
86 | #define DDP_RESETUSERDEFAULTS 0x00000080L /* Reset User defaults */ |
---|
87 | #define DDP_RESETPATHNAME 0x00000100L /* Reset Pathname */ |
---|
88 | #define DDP_RESETFREESPACE 0x00000200L /* Reset Free Space */ |
---|
89 | #define DDP_RESETPROCESS 0x00000400L /* Reset Process (by name or PID) */ |
---|
90 | |
---|
91 | /* The following flag can only be used when set with DDP_ENABLEPROCDUMP and |
---|
92 | * DDP_SETOPTIONS. The value passed in FreeSpace (even if zero) will be used. |
---|
93 | * This is needed because 0 is a valid value and we need to distinguish whether |
---|
94 | * the requestor really means 0 or didn't want to change it. |
---|
95 | */ |
---|
96 | #define DDP_CHANGE_FREESPACE 0x00001000L |
---|
97 | |
---|
98 | /* Mask of reserved flags (not valid for flags field within DDPREQUEST structure) */ |
---|
99 | #define DDP_RESERVED_FLAGS 0xFFFFE80CL |
---|
100 | |
---|
101 | #define PACKET_PDOPTIONS_REV 1 /* 1st revision */ |
---|
102 | |
---|
103 | typedef struct _PDOPTIONS { |
---|
104 | ULONG packet_size; /* Size (in bytes) of this packet */ |
---|
105 | ULONG packet_revision_number; /* PACKET_PDOPTIONS_REV */ |
---|
106 | ULONG process_flags; /* See PDOPTIONS process flags below.*/ |
---|
107 | ULONG system_flags; /* See PDOPTIONS system flags below. */ |
---|
108 | struct _PDADDRRANGE *pLAddrRanges; /* Ptr to list of linear address ranges to dump. */ |
---|
109 | ULONG NumberofLAddrRanges; /* Number of LAddrRanges. */ |
---|
110 | struct _PDADDRRANGE *pPAddrRanges; /* Ptr to list of physical address ranges to dump. */ |
---|
111 | ULONG NumberofPAddrRanges; /* Number of PAddrRanges. */ |
---|
112 | ULONG options_flags; |
---|
113 | } PDOPTIONS; |
---|
114 | |
---|
115 | typedef PDOPTIONS *PPDOPTIONS; |
---|
116 | |
---|
117 | /* PDOPTIONS options_flags field */ |
---|
118 | #define PDO_UPDATEOPTIONS 0x00000001 /* Update/merge options. This flag is only valid when updating system and user defaults (pSystemDefaults and pUserDefaults).*/ |
---|
119 | |
---|
120 | |
---|
121 | //XLATON |
---|
122 | #define DDP_NONE 0x00000000 /* No bits set. */ |
---|
123 | /* PDOPTIONS process flags -- flags with a process-wide scope */ |
---|
124 | #define DDP_SUMM 0x00000001 /* Summary data */ |
---|
125 | #define DDP_PRIVATE 0x00000100 /* Process private data */ |
---|
126 | #define DDP_SHARED 0x00000200 /* Shared data for process */ |
---|
127 | #define DDP_INSTANCE 0x00000400 /* Instance data for process */ |
---|
128 | #define DDP_MVDM 0x00000800 /* MVDM data */ |
---|
129 | #define DDP_SEM 0x00001000 /* Process semaphore data */ |
---|
130 | #define DDP_USER_DEFAULTS 0x40000000 /* Include user default data */ |
---|
131 | |
---|
132 | /* Reserved process flags */ |
---|
133 | #define DDP_RESERVED_PROCESS 0xBFFFE0FE |
---|
134 | |
---|
135 | /* PDOPTIONS system flags -- flags with a system-wide scope */ |
---|
136 | #define DDP_SYSSUMM DDP_SUMM /* System summary data */ |
---|
137 | #define DDP_IDT 0x00000004 /* IDT*/ |
---|
138 | #define DDP_SYSLDR 0x00000010 /* System loader data */ |
---|
139 | #define DDP_SYSFS 0x00000020 /* System file system loader data */ |
---|
140 | #define DDP_SYSVM 0x00000040 /* System virtual memory data */ |
---|
141 | #define DDP_SYSTK 0x00000080 /* System tasking data */ |
---|
142 | #define DDP_SYSMVDM DDP_MVDM /* System MVDM data */ |
---|
143 | #define DDP_SYSSEM DDP_SEM /* System semaphore data */ |
---|
144 | #define DDP_KRHEAPS 0x00002000 /* System kernel resident heap */ |
---|
145 | #define DDP_KSHEAPS 0x00004000 /* System kernel swappable heap */ |
---|
146 | #define DDP_TRACE 0x00008000 /* System trace data */ |
---|
147 | #define DDP_STRACE 0x00010000 /* System software trace data */ |
---|
148 | #define DDP_SMP 0x00020000 /* System SMP data */ |
---|
149 | #define DDP_SYSIO 0x00040000 /* System I/O data */ |
---|
150 | #define DDP_SYSPG 0x00080000 /* System paging data */ |
---|
151 | #define DDP_SYSTEM_DEFAULTS 0x20000000 /* Include system default data */ |
---|
152 | #define DDP_PADDRALL 0x80000000 /* All physical memory PADDR(ALL) */ |
---|
153 | |
---|
154 | //XLATOFF |
---|
155 | |
---|
156 | /* Reserved system flags */ |
---|
157 | #define DDP_RESERVED_SYSTEM 0x5FF0070A |
---|
158 | |
---|
159 | /* PDUMPSYS defaults. */ |
---|
160 | #define DDP_SYS_PROC_DEFAULTS DDP_NONE /* process_flags */ |
---|
161 | #define DDP_SYS_SYSTEM_DEFAULTS DDP_SMP + DDP_SYSSUMM + DDP_IDT + DDP_SYSFS + \ |
---|
162 | DDP_SYSVM + DDP_SYSSEM + DDP_SYSPG + DDP_SYSIO + \ |
---|
163 | DDP_TRACE + DDP_STRACE + \ |
---|
164 | DDP_SYSTK /* system_flags */ |
---|
165 | /* PDUMPUSR defaults. */ |
---|
166 | #define DDP_USR_PROC_DEFAULTS DDP_SUMM + \ |
---|
167 | DDP_MVDM + DDP_SEM /* process_flags */ |
---|
168 | #define DDP_USR_SYSTEM_DEFAULTS DDP_SYSFS /* system_flags */ |
---|
169 | |
---|
170 | /* Flags set when "ALL" keyword is specified */ |
---|
171 | #define DDP_ALL_PROCESS DDP_SUMM + DDP_PRIVATE + DDP_SHARED + \ |
---|
172 | DDP_INSTANCE + DDP_MVDM + DDP_SEM |
---|
173 | #define DDP_ALL_SYSTEM DDP_SYSSUMM + DDP_IDT + DDP_SYSLDR + \ |
---|
174 | DDP_SYSFS + DDP_SYSVM + DDP_SYSTK + \ |
---|
175 | DDP_SYSMVDM + DDP_SYSSEM + DDP_KRHEAPS + \ |
---|
176 | DDP_KSHEAPS + DDP_TRACE + DDP_STRACE + \ |
---|
177 | DDP_SMP + DDP_SYSIO + DDP_SYSPG |
---|
178 | |
---|
179 | /* PDUNION is used in both the PDPROCESS and PDPROCESS2 structures. */ |
---|
180 | union _PDUNION { |
---|
181 | PID ProcId; /* Process ID. */ |
---|
182 | PSZ pProcessName; /* Ptr to a process name that can either be a short name or a qualified name(w/extension). Can also have extension of ".DLL" to dump all processes using the DLL. Must be null terminated. */ |
---|
183 | }; |
---|
184 | |
---|
185 | #define PACKET_PDPROCESS_REV 1 /* 1st revision */ |
---|
186 | |
---|
187 | typedef struct _PDPROCESS { |
---|
188 | ULONG packet_size; /* Size (in bytes) of this packet */ |
---|
189 | ULONG packet_revision_number; /* PACKET_PDPROCESS_REV */ |
---|
190 | ULONG flags; /* See PDPROCESS flags below. */ |
---|
191 | union _PDUNION Proc; |
---|
192 | struct _PDOPTIONS *pOptions; /* Pointer to dump options. */ |
---|
193 | ULONG Children; /* See "Children values" below. */ |
---|
194 | ULONG Parents; /* See "Parent values" below. */ |
---|
195 | ULONG Kill; /* See "Kill values" below. */ |
---|
196 | struct _PDPROCESS2 *pIncludeProcess; /* Ptr to structure of associated process(es) to include when this process is dumped. */ |
---|
197 | struct _PDPROCESS *pPDProcessNext; /* Ptr to next in linked list */ |
---|
198 | } PDPROCESS; |
---|
199 | typedef PDPROCESS *PPDPROCESS; |
---|
200 | |
---|
201 | /* PDPROCESS flags */ |
---|
202 | #define PDP_ALLPIDS 0x00000001 /* Dump all active processes. This is only valid when you are doing a force (DDP_PERFORMPROCDUMP). Not a valid flag for PDPROCESS2. */ |
---|
203 | #define PDP_PROCID 0x00000002 /* Structure contains a ProcId. Flag is mutually exclusive with PDP_PROCNAME. */ |
---|
204 | #define PDP_PROCNAME 0x00000004 /* Struct contains a pProcessName. Flag is mutually exclusive with PDP_PROCID.*/ |
---|
205 | #define PDP_UPDATEOPTIONS 0x00000008 /* Update/merge options with any existing options. */ |
---|
206 | /* Reserved PDProcess flags */ |
---|
207 | #define PDP_RESERVED_FLAGS 0xFFFFFFF0 |
---|
208 | |
---|
209 | /* Reserved PDProcess2 flags */ |
---|
210 | #define PDP_RESERVED_FLAGS2 0xFFFFFFF1 |
---|
211 | |
---|
212 | /* The following PDPROCESS flags are for system use only. They should not be specified on an API request. These flags are not valid for PDPROCESS2. */ |
---|
213 | #define PDP_HOTKEY 0x08000000 /* Hotkey. PDP_PROCID should also be set.*/ |
---|
214 | #define PDP_TRAP0 0x10000000 /* Ring 0 trap. */ |
---|
215 | #define PDP_TRAP3 0x20000000 /* Ring 3 (or ring 2) trap. */ |
---|
216 | #define PDP_REQ 0x40000000 /* Set by PLD_DeterminePids when request list does not have PDP_TEMP set. */ |
---|
217 | #define PDP_TEMP 0x80000000 /* This is a temporary structure which is not pointed to by the pPDProcessHeadCurrent pointer. It is used with 'force' and contains options to use when dumping. */ |
---|
218 | #define PDP_TRAP PDP_TRAP0 + PDP_TRAP3 |
---|
219 | #define PDP_SYS_MASK PDP_HOTKEY + PDP_TRAP + PDP_REQ + PDP_TEMP |
---|
220 | |
---|
221 | /* Children values -- these are mutually exclusive */ |
---|
222 | #define CHILDREN_NONE 0x00000001 /* No children will be dumped (default)*/ |
---|
223 | #define CHILDREN_ONLY 0x00000002 /* Direct children of the process(es) will be dumped. */ |
---|
224 | #define CHILDREN_GRAND 0x00000003 /* Children and grandchildren of the process(es) will be dumped. */ |
---|
225 | #define CHILDREN_ALL 0x00000004 /* All children and children of children will be dumped. */ |
---|
226 | /* Values used in validating Children */ |
---|
227 | #define CHILDREN_FIRST CHILDREN_NONE |
---|
228 | #define CHILDREN_LAST CHILDREN_ALL |
---|
229 | |
---|
230 | /* PARENT values -- these are mutually exclusive */ |
---|
231 | #define PARENTS_NONE 0x00000001 /* No parents will be dumped (default)*/ |
---|
232 | #define PARENTS_ONLY 0x00000002 /* Direct parent(s) of process(es) will be dumped. */ |
---|
233 | #define PARENTS_GRAND 0x00000003 /* Parents and grandparents of the process(es) will be dumped.*/ |
---|
234 | #define PARENTS_ALL 0x00000004 /* All parents and parents of parents will be dumped. */ |
---|
235 | /* Values used in validating Parents */ |
---|
236 | #define PARENTS_FIRST PARENTS_NONE |
---|
237 | #define PARENTS_LAST PARENTS_ALL |
---|
238 | |
---|
239 | /* KILL values -- these are mutually exclusive */ |
---|
240 | #define KILL_YES 0x00000001 /* Kill the process(es). */ |
---|
241 | #define KILL_NO 0x00000002 /* Do not kill process(es). */ |
---|
242 | |
---|
243 | #define PACKET_PDPROCESS2_REV 1 /* 1st revision */ |
---|
244 | |
---|
245 | typedef struct _PDPROCESS2 { |
---|
246 | ULONG packet_size; /* Size (in bytes) of this packet */ |
---|
247 | ULONG packet_revision_number; /* PACKET_PDPROCESS2_REV */ |
---|
248 | ULONG flags; /* See PDPROCESS flags above. Valid flags within PDPROCESS2 are: PDP_PROCID, PDP_PROCNAME, and PDP_UPDATEOPTIONS. */ |
---|
249 | union _PDUNION Proc; |
---|
250 | struct _PDOPTIONS *pOptions; /* Pointer to dump options. */ |
---|
251 | ULONG Children; /* See "Children values" above. */ |
---|
252 | ULONG Parents; /* See "Parent values" above. */ |
---|
253 | ULONG Kill; /* See "Kill values" above. */ |
---|
254 | ULONG DataOption; /* See "DataOption values" below. */ |
---|
255 | struct _PDPROCESS2 *pIncludeProcess; /* Ptr to next element of linked list. */ |
---|
256 | } PDPROCESS2; |
---|
257 | typedef PDPROCESS2 *PPDPROCESS2; |
---|
258 | |
---|
259 | /* DataOption values -- these are mutually exclusive */ |
---|
260 | #define DATA_PREVIOUS 0x00000001 /* Use data previously attached to this process. */ |
---|
261 | #define DATA_PRIMARY 0x00000002 /* Dump same data as primary process */ |
---|
262 | #define DATA_SPECIFIED 0x00000003 /* Data is specified in this structure (Options field). */ |
---|
263 | #define DATA_DEFAULTS 0x00000004 /* Use defaults. */ |
---|
264 | |
---|
265 | /* Values used in validating DataOption */ |
---|
266 | #define DATA_FIRST DATA_PREVIOUS |
---|
267 | #define DATA_LAST DATA_DEFAULTS |
---|
268 | |
---|
269 | |
---|
270 | typedef struct _PDADDRRANGE { /* Address ranges to dump */ |
---|
271 | ULONG StartAddr; /* Start of range */ |
---|
272 | ULONG EndAddr; /* End of range (inclusive) */ |
---|
273 | } PDADDRRANGE; |
---|
274 | typedef PDADDRRANGE *PPDADDRRANGE; |
---|
275 | |
---|
276 | |
---|
277 | |
---|
278 | /* The following structures are used by the DosQueryRASInfo API */ |
---|
279 | |
---|
280 | #define PACKET_DQRIREQUEST_REV 1 /* 1st revision */ |
---|
281 | #define DQRI_DQRIREQUEST 0x10000000L /* New Style request indicator */ |
---|
282 | |
---|
283 | typedef struct _DQRIREQUEST { |
---|
284 | ULONG packet_size; /* Size (in bytes) of this packet */ |
---|
285 | ULONG packet_revision_number; /* PACKET_DQRIREQUEST_REV */ |
---|
286 | ULONG flags; /* See DQRIREQUEST flags below */ |
---|
287 | ULONG buffer_size; /* Buffer size */ |
---|
288 | PBYTE buffer; /* Pointer to the buffer that will hold the returned information */ |
---|
289 | struct _DQRITRACE *pTrace; /* Ptr to System Trace info */ |
---|
290 | struct _DQRIPDUMP *pPdump; /* Ptr to PDUMP info */ |
---|
291 | struct _DQRISTRACE *pSTrace; /* Ptr to STrace info */ |
---|
292 | struct _DQRISDUMP *pSdump; /* Ptr to System Dump info */ |
---|
293 | } DQRIREQUEST; |
---|
294 | typedef DQRIREQUEST *PDQRIREQUEST; |
---|
295 | |
---|
296 | /* Defines for DQRIREQUEST flags */ |
---|
297 | #define SYSTRACE_QUERY 0x00000001L /* Query the System Trace facility */ |
---|
298 | #define PDUMP_QUERY 0x00000002L /* Query the PDUMP facility */ |
---|
299 | #define STRACE_QUERY 0x00000004L /* Query the STRACE facility */ |
---|
300 | #define SDUMP_QUERY 0x00000008L /* Query the System Dump facility */ |
---|
301 | |
---|
302 | /* Mask of reserved flags */ |
---|
303 | #define DQRI_RESERVED_FLAGS 0xFFFFFFF0L |
---|
304 | |
---|
305 | |
---|
306 | typedef struct _DQRITRACE { |
---|
307 | UCHAR flags1; /* See DQRITRACE flags1 below */ |
---|
308 | UCHAR flags2; /* See DQRITRACE flags2 below */ |
---|
309 | USHORT number_of_pids; /* Number of Pids in pPids, if tracing by PID */ |
---|
310 | ULONG optional_data_flags; /* See DQRITRACE Optional data flags below */ |
---|
311 | PBYTE addr; /* Ptr to System Trace buffer */ |
---|
312 | ULONG system_trace_buffer_size; /* Size of the Trace buffer */ |
---|
313 | struct _DQRIMAJORMINOR *pMajorMinor; /* Ptr to the Static Tracepoints */ |
---|
314 | struct _DQRIDYNAMIC *pDynamic; /* Ptr to Dynamic tracepoints */ |
---|
315 | PID *pPids; /* Ptr to list of Pids if tracing by PID */ |
---|
316 | struct _DQRINAMES *pNames; /* Ptr to the names defined as being traced */ |
---|
317 | } DQRITRACE; |
---|
318 | typedef DQRITRACE *PDQRITRACE; |
---|
319 | |
---|
320 | /* Defines for DQRITRACE flags1 */ |
---|
321 | /* These are defined in trcxport.h */ |
---|
322 | /* GST_TRCAVAIL 0x80 Not Busy */ |
---|
323 | /* GST_TRCPAUSED 0x40 Paused */ |
---|
324 | /* GST_TRCPID 0x20 bit set = Trace by PID */ |
---|
325 | /* bit reset = Trace by all PIDs */ |
---|
326 | /* GST_TRCERRCOUNT 0x10 Trace until error count reached */ |
---|
327 | /* GST_TRCSUSPEND 0x08 Trace suspended */ |
---|
328 | /* GST_TRCMINORCD 0x04 Trace by Minor code */ |
---|
329 | /* GST_TRCSYSDATA 0x02 Record optional data */ |
---|
330 | /* GST_TRCNOWRAP 0x01 Non Wrapping buffer */ |
---|
331 | |
---|
332 | /* Defines for DQRITRACE flags2 */ |
---|
333 | /* These are defined in trxxport.h */ |
---|
334 | /* GST_QUEUED 0x01 Queued Mode */ |
---|
335 | /* GST_DYNBYPASSIPI 0x02 Bypass Inter Processor */ |
---|
336 | |
---|
337 | /* Defines for DQRITRACE Optional Data flags */ |
---|
338 | /* These flags are defined in trcxport.h */ |
---|
339 | /* GST_SYSDATA_TID 0X00000020L Thread ID */ |
---|
340 | /* GST_SYSDATA_SLOT 0X00000040L Thread SLOT */ |
---|
341 | /* GST_SYSDATA_CSEIP 0X00010000L Caller's CS:EIP */ |
---|
342 | /* GST_SYSDATA_MODNAME 0X00000080L Module name */ |
---|
343 | /* GST_SYSDATA_SSESP 0X00020000L Caller's SS:ESP */ |
---|
344 | /* GST_SYSDATA_PROCID 0X00000001L Processor ID */ |
---|
345 | /* GST_SYSDATA_TSC 0X00000400L Pentium High Resolution Time-Stamp Counter */ |
---|
346 | /* GST_SYSDATA_PROCNAME 0X00000100L Short name of caller */ |
---|
347 | /* GST_SYSDATA_MAJOR 0X00000002L Extended Major code */ |
---|
348 | |
---|
349 | |
---|
350 | typedef struct _DQRIMAJORMINOR { |
---|
351 | ULONG major_code; /* Major Code - NOT USED if in the Dynamic tracepoint structure */ |
---|
352 | ULONG first_minor_code; /* First minor code in range */ |
---|
353 | ULONG last_minor_code; /* Last minor code in range */ |
---|
354 | struct _DQRIMAJORMINOR *pMajorMinorNext; /* Ptr to next record */ |
---|
355 | } DQRIMAJORMINOR; |
---|
356 | typedef DQRIMAJORMINOR *PDQRIMAJORMINOR; |
---|
357 | |
---|
358 | typedef struct _DQRIDYNAMIC { |
---|
359 | CHAR module_name[9]; /* Name of the Module (null terminated)*/ |
---|
360 | struct _DQRIDYNAMIC *pDynamicNext; /* Ptr to next record */ |
---|
361 | struct _DQRIMAJORMINOR *pMajorMinorNext; /* Ptr to Major/Minor codes for this module */ |
---|
362 | } DQRIDYNAMIC; |
---|
363 | typedef DQRIDYNAMIC *PDQRIDYNAMIC; |
---|
364 | |
---|
365 | typedef struct _DQRINAMES { |
---|
366 | char *pName; /* Ptr to the name (null terminated string) */ |
---|
367 | struct _DQRINAMES *pNamesNext; /* Ptr to next record */ |
---|
368 | } DQRINAMES; |
---|
369 | typedef DQRINAMES *PDQRINAMES; |
---|
370 | |
---|
371 | |
---|
372 | typedef struct _DQRIPDUMP { |
---|
373 | ULONG flags; /* See DQRIPDUMP flags below */ |
---|
374 | PSZ pPathName; /* Ptr to drive letter or pathname. Null terminated. */ |
---|
375 | ULONG FreeSpace; /* Amount (in KB) of free space that should remain on drive after dump is complete. */ |
---|
376 | struct _PDOPTIONS *pSystemDefaults; /* Ptr to System Defaults struct */ |
---|
377 | struct _PDOPTIONS *pUserDefaults; /* Ptr to User Defaults struct */ |
---|
378 | struct _PDPROCESS *pProcessInfo; /* Ptr to linked list of structures which describe what to dump for particular process(es)*/ |
---|
379 | } DQRIPDUMP; |
---|
380 | typedef DQRIPDUMP *PDQRIPDUMP; |
---|
381 | |
---|
382 | /* Defines for DQRIPDUMP flags */ |
---|
383 | #define DQRI_DISABLEPROCDUMP 0x00000000L /* Disabled PD facility */ |
---|
384 | #define DQRI_ENABLEPROCDUMP 0x00000001L /* Enabled PD facility */ |
---|
385 | |
---|
386 | |
---|
387 | typedef struct _DQRISTRACE { |
---|
388 | PPVOID addr; /* Pointer to STrace buffer */ |
---|
389 | ULONG Strace_buffer_size; /* Size of the Trace buffer */ |
---|
390 | ULONG Reserved1; /* Reserved for later use */ |
---|
391 | } DQRISTRACE; |
---|
392 | typedef DQRITRACE *PDQRISTRACE; |
---|
393 | |
---|
394 | |
---|
395 | typedef struct _DQRISDUMP { |
---|
396 | CHAR dump_type; /* System dump information */ |
---|
397 | CHAR dump_location; /* Where the dump will be placed. */ |
---|
398 | CHAR additional_features; /* Options available in the facility */ |
---|
399 | CHAR Reserved1; /* Reserved for later use */ |
---|
400 | ULONG kernel_data_flags; /* Special data to be collected */ |
---|
401 | } DQRISDUMP; |
---|
402 | typedef DQRISDUMP *PDQRISDUMP; |
---|
403 | |
---|
404 | /* Values for dump_type */ |
---|
405 | #define SDD_OFF 0 /* System Dump is disabled */ |
---|
406 | #define SDD_ON 1 /* System Dump is enabled */ |
---|
407 | #define SDD_R0 2 /* System Dump is enabled for Ring 0 */ |
---|
408 | |
---|
409 | /* Value for kernel_data_flags */ |
---|
410 | #define OTE_ON 0x00000001L /* RASKDATA command */ |
---|
411 | |
---|
412 | /* Values for additional_feature */ |
---|
413 | /* The following are defines in module pldinfo.h */ |
---|
414 | /*#define PLD_TAKE_SYSDUMP 0*/ /* Value for PDDumpSequence (default) */ |
---|
415 | /*#define PLD_TAKE_PROCDUMP 1*/ /* Value for PDDumpSequence */ |
---|
416 | |
---|
417 | |
---|
418 | /* These structures are used by the registered device driver for process |
---|
419 | dump*/ |
---|
420 | typedef struct _DDREPEAT { |
---|
421 | ULONG ulLinear; /* Linear address if non-zero. Physical address if zero. */ |
---|
422 | ULONG pid; /* Zero if physical addresses. Non-zero if linear addresses. */ |
---|
423 | ULONG ulStartAddr; /* Starting address. */ |
---|
424 | ULONG ulLength; /* Length of data. */ |
---|
425 | } DDREPEAT; |
---|
426 | typedef DDREPEAT *PDDREPEAT; |
---|
427 | |
---|
428 | typedef struct _DDRANGES { |
---|
429 | ULONG NumberOfEntries; /* # Entries in this structure. */ |
---|
430 | DDREPEAT Repeat; /* This section repeats NumberOfEntries times. */ |
---|
431 | } DDRANGES; |
---|
432 | |
---|
433 | typedef DDRANGES *PDDRANGES; |
---|
434 | |
---|
435 | /* PLDMAXDIRNAME is the maximum size of a directory name */ |
---|
436 | /* To this directory name, we need to allow room to concatenate the filename */ |
---|
437 | /* and the extension and the null terminator. */ |
---|
438 | /* Note: 260 is size of CCHMAXPATH defined in bsedos.h */ |
---|
439 | #define PLDMAXDIRNAME 260 - PLD_DUMPNAME_LENGTH |
---|
440 | #define PLD_DUMPNAME_LENGTH 11 /* Length of "\PDUMP.xxx" plus null */ |
---|
441 | |
---|
442 | #pragma pack() |
---|
443 | |
---|
444 | #endif |
---|