xref: /reactos/dll/win32/dbghelp/wdbgexts.h (revision 845faec4)
1 /*
2  * File wdbgexts.h: definition of windbg extensions
3  *                  (dbghelp.dll is seen as a windbg extension)
4  *
5  * Copyright (C) 2005, Eric Pouech
6  *
7  * This library is free software; you can redistribute it and/or
8  * modify it under the terms of the GNU Lesser General Public
9  * License as published by the Free Software Foundation; either
10  * version 2.1 of the License, or (at your option) any later version.
11  *
12  * This library is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
15  * Lesser General Public License for more details.
16  *
17  * You should have received a copy of the GNU Lesser General Public
18  * License along with this library; if not, write to the Free Software
19  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
20  */
21 
22 #pragma once
23 
24 typedef struct EXT_API_VERSION
25 {
26     USHORT  MajorVersion;
27     USHORT  MinorVersion;
28     USHORT  Revision;
29     USHORT  Reserved;
30 } EXT_API_VERSION, *LPEXT_API_VERSION;
31 
32 typedef void  (*PWINDBG_OUTPUT_ROUTINE)(PCSTR, ...);
33 typedef ULONG_PTR (WINAPI *PWINDBG_GET_EXPRESSION)(PCSTR);
34 typedef void  (WINAPI *PWINDBG_GET_SYMBOL)(void*, char*, ULONG_PTR*);
35 typedef ULONG (WINAPI *PWINDBG_DISASM)(ULONG_PTR*, PCSTR, ULONG);
36 typedef ULONG (WINAPI *PWINDBG_CHECK_CONTROL_C)(void);
37 typedef ULONG (WINAPI *PWINDBG_READ_PROCESS_MEMORY_ROUTINE)(ULONG_PTR, void*, ULONG, PULONG);
38 typedef ULONG (WINAPI *PWINDBG_WRITE_PROCESS_MEMORY_ROUTINE)(ULONG_PTR, const void*, ULONG, PULONG);
39 typedef ULONG (WINAPI *PWINDBG_GET_THREAD_CONTEXT_ROUTINE)(ULONG, PCONTEXT, ULONG);
40 typedef ULONG (WINAPI *PWINDBG_SET_THREAD_CONTEXT_ROUTINE)(ULONG, PCONTEXT, ULONG);
41 typedef ULONG (WINAPI *PWINDBG_IOCTL_ROUTINE)(USHORT, void*);
42 typedef struct _EXTSTACKTRACE
43 {
44     ULONG       FramePointer;
45     ULONG       ProgramCounter;
46     ULONG       ReturnAddress;
47     ULONG       Args[4];
48 } EXTSTACKTRACE, *PEXTSTACKTRACE;
49 typedef ULONG (WINAPI *PWINDBG_STACKTRACE_ROUTINE)(ULONG, ULONG, ULONG, PEXTSTACKTRACE, ULONG);
50 
51 typedef struct _WINDBG_EXTENSION_APIS
52 {
53     ULONG                                  nSize;
54     PWINDBG_OUTPUT_ROUTINE                 lpOutputRoutine;
55     PWINDBG_GET_EXPRESSION                 lpGetExpressionRoutine;
56     PWINDBG_GET_SYMBOL                     lpGetSymbolRoutine;
57     PWINDBG_DISASM                         lpDisasmRoutine;
58     PWINDBG_CHECK_CONTROL_C                lpCheckControlCRoutine;
59     PWINDBG_READ_PROCESS_MEMORY_ROUTINE    lpReadProcessMemoryRoutine;
60     PWINDBG_WRITE_PROCESS_MEMORY_ROUTINE   lpWriteProcessMemoryRoutine;
61     PWINDBG_GET_THREAD_CONTEXT_ROUTINE     lpGetThreadContextRoutine;
62     PWINDBG_SET_THREAD_CONTEXT_ROUTINE     lpSetThreadContextRoutine;
63     PWINDBG_IOCTL_ROUTINE                  lpIoctlRoutine;
64     PWINDBG_STACKTRACE_ROUTINE             lpStackTraceRoutine;
65 } WINDBG_EXTENSION_APIS, *PWINDBG_EXTENSION_APIS;
66