-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathIDebugControl3.cs
More file actions
590 lines (479 loc) · 14.7 KB
/
Copy pathIDebugControl3.cs
File metadata and controls
590 lines (479 loc) · 14.7 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
// Copyright (c) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
using System;
using System.Runtime.InteropServices;
using System.Text;
#pragma warning disable 1591
namespace Microsoft.Diagnostics.Runtime.Interop
{
[ComImport, InterfaceType(ComInterfaceType.InterfaceIsIUnknown), Guid("7df74a86-b03f-407f-90ab-a20dadcead08")]
public interface IDebugControl3 : IDebugControl2
{
/* IDebugControl */
[PreserveSig]
new int GetInterrupt();
[PreserveSig]
new int SetInterrupt(
[In] DEBUG_INTERRUPT Flags);
[PreserveSig]
new int GetInterruptTimeout(
[Out] out uint Seconds);
[PreserveSig]
new int SetInterruptTimeout(
[In] uint Seconds);
[PreserveSig]
new int GetLogFile(
[Out, MarshalAs(UnmanagedType.LPStr)] StringBuilder Buffer,
[In] int BufferSize,
[Out] out uint FileSize,
[Out, MarshalAs(UnmanagedType.Bool)] out bool Append);
[PreserveSig]
new int OpenLogFile(
[In, MarshalAs(UnmanagedType.LPStr)] string File,
[In, MarshalAs(UnmanagedType.Bool)] bool Append);
[PreserveSig]
new int CloseLogFile();
[PreserveSig]
new int GetLogMask(
[Out] out DEBUG_OUTPUT Mask);
[PreserveSig]
new int SetLogMask(
[In] DEBUG_OUTPUT Mask);
[PreserveSig]
new int Input(
[Out, MarshalAs(UnmanagedType.LPStr)] StringBuilder Buffer,
[In] int BufferSize,
[Out] out uint InputSize);
[PreserveSig]
new int ReturnInput(
[In, MarshalAs(UnmanagedType.LPStr)] string Buffer);
[PreserveSig]
new int Output(
[In] DEBUG_OUTPUT Mask,
[In, MarshalAs(UnmanagedType.LPStr)] string Format);
[PreserveSig]
new int OutputVaList( /* THIS SHOULD NEVER BE CALLED FROM C# */
[In] DEBUG_OUTPUT Mask,
[In, MarshalAs(UnmanagedType.LPStr)] string Format,
[In] IntPtr va_list_Args);
[PreserveSig]
new int ControlledOutput(
[In] DEBUG_OUTCTL OutputControl,
[In] DEBUG_OUTPUT Mask,
[In, MarshalAs(UnmanagedType.LPStr)] string Format);
[PreserveSig]
new int ControlledOutputVaList( /* THIS SHOULD NEVER BE CALLED FROM C# */
[In] DEBUG_OUTCTL OutputControl,
[In] DEBUG_OUTPUT Mask,
[In, MarshalAs(UnmanagedType.LPStr)] string Format,
[In] IntPtr va_list_Args);
[PreserveSig]
new int OutputPrompt(
[In] DEBUG_OUTCTL OutputControl,
[In, MarshalAs(UnmanagedType.LPStr)] string Format);
[PreserveSig]
new int OutputPromptVaList( /* THIS SHOULD NEVER BE CALLED FROM C# */
[In] DEBUG_OUTCTL OutputControl,
[In, MarshalAs(UnmanagedType.LPStr)] string Format,
[In] IntPtr va_list_Args);
[PreserveSig]
new int GetPromptText(
[Out, MarshalAs(UnmanagedType.LPStr)] StringBuilder Buffer,
[In] int BufferSize,
[Out] out uint TextSize);
[PreserveSig]
new int OutputCurrentState(
[In] DEBUG_OUTCTL OutputControl,
[In] DEBUG_CURRENT Flags);
[PreserveSig]
new int OutputVersionInformation(
[In] DEBUG_OUTCTL OutputControl);
[PreserveSig]
new int GetNotifyEventHandle(
[Out] out ulong Handle);
[PreserveSig]
new int SetNotifyEventHandle(
[In] ulong Handle);
[PreserveSig]
new int Assemble(
[In] ulong Offset,
[In, MarshalAs(UnmanagedType.LPStr)] string Instr,
[Out] out ulong EndOffset);
[PreserveSig]
new int Disassemble(
[In] ulong Offset,
[In] DEBUG_DISASM Flags,
[Out, MarshalAs(UnmanagedType.LPStr)] StringBuilder Buffer,
[In] int BufferSize,
[Out] out uint DisassemblySize,
[Out] out ulong EndOffset);
[PreserveSig]
new int GetDisassembleEffectiveOffset(
[Out] out ulong Offset);
[PreserveSig]
new int OutputDisassembly(
[In] DEBUG_OUTCTL OutputControl,
[In] ulong Offset,
[In] DEBUG_DISASM Flags,
[Out] out ulong EndOffset);
[PreserveSig]
new int OutputDisassemblyLines(
[In] DEBUG_OUTCTL OutputControl,
[In] uint PreviousLines,
[In] uint TotalLines,
[In] ulong Offset,
[In] DEBUG_DISASM Flags,
[Out] out uint OffsetLine,
[Out] out ulong StartOffset,
[Out] out ulong EndOffset,
[Out, MarshalAs(UnmanagedType.LPArray)] ulong[] LineOffsets);
[PreserveSig]
new int GetNearInstruction(
[In] ulong Offset,
[In] int Delta,
[Out] out ulong NearOffset);
[PreserveSig]
new int GetStackTrace(
[In] ulong FrameOffset,
[In] ulong StackOffset,
[In] ulong InstructionOffset,
[Out, MarshalAs(UnmanagedType.LPArray)] DEBUG_STACK_FRAME[] Frames,
[In] int FrameSize,
[Out] out uint FramesFilled);
[PreserveSig]
new int GetReturnOffset(
[Out] out ulong Offset);
[PreserveSig]
new int OutputStackTrace(
[In] DEBUG_OUTCTL OutputControl,
[In, MarshalAs(UnmanagedType.LPArray)] DEBUG_STACK_FRAME[] Frames,
[In] int FramesSize,
[In] DEBUG_STACK Flags);
[PreserveSig]
new int GetDebuggeeType(
[Out] out DEBUG_CLASS Class,
[Out] out DEBUG_CLASS_QUALIFIER Qualifier);
[PreserveSig]
new int GetActualProcessorType(
[Out] out IMAGE_FILE_MACHINE Type);
[PreserveSig]
new int GetExecutingProcessorType(
[Out] out IMAGE_FILE_MACHINE Type);
[PreserveSig]
new int GetNumberPossibleExecutingProcessorTypes(
[Out] out uint Number);
[PreserveSig]
new int GetPossibleExecutingProcessorTypes(
[In] uint Start,
[In] uint Count,
[Out, MarshalAs(UnmanagedType.LPArray)] IMAGE_FILE_MACHINE[] Types);
[PreserveSig]
new int GetNumberProcessors(
[Out] out uint Number);
[PreserveSig]
new int GetSystemVersion(
[Out] out uint PlatformId,
[Out] out uint Major,
[Out] out uint Minor,
[Out, MarshalAs(UnmanagedType.LPStr)] StringBuilder ServicePackString,
[In] int ServicePackStringSize,
[Out] out uint ServicePackStringUsed,
[Out] out uint ServicePackNumber,
[Out, MarshalAs(UnmanagedType.LPStr)] StringBuilder BuildString,
[In] int BuildStringSize,
[Out] out uint BuildStringUsed);
[PreserveSig]
new int GetPageSize(
[Out] out uint Size);
[PreserveSig]
new int IsPointer64Bit();
[PreserveSig]
new int ReadBugCheckData(
[Out] out uint Code,
[Out] out ulong Arg1,
[Out] out ulong Arg2,
[Out] out ulong Arg3,
[Out] out ulong Arg4);
[PreserveSig]
new int GetNumberSupportedProcessorTypes(
[Out] out uint Number);
[PreserveSig]
new int GetSupportedProcessorTypes(
[In] uint Start,
[In] uint Count,
[Out, MarshalAs(UnmanagedType.LPArray)] IMAGE_FILE_MACHINE[] Types);
[PreserveSig]
new int GetProcessorTypeNames(
[In] IMAGE_FILE_MACHINE Type,
[Out, MarshalAs(UnmanagedType.LPStr)] StringBuilder FullNameBuffer,
[In] int FullNameBufferSize,
[Out] out uint FullNameSize,
[Out, MarshalAs(UnmanagedType.LPStr)] StringBuilder AbbrevNameBuffer,
[In] int AbbrevNameBufferSize,
[Out] out uint AbbrevNameSize);
[PreserveSig]
new int GetEffectiveProcessorType(
[Out] out IMAGE_FILE_MACHINE Type);
[PreserveSig]
new int SetEffectiveProcessorType(
[In] IMAGE_FILE_MACHINE Type);
[PreserveSig]
new int GetExecutionStatus(
[Out] out DEBUG_STATUS Status);
[PreserveSig]
new int SetExecutionStatus(
[In] DEBUG_STATUS Status);
[PreserveSig]
new int GetCodeLevel(
[Out] out DEBUG_LEVEL Level);
[PreserveSig]
new int SetCodeLevel(
[In] DEBUG_LEVEL Level);
[PreserveSig]
new int GetEngineOptions(
[Out] out DEBUG_ENGOPT Options);
[PreserveSig]
new int AddEngineOptions(
[In] DEBUG_ENGOPT Options);
[PreserveSig]
new int RemoveEngineOptions(
[In] DEBUG_ENGOPT Options);
[PreserveSig]
new int SetEngineOptions(
[In] DEBUG_ENGOPT Options);
[PreserveSig]
new int GetSystemErrorControl(
[Out] out ERROR_LEVEL OutputLevel,
[Out] out ERROR_LEVEL BreakLevel);
[PreserveSig]
new int SetSystemErrorControl(
[In] ERROR_LEVEL OutputLevel,
[In] ERROR_LEVEL BreakLevel);
[PreserveSig]
new int GetTextMacro(
[In] uint Slot,
[Out, MarshalAs(UnmanagedType.LPStr)] StringBuilder Buffer,
[In] int BufferSize,
[Out] out uint MacroSize);
[PreserveSig]
new int SetTextMacro(
[In] uint Slot,
[In, MarshalAs(UnmanagedType.LPStr)] string Macro);
[PreserveSig]
new int GetRadix(
[Out] out uint Radix);
[PreserveSig]
new int SetRadix(
[In] uint Radix);
[PreserveSig]
new int Evaluate(
[In, MarshalAs(UnmanagedType.LPStr)] string Expression,
[In] DEBUG_VALUE_TYPE DesiredType,
[Out] out DEBUG_VALUE Value,
[Out] out uint RemainderIndex);
[PreserveSig]
new int CoerceValue(
[In] DEBUG_VALUE In,
[In] DEBUG_VALUE_TYPE OutType,
[Out] out DEBUG_VALUE Out);
[PreserveSig]
new int CoerceValues(
[In] uint Count,
[In, MarshalAs(UnmanagedType.LPArray)] DEBUG_VALUE[] In,
[In, MarshalAs(UnmanagedType.LPArray)] DEBUG_VALUE_TYPE[] OutType,
[Out, MarshalAs(UnmanagedType.LPArray)] DEBUG_VALUE[] Out);
[PreserveSig]
new int Execute(
[In] DEBUG_OUTCTL OutputControl,
[In, MarshalAs(UnmanagedType.LPStr)] string Command,
[In] DEBUG_EXECUTE Flags);
[PreserveSig]
new int ExecuteCommandFile(
[In] DEBUG_OUTCTL OutputControl,
[In, MarshalAs(UnmanagedType.LPStr)] string CommandFile,
[In] DEBUG_EXECUTE Flags);
[PreserveSig]
new int GetNumberBreakpoints(
[Out] out uint Number);
[PreserveSig]
new int GetBreakpointByIndex(
[In] uint Index,
[Out, MarshalAs(UnmanagedType.Interface)] out IDebugBreakpoint bp);
[PreserveSig]
new int GetBreakpointById(
[In] uint Id,
[Out, MarshalAs(UnmanagedType.Interface)] out IDebugBreakpoint bp);
[PreserveSig]
new int GetBreakpointParameters(
[In] uint Count,
[In, MarshalAs(UnmanagedType.LPArray)] uint[] Ids,
[In] uint Start,
[Out, MarshalAs(UnmanagedType.LPArray)] DEBUG_BREAKPOINT_PARAMETERS[] Params);
[PreserveSig]
new int AddBreakpoint(
[In] DEBUG_BREAKPOINT_TYPE Type,
[In] uint DesiredId,
[Out, MarshalAs(UnmanagedType.Interface)] out IDebugBreakpoint Bp);
[PreserveSig]
new int RemoveBreakpoint(
[In, MarshalAs(UnmanagedType.Interface)] IDebugBreakpoint Bp);
[PreserveSig]
new int AddExtension(
[In, MarshalAs(UnmanagedType.LPStr)] string Path,
[In] uint Flags,
[Out] out ulong Handle);
[PreserveSig]
new int RemoveExtension(
[In] ulong Handle);
[PreserveSig]
new int GetExtensionByPath(
[In, MarshalAs(UnmanagedType.LPStr)] string Path,
[Out] out ulong Handle);
[PreserveSig]
new int CallExtension(
[In] ulong Handle,
[In, MarshalAs(UnmanagedType.LPStr)] string Function,
[In, MarshalAs(UnmanagedType.LPStr)] string Arguments);
[PreserveSig]
new int GetExtensionFunction(
[In] ulong Handle,
[In, MarshalAs(UnmanagedType.LPStr)] string FuncName,
[Out] out IntPtr Function);
[PreserveSig]
new int GetWindbgExtensionApis32(
[In, Out] ref WINDBG_EXTENSION_APIS Api);
/* Must be In and Out as the nSize member has to be initialized */
[PreserveSig]
new int GetWindbgExtensionApis64(
[In, Out] ref WINDBG_EXTENSION_APIS Api);
/* Must be In and Out as the nSize member has to be initialized */
[PreserveSig]
new int GetNumberEventFilters(
[Out] out uint SpecificEvents,
[Out] out uint SpecificExceptions,
[Out] out uint ArbitraryExceptions);
[PreserveSig]
new int GetEventFilterText(
[In] uint Index,
[Out, MarshalAs(UnmanagedType.LPStr)] StringBuilder Buffer,
[In] int BufferSize,
[Out] out uint TextSize);
[PreserveSig]
new int GetEventFilterCommand(
[In] uint Index,
[Out, MarshalAs(UnmanagedType.LPStr)] StringBuilder Buffer,
[In] int BufferSize,
[Out] out uint CommandSize);
[PreserveSig]
new int SetEventFilterCommand(
[In] uint Index,
[In, MarshalAs(UnmanagedType.LPStr)] string Command);
[PreserveSig]
new int GetSpecificFilterParameters(
[In] uint Start,
[In] uint Count,
[Out, MarshalAs(UnmanagedType.LPArray)] DEBUG_SPECIFIC_FILTER_PARAMETERS[] Params);
[PreserveSig]
new int SetSpecificFilterParameters(
[In] uint Start,
[In] uint Count,
[In, MarshalAs(UnmanagedType.LPArray)] DEBUG_SPECIFIC_FILTER_PARAMETERS[] Params);
[PreserveSig]
new int GetSpecificEventFilterArgument(
[In] uint Index,
[Out, MarshalAs(UnmanagedType.LPStr)] StringBuilder Buffer,
[In] int BufferSize,
[Out] out uint ArgumentSize);
[PreserveSig]
new int SetSpecificEventFilterArgument(
[In] uint Index,
[In, MarshalAs(UnmanagedType.LPStr)] string Argument);
[PreserveSig]
new int GetExceptionFilterParameters(
[In] uint Count,
[In, MarshalAs(UnmanagedType.LPArray)] uint[] Codes,
[In] uint Start,
[Out, MarshalAs(UnmanagedType.LPArray)] DEBUG_EXCEPTION_FILTER_PARAMETERS[] Params);
[PreserveSig]
new int SetExceptionFilterParameters(
[In] uint Count,
[In, MarshalAs(UnmanagedType.LPArray)] DEBUG_EXCEPTION_FILTER_PARAMETERS[] Params);
[PreserveSig]
new int GetExceptionFilterSecondCommand(
[In] uint Index,
[Out, MarshalAs(UnmanagedType.LPStr)] StringBuilder Buffer,
[In] int BufferSize,
[Out] out uint CommandSize);
[PreserveSig]
new int SetExceptionFilterSecondCommand(
[In] uint Index,
[In, MarshalAs(UnmanagedType.LPStr)] string Command);
[PreserveSig]
new int WaitForEvent(
[In] DEBUG_WAIT Flags,
[In] uint Timeout);
[PreserveSig]
new int GetLastEventInformation(
[Out] out DEBUG_EVENT Type,
[Out] out uint ProcessId,
[Out] out uint ThreadId,
[In] IntPtr ExtraInformation,
[In] uint ExtraInformationSize,
[Out] out uint ExtraInformationUsed,
[Out, MarshalAs(UnmanagedType.LPStr)] StringBuilder Description,
[In] int DescriptionSize,
[Out] out uint DescriptionUsed);
/* IDebugControl3 */
[PreserveSig]
int GetAssemblyOptions(
[Out] out DEBUG_ASMOPT Options);
[PreserveSig]
int AddAssemblyOptions(
[In] DEBUG_ASMOPT Options);
[PreserveSig]
int RemoveAssemblyOptions(
[In] DEBUG_ASMOPT Options);
[PreserveSig]
int SetAssemblyOptions(
[In] DEBUG_ASMOPT Options);
[PreserveSig]
int GetExpressionSyntax(
[Out] out DEBUG_EXPR Flags);
[PreserveSig]
int SetExpressionSyntax(
[In] DEBUG_EXPR Flags);
[PreserveSig]
int SetExpressionSyntaxByName(
[In, MarshalAs(UnmanagedType.LPStr)] string AbbrevName);
[PreserveSig]
int GetNumberExpressionSyntaxes(
[Out] out uint Number);
[PreserveSig]
int GetExpressionSyntaxNames(
[In] uint Index,
[Out, MarshalAs(UnmanagedType.LPStr)] StringBuilder FullNameBuffer,
[In] int FullNameBufferSize,
[Out] out uint FullNameSize,
[Out, MarshalAs(UnmanagedType.LPStr)] StringBuilder AbbrevNameBuffer,
[In] int AbbrevNameBufferSize,
[Out] out uint AbbrevNameSize);
[PreserveSig]
int GetNumberEvents(
[Out] out uint Events);
[PreserveSig]
int GetEventIndexDescription(
[In] uint Index,
[In] DEBUG_EINDEX Which,
[Out, MarshalAs(UnmanagedType.LPStr)] StringBuilder Buffer,
[In] int BufferSize,
[Out] out uint DescSize);
[PreserveSig]
int GetCurrentEventIndex(
[Out] out uint Index);
[PreserveSig]
int SetNextEventIndex(
[In] DEBUG_EINDEX Relation,
[In] uint Value,
[Out] out uint NextIndex);
}
}