dbghelp: The main executable is now always named "wine".

This commit is contained in:
Alexandre Julliard 2009-03-10 18:22:43 +01:00
parent f4a19c8463
commit d2682f57f8
3 changed files with 8 additions and 18 deletions

View File

@ -431,8 +431,7 @@ extern DWORD WINAPI addr_to_linear(HANDLE hProcess, HANDLE hThread, ADDRESS* add
/* module.c */
extern const WCHAR S_ElfW[];
extern const WCHAR S_WineLoaderW[];
extern const WCHAR S_WinePThreadW[];
extern const WCHAR S_WineKThreadW[];
extern const WCHAR S_WineW[];
extern const WCHAR S_SlashW[];
extern struct module*

View File

@ -1492,9 +1492,7 @@ static BOOL elf_search_loader(struct process* pcs, struct elf_info* elf_info)
const char* ptr;
/* All binaries are loaded with WINELOADER (if run from tree) or by the
* main executable (either wine-kthread or wine-pthread)
* FIXME: the heuristic used to know whether we need to load wine-pthread
* or wine-kthread is not 100% safe
* main executable
*/
if ((ptr = getenv("WINELOADER")))
{
@ -1504,8 +1502,7 @@ static BOOL elf_search_loader(struct process* pcs, struct elf_info* elf_info)
}
else
{
ret = elf_search_and_load_file(pcs, S_WineKThreadW, 0, elf_info) ||
elf_search_and_load_file(pcs, S_WinePThreadW, 0, elf_info);
ret = elf_search_and_load_file(pcs, S_WineW, 0, elf_info);
}
return ret;
}

View File

@ -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_DotPdbW[] = {'.','p','d','b','\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_WineKThreadW[] = {'w','i','n','e','-','k','t','h','r','e','a','d','\0'};
const WCHAR S_WineW[] = {'w','i','n','e',0};
const WCHAR S_SlashW[] = {'/','\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';
if (len > 4 && (l = match_ext(out, len)))
out[len - l] = '\0';
else if (len > 12 &&
(!strcmpiW(out + len - 12, S_WinePThreadW) ||
!strcmpiW(out + len - 12, S_WineKThreadW)))
else if (len > 4 && !strcmpiW(out + len - 4, S_WineW))
lstrcpynW(out, S_WineLoaderW, size);
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))
return DMT_DBG;
/* wine-[kp]thread is also an ELF module */
if (((len > 12 && name[len - 13] == '/') || len == 12) &&
(!strncmpiW(name + len - 12, S_WinePThreadW, 12) ||
!strncmpiW(name + len - 12, S_WineKThreadW, 12)))
{
/* wine is also an ELF module */
if (((len > 4 && name[len - 5] == '/') || len == 4) && !strcmpiW(name + len - 4, S_WineW))
return DMT_ELF;
}
return DMT_PE;
}