[dlls/dbgeng]: add initial stub dll implementation

Volodymyr Shcherbyna volodymyr at shcherbyna.com
Fri Nov 19 03:18:39 CST 2010


Hello Alexandre,

I assume you were checking my patch (id: 68619) (
http://source.winehq.org/patches/data/68619) and marked it as "Apply
Failure".  If so, can you please double check? For the sake of the test, I
setup wine-git on another machine to see if this patch works, and it seems
to be OK. The following commands:

patch -p1 < 0001-Implementing-stub-version-of-dbgeng.dll-Debugger-Eng.txt
git add dlls/dbgeng/Makefile.in
./tools/make_makefiles
autoconf
./configure
make

properly integrate and build dbgeng in wine tree. I was following exact
guidelines from http://wiki.winehq.org/Developers-Hints , and I it seems
like the patch is OK, or I am missing something not documented on the wiki
:)

Well, I am a newbie in wine/linux, so, of course I can be wrong ...

P.S. I attach patch to this email just in case (the same patch I sent to
wine patch list).

Thanks,

-- 
avec meilleures salutations, Volodymyr
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.winehq.org/pipermail/wine-devel/attachments/20101119/852e9893/attachment.htm>
-------------- next part --------------
From 1bd3eb1aecfb21a4155b9b59aec2c2790d3f334c Mon Sep 17 00:00:00 2001
From: Volodymyr M. Shcherbyna <volodymyr at shcherbyna.com>
Date: Wed, 17 Nov 2010 21:52:49 +0100
Subject: Implementing stub version of dbgeng.dll (Debugger Engine API)
Reply-To: wine-devel <wine-devel at winehq.org>

---
 dlls/dbgeng/Makefile.in |    7 +++
 dlls/dbgeng/dbgeng.c    |  111 +++++++++++++++++++++++++++++++++++++++++++++++
 dlls/dbgeng/dbgeng.spec |    2 +
 3 files changed, 120 insertions(+), 0 deletions(-)
 create mode 100644 dlls/dbgeng/Makefile.in
 create mode 100644 dlls/dbgeng/dbgeng.c
 create mode 100644 dlls/dbgeng/dbgeng.spec

diff --git a/dlls/dbgeng/Makefile.in b/dlls/dbgeng/Makefile.in
new file mode 100644
index 0000000..07c58ab
--- /dev/null
+++ b/dlls/dbgeng/Makefile.in
@@ -0,0 +1,7 @@
+MODULE    = dbgeng.dll
+IMPORTLIB = dbgebg
+IMPORTS   = kernel
+
+C_SRCS = dbgeng.c
+
+ at MAKE_DLL_RULES@
diff --git a/dlls/dbgeng/dbgeng.c b/dlls/dbgeng/dbgeng.c
new file mode 100644
index 0000000..8461d33
--- /dev/null
+++ b/dlls/dbgeng/dbgeng.c
@@ -0,0 +1,111 @@
+/*
+ * Support for Microsoft Debugging Extension API
+ *
+ * Copyright 2010 WINE Project (http://www.winehq.org/)
+ *
+ * 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
+ */
+
+#include <stdarg.h>
+
+#include "windef.h"
+#include "winbase.h"
+#include "winternl.h"
+#include "wine/debug.h"
+
+WINE_DEFAULT_DEBUG_CHANNEL(dbgeng);
+
+/************************************************************
+*                    DebugExtensionInitialize   (DBGENG.@)
+*
+* Initialize dbgeng Engine.
+*
+* PARAMS
+*   Version   [I] Receives the version of the extension. The high 16 bits contain the major version number, and the low 16 bits contain the minor version number.
+*   Flags     [I] Set this to zero. (Reserved for future use.)
+*
+* RETURNS
+*   Success: S_OK
+*   Failure: Any other value indicates that the extension DLL was unable to initialize and the engine will unload it
+*
+* BUGS
+*   Unimplemented
+*/
+HRESULT WINAPI DebugExtensionInitialize(ULONG * Version, ULONG * Flags)
+{
+    FIXME("(%p,%p): stub\n", Version, Flags);
+    
+    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+    
+    return E_NOTIMPL;
+}
+
+/************************************************************
+*                    DebugCreate   (DBGENG.@)
+*
+* Creates a new client object and returns an interface pointer to it
+*
+* PARAMS
+*   InterfaceId   [I] Specifies the interface identifier (IID) of the desired debugger engine client interface.
+*   Interface     [I] Receives an interface pointer for the new client.
+*
+* RETURNS
+*   Success: S_OK
+*   Failure: Any other value
+*
+* BUGS
+*   Unimplemented
+*/
+HRESULT WINAPI DebugCreate(REFIID InterfaceId, PVOID *Interface)
+{
+    FIXME("(%p,%p): stub\n", InterfaceId, Interface);
+    
+    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+    
+    return E_NOTIMPL;
+}
+
+/************************************************************
+*                    DllMain   (DBGENG.@)
+*
+* Library Entry Point
+*
+* PARAMS
+*   hInstance   [I] A handle to the DLL module
+*   fdwReason   [I] The reason code that indicates why the DLL entry-point function is being called
+*   lpvReserved [I] Extended information
+*
+* RETURNS
+*   Success: TRUE (when fdwReason is DLL_PROCESS_ATTACH)
+*   Failure: FALSE (when fdwReason is DLL_PROCESS_ATTACH)
+*
+* BUGS
+*   Unimplemented
+*/
+BOOL WINAPI DllMain(HINSTANCE hInstance, DWORD fdwReason, LPVOID lpvReserved)
+{
+    BOOL bRetVal = FALSE;
+    
+    TRACE("(%p,%x,%p)\n", hInstance, fdwReason, lpvReserved);
+    
+    switch (fdwReason)
+    {
+      case DLL_PROCESS_ATTACH:
+	bRetVal = DisableThreadLibraryCalls(hInstance);
+	break;
+    }    
+    
+    return bRetVal;
+}
diff --git a/dlls/dbgeng/dbgeng.spec b/dlls/dbgeng/dbgeng.spec
new file mode 100644
index 0000000..d8ba681
--- /dev/null
+++ b/dlls/dbgeng/dbgeng.spec
@@ -0,0 +1,2 @@
+@ stdcall DebugExtensionInitialize(ptr ptr)
+@ stdcall DebugCreate(ptr ptr)
-- 
1.7.2.3


More information about the wine-devel mailing list