Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/matlab/16.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Debugging dbgeng.dll中仅导出3个函数?_Debugging_Windbg - Fatal编程技术网

Debugging dbgeng.dll中仅导出3个函数?

Debugging dbgeng.dll中仅导出3个函数?,debugging,windbg,Debugging,Windbg,从一些书中,我知道dbgeng.dll是调试器的调试引擎,它导出了许多用于调试的方法 但是对于depends,我发现dbgeng.dll中只导出了3个函数(如下所示),那么像windbg.exe/cdb.exe这样的调试器如何使用dbgeng.dll呢 DebugConnect DebugConnectWide DebugCreate 我没有详细研究过这个特定的接口,但有相当多的DLL的工作原理大致相同。最有可能的是DebugCreate返回(的地址?)某种对象,该对象具有执行真正调试的所有调

从一些书中,我知道dbgeng.dll是调试器的调试引擎,它导出了许多用于调试的方法

但是对于depends,我发现dbgeng.dll中只导出了3个函数(如下所示),那么像windbg.exe/cdb.exe这样的调试器如何使用dbgeng.dll呢

DebugConnect
DebugConnectWide
DebugCreate

我没有详细研究过这个特定的接口,但有相当多的DLL的工作原理大致相同。最有可能的是
DebugCreate
返回(的地址?)某种对象,该对象具有执行真正调试的所有调用(但在真正使用它之前,您需要知道哪些函数的地址位于什么偏移量,以及在何处加载什么参数)


可以将其视为COM对象的一种模拟,但只有一个预定义接口,而不是几个具有动态查找和使用接口能力的接口。

我没有详细研究过这个特定接口,但许多DLL的工作原理大致相同。最有可能的是
DebugCreate
返回(的地址?)某种对象,该对象具有执行真正调试的所有调用(但在真正使用它之前,您需要知道哪些函数的地址位于什么偏移量,以及在何处加载什么参数)


可以将其视为COM对象的一种模拟,但只有一个预定义接口,而不是几个具有动态查找和使用接口能力的接口。

下载WinDBG并查看SDK示例,特别是dumpstk示例,该示例演示了如何打开崩溃转储文件并打印调用堆栈。Jerry正确地描述了它,您可以调用DebugCreate来创建一个IDebugClient的实例,从那里您可以创建其他类的实例来执行与调试相关的活动

从样本中:

void
CreateInterfaces(void)
{
    HRESULT Status;

    // Start things off by getting an initial interface from
    // the engine.  This can be any engine interface but is
    // generally IDebugClient as the client interface is
    // where sessions are started.
    if ((Status = DebugCreate(__uuidof(IDebugClient),
                              (void**)&g_Client)) != S_OK)
    {
        Exit(1, "DebugCreate failed, 0x%X\n", Status);
    }

    // Query for some other interfaces that we'll need.
    if ((Status = g_Client->QueryInterface(__uuidof(IDebugControl),
                                           (void**)&g_Control)) != S_OK ||
        (Status = g_Client->QueryInterface(__uuidof(IDebugSymbols),
                                           (void**)&g_Symbols)) != S_OK)
    {
        Exit(1, "QueryInterface failed, 0x%X\n", Status);
    }
}

-scott

下载WinDBG并查看SDK示例,特别是dumpstk示例,该示例演示了如何打开崩溃转储文件并打印调用堆栈。Jerry正确地描述了它,您可以调用DebugCreate来创建一个IDebugClient的实例,从那里您可以创建其他类的实例来执行与调试相关的活动

从样本中:

void
CreateInterfaces(void)
{
    HRESULT Status;

    // Start things off by getting an initial interface from
    // the engine.  This can be any engine interface but is
    // generally IDebugClient as the client interface is
    // where sessions are started.
    if ((Status = DebugCreate(__uuidof(IDebugClient),
                              (void**)&g_Client)) != S_OK)
    {
        Exit(1, "DebugCreate failed, 0x%X\n", Status);
    }

    // Query for some other interfaces that we'll need.
    if ((Status = g_Client->QueryInterface(__uuidof(IDebugControl),
                                           (void**)&g_Control)) != S_OK ||
        (Status = g_Client->QueryInterface(__uuidof(IDebugSymbols),
                                           (void**)&g_Symbols)) != S_OK)
    {
        Exit(1, "QueryInterface failed, 0x%X\n", Status);
    }
}

-斯科特

谢谢,我会看看那些样品。谢谢你提供的信息。谢谢,我会看看那些样品。谢谢你的信息。