#include <assert.h>
#include "dbghelp_private.h"
+
+#ifndef DBGHELP_STATIC_LIB
#include <psapi.h>
-//#include "winternl.h"
#include <wine/debug.h>
+#endif
+//#include "winternl.h"
WINE_DEFAULT_DEBUG_CHANNEL(dbghelp);
if (pair->effective->is_virtual) ret = FALSE;
else switch (pair->effective->type)
{
+#ifndef DBGHELP_STATIC_LIB
case DMT_ELF:
ret = elf_load_debug_info(pair->effective);
break;
+#endif
case DMT_PE:
idslW64.SizeOfStruct = sizeof(idslW64);
idslW64.BaseOfImage = pair->effective->module.BaseOfImage;
ret ? CBA_DEFERRED_SYMBOL_LOAD_COMPLETE : CBA_DEFERRED_SYMBOL_LOAD_FAILURE,
&idslW64);
break;
+#ifndef DBGHELP_STATIC_LIB
case DMT_MACHO:
ret = macho_load_debug_info(pair->effective, NULL);
break;
+#endif
default:
ret = FALSE;
break;
/******************************************************************
* refresh_module_list
*/
+#ifndef DBGHELP_STATIC_LIB
static BOOL refresh_module_list(struct process* pcs)
{
/* force transparent ELF and Mach-O loading / unloading */
return elf_synchronize_module_list(pcs) || macho_synchronize_module_list(pcs);
}
+#endif
/***********************************************************************
* SymLoadModule (DBGHELP.@)
if (Flags & ~(SLMFLAG_VIRTUAL))
FIXME("Unsupported Flags %08x for %s\n", Flags, debugstr_w(wImageName));
+#ifndef DBGHELP_STATIC_LIB
refresh_module_list(pcs);
+#endif
/* this is a Wine extension to the API just to redo the synchronisation */
if (!wImageName && !hFile) return 0;
wImageName)
{
/* and finally an ELF or Mach-O module */
+#ifndef DBGHELP_STATIC_LIB
switch (module_get_type_by_name(wImageName))
{
case DMT_ELF:
/* Ignored */
break;
}
+#endif
}
}
if (!module)
return TRUE;
}
+#ifndef DBGHELP_STATIC_LIB
/******************************************************************
* EnumerateLoadedModules64 (DBGHELP.@)
*
return sz != 0 && i == sz;
}
+#endif /* DBGHELP_STATIC_LIB */
/******************************************************************
* SymGetModuleInfo (DBGHELP.@)
if (!(pcs = process_find_by_handle(hProcess))) return FALSE;
+#ifndef DBGHELP_STATIC_LIB
return refresh_module_list(pcs);
+#else
+ return TRUE;
+#endif
}
/***********************************************************************