Commit 026ec7f6 authored by Eric Pouech's avatar Eric Pouech Committed by Alexandre Julliard

dbghelp: Do all module and symbol names matching using unicode string (and new…

dbghelp: Do all module and symbol names matching using unicode string (and new regular expression matcher).
parent be9a7b9b
......@@ -357,8 +357,6 @@ struct module
{
struct process* process;
IMAGEHLP_MODULEW64 module;
/* ANSI copy of module.ModuleName for efficiency */
char module_name[MAX_PATH];
struct module* next;
enum module_type type : 16;
unsigned short is_virtual : 1;
......@@ -624,6 +622,7 @@ extern DWORD64 sw_module_base(struct cpu_stack_walk* csw, DWORD64 addr) DEC
/* symbol.c */
extern const char* symt_get_name(const struct symt* sym) DECLSPEC_HIDDEN;
extern WCHAR* symt_get_nameW(const struct symt* sym) DECLSPEC_HIDDEN;
extern BOOL symt_get_address(const struct symt* type, ULONG64* addr) DECLSPEC_HIDDEN;
extern int symt_cmp_addr(const void* p1, const void* p2) DECLSPEC_HIDDEN;
extern void copy_symbolW(SYMBOL_INFOW* siw, const SYMBOL_INFO* si) DECLSPEC_HIDDEN;
......
......@@ -101,9 +101,6 @@ static void module_fill_module(const WCHAR* in, WCHAR* out, size_t size)
void module_set_module(struct module* module, const WCHAR* name)
{
module_fill_module(name, module->module.ModuleName, sizeof(module->module.ModuleName));
WideCharToMultiByte(CP_ACP, 0, module->module.ModuleName, -1,
module->module_name, sizeof(module->module_name),
NULL, NULL);
}
const WCHAR *get_wine_loader_name(void)
......
......@@ -102,6 +102,19 @@ const char* symt_get_name(const struct symt* sym)
}
}
WCHAR* symt_get_nameW(const struct symt* sym)
{
const char* name = symt_get_name(sym);
WCHAR* nameW;
DWORD sz;
if (!name) return NULL;
sz = MultiByteToWideChar(CP_ACP, 0, name, -1, NULL, 0);
if ((nameW = HeapAlloc(GetProcessHeap(), 0, sz * sizeof(WCHAR))))
MultiByteToWideChar(CP_ACP, 0, name, -1, nameW, sz);
return nameW;
}
BOOL symt_get_address(const struct symt* type, ULONG64* addr)
{
switch (type->tag)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment