From 099cfeaac84566f83fb8919a37b7351eb78d3f1c Mon Sep 17 00:00:00 2001 From: Eric Pouech Date: Tue, 20 Dec 2005 11:49:24 +0100 Subject: [PATCH] dbghelp: Added a few extensions to make windbg happy. --- dlls/dbghelp/dbghelp.c | 18 ++++++++++++++ dlls/dbghelp/dbghelp.spec | 8 +++--- dlls/dbghelp/wdbgexts.h | 63 +++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 86 insertions(+), 3 deletions(-) create mode 100644 dlls/dbghelp/wdbgexts.h diff --git a/dlls/dbghelp/dbghelp.c b/dlls/dbghelp/dbghelp.c index 3ebc7c3f760..94bb0e1ad86 100644 --- a/dlls/dbghelp/dbghelp.c +++ b/dlls/dbghelp/dbghelp.c @@ -24,6 +24,7 @@ #include "winerror.h" #include "psapi.h" #include "wine/debug.h" +#include "wdbgexts.h" WINE_DEFAULT_DEBUG_CHANNEL(dbghelp); @@ -371,3 +372,20 @@ LPAPI_VERSION WINAPI ImagehlpApiVersionEx(LPAPI_VERSION AppVersion) return AppVersion; } + +/****************************************************************** + * ExtensionApiVersion (DBGHELP.@) + */ +LPEXT_API_VERSION WINAPI ExtensionApiVersion(void) +{ + static EXT_API_VERSION eav = {5, 5, 5, 0}; + return &eav; +} + +/****************************************************************** + * WinDbgExtensionDllInit (DBGHELP.@) + */ +void WINAPI WinDbgExtensionDllInit(PWINDBG_EXTENSION_APIS lpExtensionApis, + unsigned short major, unsigned short minor) +{ +} diff --git a/dlls/dbghelp/dbghelp.spec b/dlls/dbghelp/dbghelp.spec index 9a0820ec119..0d7106b0661 100644 --- a/dlls/dbghelp/dbghelp.spec +++ b/dlls/dbghelp/dbghelp.spec @@ -3,7 +3,7 @@ @ stdcall EnumDirTree(long str str ptr ptr ptr) @ stub EnumerateLoadedModules64 @ stdcall EnumerateLoadedModules(long ptr ptr) -@ stub ExtensionApiVersion +@ stdcall ExtensionApiVersion() @ stdcall FindDebugInfoFile(str str ptr) @ stdcall FindDebugInfoFileEx(str str ptr ptr ptr) @ stdcall FindExecutableImage(str str str) @@ -98,12 +98,14 @@ @ stdcall SymUnloadModule(long long) @ stdcall UnDecorateSymbolName(str str long long) @ stdcall UnmapDebugInformation(ptr) -@ stub WinDbgExtensionDllInit -@ stub dbghelp +@ stdcall WinDbgExtensionDllInit(ptr long long) +#@ stub dbghelp #@ stub dh +#@ stub fptr #@ stub lm #@ stub lmi #@ stub omap #@ stub srcfiles #@ stub sym +#@ stub symsvr #@ stub vc7fpo diff --git a/dlls/dbghelp/wdbgexts.h b/dlls/dbghelp/wdbgexts.h new file mode 100644 index 00000000000..d8168d7ce1c --- /dev/null +++ b/dlls/dbghelp/wdbgexts.h @@ -0,0 +1,63 @@ +/* + * File wdbgexts.h: definition of windbg extensions + * (dbghelp.dll is seen as a windbg extension) + * + * Copyright (C) 2005, Eric Pouech + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +typedef struct EXT_API_VERSION +{ + USHORT MajorVersion; + USHORT MinorVersion; + USHORT Revision; + USHORT Reserved; +} EXT_API_VERSION, *LPEXT_API_VERSION; + +typedef void (*PWINDBG_OUTPUT_ROUTINE)(PCSTR, ...); +typedef ULONG_PTR (WINAPI *PWINDBG_GET_EXPRESSION)(PCSTR); +typedef void (WINAPI *PWINDBG_GET_SYMBOL)(void*, char*, ULONG_PTR*); +typedef ULONG (WINAPI *PWINDBG_DISASM)(ULONG_PTR*, PCSTR, ULONG); +typedef ULONG (WINAPI *PWINDBG_CHECK_CONTROL_C)(void); +typedef ULONG (WINAPI *PWINDBG_READ_PROCESS_MEMORY_ROUTINE)(ULONG_PTR, void*, ULONG, PULONG); +typedef ULONG (WINAPI *PWINDBG_WRITE_PROCESS_MEMORY_ROUTINE)(ULONG_PTR, const void*, ULONG, PULONG); +typedef ULONG (WINAPI *PWINDBG_GET_THREAD_CONTEXT_ROUTINE)(ULONG, PCONTEXT, ULONG); +typedef ULONG (WINAPI *PWINDBG_SET_THREAD_CONTEXT_ROUTINE)(ULONG, PCONTEXT, ULONG); +typedef ULONG (WINAPI *PWINDBG_IOCTL_ROUTINE)(USHORT, void*); +typedef struct _EXTSTACKTRACE +{ + ULONG FramePointer; + ULONG ProgramCounter; + ULONG ReturnAddress; + ULONG Args[4]; +} EXTSTACKTRACE, *PEXTSTACKTRACE; +typedef ULONG (WINAPI *PWINDBG_STACKTRACE_ROUTINE)(ULONG, ULONG, ULONG, PEXTSTACKTRACE, ULONG); + +typedef struct _WINDBG_EXTENSION_APIS +{ + ULONG nSize; + PWINDBG_OUTPUT_ROUTINE lpOutputRoutine; + PWINDBG_GET_EXPRESSION lpGetExpressionRoutine; + PWINDBG_GET_SYMBOL lpGetSymbolRoutine; + PWINDBG_DISASM lpDisasmRoutine; + PWINDBG_CHECK_CONTROL_C lpCheckControlCRoutine; + PWINDBG_READ_PROCESS_MEMORY_ROUTINE lpReadProcessMemoryRoutine; + PWINDBG_WRITE_PROCESS_MEMORY_ROUTINE lpWriteProcessMemoryRoutine; + PWINDBG_GET_THREAD_CONTEXT_ROUTINE lpGetThreadContextRoutine; + PWINDBG_SET_THREAD_CONTEXT_ROUTINE lpSetThreadContextRoutine; + PWINDBG_IOCTL_ROUTINE lpIoctlRoutine; + PWINDBG_STACKTRACE_ROUTINE lpStackTraceRoutine; +} WINDBG_EXTENSION_APIS, *PWINDBG_EXTENSION_APIS; -- 2.11.4.GIT