winedbg: Use the explicit name for all A/W function.
This commit is contained in:
parent
09db528847
commit
c09ac7a41f
|
@ -7,6 +7,7 @@ APPMODE = -mconsole
|
|||
IMPORTS = psapi dbghelp advapi32 kernel32 ntdll
|
||||
DELAYIMPORTS = user32 gdi32
|
||||
EXTRALIBS = @LIBPOLL@
|
||||
EXTRADEFS = -DWINE_NO_UNICODE_MACROS
|
||||
|
||||
C_SRCS = \
|
||||
be_alpha.c \
|
||||
|
|
|
@ -556,7 +556,7 @@ void parser_handle(HANDLE input)
|
|||
|
||||
static void parser(const char* filename)
|
||||
{
|
||||
HANDLE h = CreateFile(filename, GENERIC_READ, FILE_SHARE_READ, NULL, OPEN_EXISTING, 0L, 0);
|
||||
HANDLE h = CreateFileA(filename, GENERIC_READ, FILE_SHARE_READ, NULL, OPEN_EXISTING, 0L, 0);
|
||||
if (h != INVALID_HANDLE_VALUE)
|
||||
{
|
||||
parser_handle(h);
|
||||
|
@ -577,8 +577,8 @@ HANDLE parser_generate_command_file(const char* pmt, ...)
|
|||
DWORD w;
|
||||
const char* p;
|
||||
|
||||
GetTempPath(sizeof(path), path);
|
||||
GetTempFileName(path, "WD", 0, file);
|
||||
GetTempPathA(sizeof(path), path);
|
||||
GetTempFileNameA(path, "WD", 0, file);
|
||||
hFile = CreateFileA(file, GENERIC_READ|GENERIC_WRITE|DELETE, FILE_SHARE_DELETE,
|
||||
NULL, CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL | FILE_FLAG_DELETE_ON_CLOSE, 0);
|
||||
if (hFile != INVALID_HANDLE_VALUE)
|
||||
|
|
|
@ -160,7 +160,7 @@ struct dbg_breakpoint
|
|||
typedef struct tagTHREADNAME_INFO
|
||||
{
|
||||
DWORD dwType; /* Must be 0x1000 */
|
||||
LPCTSTR szName; /* Pointer to name - limited to 9 bytes (8 characters + terminator) */
|
||||
LPCSTR szName; /* Pointer to name - limited to 9 bytes (8 characters + terminator) */
|
||||
DWORD dwThreadID; /* Thread ID (-1 = caller thread) */
|
||||
DWORD dwFlags; /* Reserved for future use. Must be zero. */
|
||||
} THREADNAME_INFO;
|
||||
|
|
|
@ -1501,9 +1501,9 @@ static void packet_query_monitor_wnd_helper(struct gdb_context* gdbctx, HWND hWn
|
|||
HWND child;
|
||||
|
||||
do {
|
||||
if (!GetClassName(hWnd, clsName, sizeof(clsName)))
|
||||
if (!GetClassNameA(hWnd, clsName, sizeof(clsName)))
|
||||
strcpy(clsName, "-- Unknown --");
|
||||
if (!GetWindowText(hWnd, wndName, sizeof(wndName)))
|
||||
if (!GetWindowTextA(hWnd, wndName, sizeof(wndName)))
|
||||
strcpy(wndName, "-- Empty --");
|
||||
|
||||
packet_reply_open(gdbctx);
|
||||
|
@ -1511,8 +1511,8 @@ static void packet_query_monitor_wnd_helper(struct gdb_context* gdbctx, HWND hWn
|
|||
snprintf(buffer, sizeof(buffer),
|
||||
"%*s%04lx%*s%-17.17s %08x %08x %.14s\n",
|
||||
indent, "", (ULONG_PTR)hWnd, 13 - indent, "",
|
||||
clsName, GetWindowLong(hWnd, GWL_STYLE),
|
||||
GetWindowLongPtr(hWnd, GWLP_WNDPROC), wndName);
|
||||
clsName, GetWindowLongW(hWnd, GWL_STYLE),
|
||||
GetWindowLongPtrW(hWnd, GWLP_WNDPROC), wndName);
|
||||
packet_reply_hex_to_str(gdbctx, buffer);
|
||||
packet_reply_close(gdbctx);
|
||||
|
||||
|
|
|
@ -280,9 +280,9 @@ static void class_walker(HWND hWnd, struct class_walker* cw)
|
|||
ATOM atom;
|
||||
HWND child;
|
||||
|
||||
if (!GetClassName(hWnd, clsName, sizeof(clsName)))
|
||||
if (!GetClassNameA(hWnd, clsName, sizeof(clsName)))
|
||||
return;
|
||||
if ((atom = FindAtom(clsName)) == 0)
|
||||
if ((atom = FindAtomA(clsName)) == 0)
|
||||
return;
|
||||
|
||||
for (i = 0; i < cw->used; i++)
|
||||
|
@ -310,7 +310,7 @@ static void class_walker(HWND hWnd, struct class_walker* cw)
|
|||
void info_win32_class(HWND hWnd, const char* name)
|
||||
{
|
||||
WNDCLASSEXA wca;
|
||||
HINSTANCE hInst = hWnd ? (HINSTANCE)GetWindowLongPtr(hWnd, GWLP_HINSTANCE) : 0;
|
||||
HINSTANCE hInst = hWnd ? (HINSTANCE)GetWindowLongPtrW(hWnd, GWLP_HINSTANCE) : 0;
|
||||
|
||||
if (!name)
|
||||
{
|
||||
|
@ -323,7 +323,7 @@ void info_win32_class(HWND hWnd, const char* name)
|
|||
return;
|
||||
}
|
||||
|
||||
if (!GetClassInfoEx(hInst, name, &wca))
|
||||
if (!GetClassInfoExA(hInst, name, &wca))
|
||||
{
|
||||
dbg_printf("Cannot find class '%s'\n", name);
|
||||
return;
|
||||
|
@ -366,15 +366,15 @@ static void info_window(HWND hWnd, int indent)
|
|||
|
||||
do
|
||||
{
|
||||
if (!GetClassName(hWnd, clsName, sizeof(clsName)))
|
||||
if (!GetClassNameA(hWnd, clsName, sizeof(clsName)))
|
||||
strcpy(clsName, "-- Unknown --");
|
||||
if (!GetWindowText(hWnd, wndName, sizeof(wndName)))
|
||||
if (!GetWindowTextA(hWnd, wndName, sizeof(wndName)))
|
||||
strcpy(wndName, "-- Empty --");
|
||||
|
||||
dbg_printf("%*s%08lx%*s %-17.17s %08x %08x %08x %.14s\n",
|
||||
indent, "", (DWORD_PTR)hWnd, 12 - indent, "",
|
||||
clsName, GetWindowLong(hWnd, GWL_STYLE),
|
||||
GetWindowLongPtr(hWnd, GWLP_WNDPROC),
|
||||
clsName, GetWindowLongW(hWnd, GWL_STYLE),
|
||||
GetWindowLongPtrW(hWnd, GWLP_WNDPROC),
|
||||
GetWindowThreadProcessId(hWnd, NULL), wndName);
|
||||
|
||||
if ((child = GetWindow(hWnd, GW_CHILD)) != 0)
|
||||
|
@ -400,9 +400,9 @@ void info_win32_window(HWND hWnd, BOOL detailed)
|
|||
return;
|
||||
}
|
||||
|
||||
if (!GetClassName(hWnd, clsName, sizeof(clsName)))
|
||||
if (!GetClassNameA(hWnd, clsName, sizeof(clsName)))
|
||||
strcpy(clsName, "-- Unknown --");
|
||||
if (!GetWindowText(hWnd, wndName, sizeof(wndName)))
|
||||
if (!GetWindowTextA(hWnd, wndName, sizeof(wndName)))
|
||||
strcpy(wndName, "-- Empty --");
|
||||
if (!GetClientRect(hWnd, &clientRect) ||
|
||||
!MapWindowPoints(hWnd, 0, (LPPOINT) &clientRect, 2))
|
||||
|
@ -420,23 +420,23 @@ void info_win32_window(HWND hWnd, BOOL detailed)
|
|||
GetParent(hWnd),
|
||||
GetWindow(hWnd, GW_OWNER),
|
||||
clsName,
|
||||
(HINSTANCE)GetWindowLongPtr(hWnd, GWLP_HINSTANCE),
|
||||
(HINSTANCE)GetWindowLongPtrW(hWnd, GWLP_HINSTANCE),
|
||||
GetLastActivePopup(hWnd),
|
||||
GetWindowLongPtr(hWnd, GWLP_ID),
|
||||
GetWindowLong(hWnd, GWL_STYLE),
|
||||
GetWindowLong(hWnd, GWL_EXSTYLE),
|
||||
GetWindowLongPtr(hWnd, GWLP_WNDPROC),
|
||||
GetWindowLongPtrW(hWnd, GWLP_ID),
|
||||
GetWindowLongW(hWnd, GWL_STYLE),
|
||||
GetWindowLongW(hWnd, GWL_EXSTYLE),
|
||||
GetWindowLongPtrW(hWnd, GWLP_WNDPROC),
|
||||
wndName,
|
||||
clientRect.left, clientRect.top, clientRect.right, clientRect.bottom,
|
||||
windowRect.left, windowRect.top, windowRect.right, windowRect.bottom,
|
||||
GetSystemMenu(hWnd, FALSE));
|
||||
|
||||
if (GetClassLong(hWnd, GCL_CBWNDEXTRA))
|
||||
if (GetClassLongW(hWnd, GCL_CBWNDEXTRA))
|
||||
{
|
||||
UINT i;
|
||||
|
||||
dbg_printf("Extra bytes:");
|
||||
for (i = 0; i < GetClassLong(hWnd, GCL_CBWNDEXTRA) / 2; i++)
|
||||
for (i = 0; i < GetClassLongW(hWnd, GCL_CBWNDEXTRA) / 2; i++)
|
||||
{
|
||||
w = GetWindowWord(hWnd, i * 2);
|
||||
/* FIXME: depends on i386 endian-ity */
|
||||
|
|
|
@ -84,11 +84,11 @@ static void* source_map_file(const char* name, HANDLE* hMap, unsigned* size)
|
|||
{
|
||||
HANDLE hFile;
|
||||
|
||||
hFile = CreateFile(name, GENERIC_READ, FILE_SHARE_READ, NULL,
|
||||
OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL);
|
||||
hFile = CreateFileA(name, GENERIC_READ, FILE_SHARE_READ, NULL,
|
||||
OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL);
|
||||
if (hFile == INVALID_HANDLE_VALUE) return (void*)-1;
|
||||
if (size != NULL && (*size = GetFileSize(hFile, NULL)) == -1) return (void*)-1;
|
||||
*hMap = CreateFileMapping(hFile, NULL, PAGE_READONLY, 0, 0, NULL);
|
||||
*hMap = CreateFileMappingW(hFile, NULL, PAGE_READONLY, 0, 0, NULL);
|
||||
CloseHandle(hFile);
|
||||
if (!*hMap) return (void*)-1;
|
||||
return MapViewOfFile(*hMap, FILE_MAP_READ, 0, 0, 0);
|
||||
|
@ -115,7 +115,7 @@ static BOOL source_locate_file(const char* srcfile, char* path)
|
|||
{
|
||||
BOOL found = FALSE;
|
||||
|
||||
if (GetFileAttributes(srcfile) != INVALID_FILE_ATTRIBUTES)
|
||||
if (GetFileAttributesA(srcfile) != INVALID_FILE_ATTRIBUTES)
|
||||
{
|
||||
strcpy(path, srcfile);
|
||||
found = TRUE;
|
||||
|
@ -216,7 +216,7 @@ static int source_display(const char* sourcefile, int start, int end)
|
|||
}
|
||||
else tmppath[0] = '\0';
|
||||
|
||||
if (GetFileAttributes(tmppath) == INVALID_FILE_ATTRIBUTES)
|
||||
if (GetFileAttributesA(tmppath) == INVALID_FILE_ATTRIBUTES)
|
||||
{
|
||||
/*
|
||||
* OK, I guess the user doesn't really want to see it
|
||||
|
|
|
@ -745,8 +745,8 @@ static unsigned dbg_start_debuggee(LPSTR cmdLine)
|
|||
flags = DEBUG_PROCESS | CREATE_NEW_CONSOLE;
|
||||
if (!DBG_IVAR(AlsoDebugProcChild)) flags |= DEBUG_ONLY_THIS_PROCESS;
|
||||
|
||||
if (!CreateProcess(NULL, cmdLine, NULL, NULL, FALSE, flags,
|
||||
NULL, NULL, &startup, &info))
|
||||
if (!CreateProcessA(NULL, cmdLine, NULL, NULL, FALSE, flags,
|
||||
NULL, NULL, &startup, &info))
|
||||
{
|
||||
dbg_printf("Couldn't start process '%s'\n", cmdLine);
|
||||
return FALSE;
|
||||
|
@ -950,8 +950,8 @@ enum dbg_start dbg_active_auto(int argc, char* argv[])
|
|||
{
|
||||
char path[MAX_PATH];
|
||||
|
||||
GetTempPath(sizeof(path), path);
|
||||
GetTempFileName(path, "WD", 0, tmp + 10);
|
||||
GetTempPathA(sizeof(path), path);
|
||||
GetTempFileNameA(path, "WD", 0, tmp + 10);
|
||||
}
|
||||
else strcpy(tmp + 10, file);
|
||||
strcat(tmp, "\"");
|
||||
|
|
|
@ -51,8 +51,8 @@ void minidump_write(const char* file, const EXCEPTION_RECORD* rec)
|
|||
MINIDUMP_EXCEPTION_INFORMATION mei;
|
||||
EXCEPTION_POINTERS ep;
|
||||
|
||||
hFile = CreateFile(file, GENERIC_READ|GENERIC_WRITE, 0, NULL, CREATE_ALWAYS,
|
||||
FILE_ATTRIBUTE_NORMAL, NULL);
|
||||
hFile = CreateFileA(file, GENERIC_READ|GENERIC_WRITE, 0, NULL, CREATE_ALWAYS,
|
||||
FILE_ATTRIBUTE_NORMAL, NULL);
|
||||
|
||||
if (hFile == INVALID_HANDLE_VALUE) return;
|
||||
|
||||
|
|
|
@ -201,8 +201,8 @@ static unsigned dbg_load_internal_vars(void)
|
|||
{
|
||||
if (!dbg_internal_vars[i].pval)
|
||||
{
|
||||
if (!RegQueryValueEx(hkey, dbg_internal_vars[i].name, 0,
|
||||
&type, (LPBYTE)&val, &count))
|
||||
if (!RegQueryValueExA(hkey, dbg_internal_vars[i].name, 0,
|
||||
&type, (LPBYTE)&val, &count))
|
||||
dbg_internal_vars[i].val = val;
|
||||
dbg_internal_vars[i].pval = &dbg_internal_vars[i].val;
|
||||
}
|
||||
|
@ -229,9 +229,9 @@ static unsigned dbg_save_internal_vars(void)
|
|||
{
|
||||
/* FIXME: type should be inferred from basic type -if any- of intvar */
|
||||
if (dbg_internal_vars[i].pval == &dbg_internal_vars[i].val)
|
||||
RegSetValueEx(hkey, dbg_internal_vars[i].name, 0,
|
||||
REG_DWORD, (const void*)dbg_internal_vars[i].pval,
|
||||
sizeof(*dbg_internal_vars[i].pval));
|
||||
RegSetValueExA(hkey, dbg_internal_vars[i].name, 0,
|
||||
REG_DWORD, (const void*)dbg_internal_vars[i].pval,
|
||||
sizeof(*dbg_internal_vars[i].pval));
|
||||
}
|
||||
RegCloseKey(hkey);
|
||||
return TRUE;
|
||||
|
@ -565,7 +565,7 @@ void dbg_init_console(void)
|
|||
SetConsoleCtrlHandler(ctrl_c_handler, TRUE);
|
||||
|
||||
/* set our own title */
|
||||
SetConsoleTitle("Wine Debugger");
|
||||
SetConsoleTitleA("Wine Debugger");
|
||||
}
|
||||
|
||||
static int dbg_winedbg_usage(BOOL advanced)
|
||||
|
|
Loading…
Reference in New Issue