dbgmodcontainer.cpp revision de6e321f351aa489a6a62bed474390a0056e8093
/*******************************************************************************
* Header Files *
*******************************************************************************/
/*******************************************************************************
* Structures and Typedefs *
*******************************************************************************/
/**
* Symbol entry.
*/
typedef struct RTDBGMODCONTAINERSYMBOL
{
/** The address core. */
/** The name space core. */
/** The name. */
char *pszName;
/** The segent offset. */
/** The segment index. */
/** Pointer to a symbol entry in the debug info container. */
/**
* Segment entry.
*/
typedef struct RTDBGMODCONTAINERSEGMENT
{
/** The segment offset. */
/** The segment size. */
/** The segment name. */
const char *pszName;
/** Pointer to a segment entry in the debug info container. */
/**
* Instance data.
*/
typedef struct RTDBGMODCONTAINER
{
/** The name space. */
/** The address space tree. */
/** Segment table. */
/** The number of segments in the segment table. */
/** The image size. 0 means unlimited. */
/** Pointer to instance data for the debug info container. */
typedef RTDBGMODCONTAINER *PRTDBGMODCONTAINER;
/** @copydoc RTDBGMODVTDBG::pfnLineByAddr */
static DECLCALLBACK(int) rtDbgModContainer_LineByAddr(PRTDBGMODINT pMod, uint32_t iSeg, RTGCUINTPTR off, PRTGCINTPTR poffDisp, PRTDBGLINE pLine)
{
return VINF_SUCCESS;
}
/** @copydoc RTDBGMODVTDBG::pfnSymbolByAddr */
static DECLCALLBACK(int) rtDbgModContainer_SymbolByAddr(PRTDBGMODINT pMod, uint32_t iSeg, RTGCUINTPTR off, PRTGCINTPTR poffDisp, PRTDBGSYMBOL pSymbol)
{
return VINF_SUCCESS;
}
/** @copydoc RTDBGMODVTDBG::pfnSymbolByName */
static DECLCALLBACK(int) rtDbgModContainer_SymbolByName(PRTDBGMODINT pMod, const char *pszSymbol, PRTDBGSYMBOL pSymbol)
{
return VINF_SUCCESS;
}
/** @copydoc RTDBGMODVTDBG::pfnSymbolAdd */
static DECLCALLBACK(int) rtDbgModContainer_SymbolAdd(PRTDBGMODINT pMod, const char *pszSymbol, uint32_t iSeg, RTGCUINTPTR off, RTUINT cbSymbol)
{
return VINF_SUCCESS;
}
/** Destroy a symbol node. */
static DECLCALLBACK(int) rtDbgModContainer_DestroyTreeNode(PAVLRUINTPTRNODECORE pNode, void *pvUser)
{
return 0;
}
/** @copydoc RTDBGMODVTDBG::pfnClose */
{
/*
* Destroy the symbols and instance data.
*/
return VINF_SUCCESS;
}
/** @copydoc RTDBGMODVTDBG::pfnTryOpen */
{
return VERR_INTERNAL_ERROR_5;
}
/** Virtual function table for the debug info container. */
static RTDBGMODVTDBG const g_rtDbgModVtDbgContainer =
{
/*.u32Magic = */ RTDBGMODVTDBG_MAGIC,
/*.pszName = */ "container",
/*.pfnTryOpen = */ rtDbgModContainer_TryOpen,
/*.pfnClose = */ rtDbgModContainer_Close,
/*.pfnSymbolAdd = */ rtDbgModContainer_SymbolAdd,
/*.pfnSymbolByName = */ rtDbgModContainer_SymbolByName,
/*.pfnSymbolByAddr = */ rtDbgModContainer_SymbolByAddr,
/*.pfnLineByAddr = */ rtDbgModContainer_LineByAddr,
/*.u32EndMagic = */ RTDBGMODVTDBG_MAGIC
};
/**
* Creates a
*
* @returns IPRT status code.
* @param pMod The module instance.
* @param cb The module size.
*/
{
if (!pThis)
return VERR_NO_MEMORY;
return VINF_SUCCESS;
}