dbghelp: The main executable is now always named "wine".
This commit is contained in:
parent
f4a19c8463
commit
d2682f57f8
|
@ -431,8 +431,7 @@ extern DWORD WINAPI addr_to_linear(HANDLE hProcess, HANDLE hThread, ADDRESS* add
|
||||||
/* module.c */
|
/* module.c */
|
||||||
extern const WCHAR S_ElfW[];
|
extern const WCHAR S_ElfW[];
|
||||||
extern const WCHAR S_WineLoaderW[];
|
extern const WCHAR S_WineLoaderW[];
|
||||||
extern const WCHAR S_WinePThreadW[];
|
extern const WCHAR S_WineW[];
|
||||||
extern const WCHAR S_WineKThreadW[];
|
|
||||||
extern const WCHAR S_SlashW[];
|
extern const WCHAR S_SlashW[];
|
||||||
|
|
||||||
extern struct module*
|
extern struct module*
|
||||||
|
|
|
@ -1492,9 +1492,7 @@ static BOOL elf_search_loader(struct process* pcs, struct elf_info* elf_info)
|
||||||
const char* ptr;
|
const char* ptr;
|
||||||
|
|
||||||
/* All binaries are loaded with WINELOADER (if run from tree) or by the
|
/* All binaries are loaded with WINELOADER (if run from tree) or by the
|
||||||
* main executable (either wine-kthread or wine-pthread)
|
* main executable
|
||||||
* FIXME: the heuristic used to know whether we need to load wine-pthread
|
|
||||||
* or wine-kthread is not 100% safe
|
|
||||||
*/
|
*/
|
||||||
if ((ptr = getenv("WINELOADER")))
|
if ((ptr = getenv("WINELOADER")))
|
||||||
{
|
{
|
||||||
|
@ -1504,8 +1502,7 @@ static BOOL elf_search_loader(struct process* pcs, struct elf_info* elf_info)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
ret = elf_search_and_load_file(pcs, S_WineKThreadW, 0, elf_info) ||
|
ret = elf_search_and_load_file(pcs, S_WineW, 0, elf_info);
|
||||||
elf_search_and_load_file(pcs, S_WinePThreadW, 0, elf_info);
|
|
||||||
}
|
}
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
|
@ -37,8 +37,7 @@ const WCHAR S_WineLoaderW[] = {'<','w','i','n','e','-','l','o','a','d','
|
||||||
static const WCHAR S_DotSoW[] = {'.','s','o','\0'};
|
static const WCHAR S_DotSoW[] = {'.','s','o','\0'};
|
||||||
static const WCHAR S_DotPdbW[] = {'.','p','d','b','\0'};
|
static const WCHAR S_DotPdbW[] = {'.','p','d','b','\0'};
|
||||||
static const WCHAR S_DotDbgW[] = {'.','d','b','g','\0'};
|
static const WCHAR S_DotDbgW[] = {'.','d','b','g','\0'};
|
||||||
const WCHAR S_WinePThreadW[] = {'w','i','n','e','-','p','t','h','r','e','a','d','\0'};
|
const WCHAR S_WineW[] = {'w','i','n','e',0};
|
||||||
const WCHAR S_WineKThreadW[] = {'w','i','n','e','-','k','t','h','r','e','a','d','\0'};
|
|
||||||
const WCHAR S_SlashW[] = {'/','\0'};
|
const WCHAR S_SlashW[] = {'/','\0'};
|
||||||
|
|
||||||
static const WCHAR S_AcmW[] = {'.','a','c','m','\0'};
|
static const WCHAR S_AcmW[] = {'.','a','c','m','\0'};
|
||||||
|
@ -87,9 +86,7 @@ static void module_fill_module(const WCHAR* in, WCHAR* out, size_t size)
|
||||||
out[len] = '\0';
|
out[len] = '\0';
|
||||||
if (len > 4 && (l = match_ext(out, len)))
|
if (len > 4 && (l = match_ext(out, len)))
|
||||||
out[len - l] = '\0';
|
out[len - l] = '\0';
|
||||||
else if (len > 12 &&
|
else if (len > 4 && !strcmpiW(out + len - 4, S_WineW))
|
||||||
(!strcmpiW(out + len - 12, S_WinePThreadW) ||
|
|
||||||
!strcmpiW(out + len - 12, S_WineKThreadW)))
|
|
||||||
lstrcpynW(out, S_WineLoaderW, size);
|
lstrcpynW(out, S_WineLoaderW, size);
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -428,13 +425,10 @@ enum module_type module_get_type_by_name(const WCHAR* name)
|
||||||
if (len > 4 && !strncmpiW(name + len - 4, S_DotDbgW, 4))
|
if (len > 4 && !strncmpiW(name + len - 4, S_DotDbgW, 4))
|
||||||
return DMT_DBG;
|
return DMT_DBG;
|
||||||
|
|
||||||
/* wine-[kp]thread is also an ELF module */
|
/* wine is also an ELF module */
|
||||||
if (((len > 12 && name[len - 13] == '/') || len == 12) &&
|
if (((len > 4 && name[len - 5] == '/') || len == 4) && !strcmpiW(name + len - 4, S_WineW))
|
||||||
(!strncmpiW(name + len - 12, S_WinePThreadW, 12) ||
|
|
||||||
!strncmpiW(name + len - 12, S_WineKThreadW, 12)))
|
|
||||||
{
|
|
||||||
return DMT_ELF;
|
return DMT_ELF;
|
||||||
}
|
|
||||||
return DMT_PE;
|
return DMT_PE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue