winedbg: Remove some superfluous pointer casts.
This commit is contained in:
parent
3b803f5390
commit
2e6ac3a571
|
@ -178,7 +178,7 @@ static inline BOOL module_is_container(const IMAGEHLP_MODULE64* wmod_cntnr,
|
||||||
|
|
||||||
static BOOL CALLBACK info_mod_cb(PCSTR mod_name, DWORD64 base, PVOID ctx)
|
static BOOL CALLBACK info_mod_cb(PCSTR mod_name, DWORD64 base, PVOID ctx)
|
||||||
{
|
{
|
||||||
struct info_module* im = (struct info_module*)ctx;
|
struct info_module* im = ctx;
|
||||||
|
|
||||||
if (im->num_used + 1 > im->num_alloc)
|
if (im->num_used + 1 > im->num_alloc)
|
||||||
{
|
{
|
||||||
|
|
|
@ -217,7 +217,7 @@ struct sym_enum
|
||||||
|
|
||||||
static BOOL WINAPI sym_enum_cb(PSYMBOL_INFO sym_info, ULONG size, PVOID user)
|
static BOOL WINAPI sym_enum_cb(PSYMBOL_INFO sym_info, ULONG size, PVOID user)
|
||||||
{
|
{
|
||||||
struct sym_enum* se = (struct sym_enum*)user;
|
struct sym_enum* se = user;
|
||||||
|
|
||||||
if (sym_info->Flags & SYMFLAG_PARAMETER)
|
if (sym_info->Flags & SYMFLAG_PARAMETER)
|
||||||
{
|
{
|
||||||
|
|
|
@ -146,7 +146,7 @@ struct sgv_data
|
||||||
|
|
||||||
static BOOL CALLBACK sgv_cb(PSYMBOL_INFO sym, ULONG size, PVOID ctx)
|
static BOOL CALLBACK sgv_cb(PSYMBOL_INFO sym, ULONG size, PVOID ctx)
|
||||||
{
|
{
|
||||||
struct sgv_data* sgv = (struct sgv_data*)ctx;
|
struct sgv_data* sgv = ctx;
|
||||||
unsigned insp;
|
unsigned insp;
|
||||||
char tmp[64];
|
char tmp[64];
|
||||||
|
|
||||||
|
|
|
@ -81,7 +81,7 @@ struct tgt_process_minidump_data
|
||||||
|
|
||||||
static inline struct tgt_process_minidump_data* private_data(struct dbg_process* pcs)
|
static inline struct tgt_process_minidump_data* private_data(struct dbg_process* pcs)
|
||||||
{
|
{
|
||||||
return (struct tgt_process_minidump_data*)pcs->pio_data;
|
return pcs->pio_data;
|
||||||
}
|
}
|
||||||
|
|
||||||
static BOOL WINAPI tgt_process_minidump_read(HANDLE hProcess, const void* addr,
|
static BOOL WINAPI tgt_process_minidump_read(HANDLE hProcess, const void* addr,
|
||||||
|
@ -95,7 +95,7 @@ static BOOL WINAPI tgt_process_minidump_read(HANDLE hProcess, const void* addr,
|
||||||
if (MiniDumpReadDumpStream(private_data(dbg_curr_process)->mapping,
|
if (MiniDumpReadDumpStream(private_data(dbg_curr_process)->mapping,
|
||||||
MemoryListStream, &dir, &stream, &size))
|
MemoryListStream, &dir, &stream, &size))
|
||||||
{
|
{
|
||||||
MINIDUMP_MEMORY_LIST* mml = (MINIDUMP_MEMORY_LIST*)stream;
|
MINIDUMP_MEMORY_LIST* mml = stream;
|
||||||
MINIDUMP_MEMORY_DESCRIPTOR* mmd = &mml->MemoryRanges[0];
|
MINIDUMP_MEMORY_DESCRIPTOR* mmd = &mml->MemoryRanges[0];
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
|
@ -180,7 +180,7 @@ static enum dbg_start minidump_do_reload(struct tgt_process_minidump_data* data)
|
||||||
/* fetch PID */
|
/* fetch PID */
|
||||||
if (MiniDumpReadDumpStream(data->mapping, MiscInfoStream, &dir, &stream, &size))
|
if (MiniDumpReadDumpStream(data->mapping, MiscInfoStream, &dir, &stream, &size))
|
||||||
{
|
{
|
||||||
MINIDUMP_MISC_INFO* mmi = (MINIDUMP_MISC_INFO*)stream;
|
MINIDUMP_MISC_INFO* mmi = stream;
|
||||||
if (mmi->Flags1 & MINIDUMP_MISC1_PROCESS_ID)
|
if (mmi->Flags1 & MINIDUMP_MISC1_PROCESS_ID)
|
||||||
pid = mmi->ProcessId;
|
pid = mmi->ProcessId;
|
||||||
}
|
}
|
||||||
|
@ -189,7 +189,7 @@ static enum dbg_start minidump_do_reload(struct tgt_process_minidump_data* data)
|
||||||
lstrcpyW(exec_name, default_exec_name);
|
lstrcpyW(exec_name, default_exec_name);
|
||||||
if (MiniDumpReadDumpStream(data->mapping, ModuleListStream, &dir, &stream, &size))
|
if (MiniDumpReadDumpStream(data->mapping, ModuleListStream, &dir, &stream, &size))
|
||||||
{
|
{
|
||||||
mml = (MINIDUMP_MODULE_LIST*)stream;
|
mml = stream;
|
||||||
if (mml->NumberOfModules)
|
if (mml->NumberOfModules)
|
||||||
{
|
{
|
||||||
WCHAR* ptr;
|
WCHAR* ptr;
|
||||||
|
@ -212,7 +212,7 @@ static enum dbg_start minidump_do_reload(struct tgt_process_minidump_data* data)
|
||||||
|
|
||||||
if (MiniDumpReadDumpStream(data->mapping, SystemInfoStream, &dir, &stream, &size))
|
if (MiniDumpReadDumpStream(data->mapping, SystemInfoStream, &dir, &stream, &size))
|
||||||
{
|
{
|
||||||
MINIDUMP_SYSTEM_INFO* msi = (MINIDUMP_SYSTEM_INFO*)stream;
|
MINIDUMP_SYSTEM_INFO* msi = stream;
|
||||||
const char *str;
|
const char *str;
|
||||||
char tmp[128];
|
char tmp[128];
|
||||||
|
|
||||||
|
@ -308,7 +308,7 @@ static enum dbg_start minidump_do_reload(struct tgt_process_minidump_data* data)
|
||||||
|
|
||||||
if (MiniDumpReadDumpStream(data->mapping, ThreadListStream, &dir, &stream, &size))
|
if (MiniDumpReadDumpStream(data->mapping, ThreadListStream, &dir, &stream, &size))
|
||||||
{
|
{
|
||||||
MINIDUMP_THREAD_LIST* mtl = (MINIDUMP_THREAD_LIST*)stream;
|
MINIDUMP_THREAD_LIST* mtl = stream;
|
||||||
ULONG i;
|
ULONG i;
|
||||||
|
|
||||||
for (i = 0; i < mtl->NumberOfThreads; i++)
|
for (i = 0; i < mtl->NumberOfThreads; i++)
|
||||||
|
@ -323,7 +323,7 @@ static enum dbg_start minidump_do_reload(struct tgt_process_minidump_data* data)
|
||||||
{
|
{
|
||||||
WCHAR buffer[MAX_PATH];
|
WCHAR buffer[MAX_PATH];
|
||||||
|
|
||||||
mml = (MINIDUMP_MODULE_LIST*)stream;
|
mml = stream;
|
||||||
for (i = 0, mm = &mml->Modules[0]; i < mml->NumberOfModules; i++, mm++)
|
for (i = 0, mm = &mml->Modules[0]; i < mml->NumberOfModules; i++, mm++)
|
||||||
{
|
{
|
||||||
mds = (MINIDUMP_STRING*)((char*)data->mapping + mm->ModuleNameRva);
|
mds = (MINIDUMP_STRING*)((char*)data->mapping + mm->ModuleNameRva);
|
||||||
|
@ -342,7 +342,7 @@ static enum dbg_start minidump_do_reload(struct tgt_process_minidump_data* data)
|
||||||
{
|
{
|
||||||
WCHAR buffer[MAX_PATH];
|
WCHAR buffer[MAX_PATH];
|
||||||
|
|
||||||
mml = (MINIDUMP_MODULE_LIST*)stream;
|
mml = stream;
|
||||||
for (i = 0, mm = &mml->Modules[0]; i < mml->NumberOfModules; i++, mm++)
|
for (i = 0, mm = &mml->Modules[0]; i < mml->NumberOfModules; i++, mm++)
|
||||||
{
|
{
|
||||||
mds = (MINIDUMP_STRING*)((char*)data->mapping + mm->ModuleNameRva);
|
mds = (MINIDUMP_STRING*)((char*)data->mapping + mm->ModuleNameRva);
|
||||||
|
@ -362,7 +362,7 @@ static enum dbg_start minidump_do_reload(struct tgt_process_minidump_data* data)
|
||||||
}
|
}
|
||||||
if (MiniDumpReadDumpStream(data->mapping, ExceptionStream, &dir, &stream, &size))
|
if (MiniDumpReadDumpStream(data->mapping, ExceptionStream, &dir, &stream, &size))
|
||||||
{
|
{
|
||||||
MINIDUMP_EXCEPTION_STREAM* mes = (MINIDUMP_EXCEPTION_STREAM*)stream;
|
MINIDUMP_EXCEPTION_STREAM* mes = stream;
|
||||||
|
|
||||||
if ((dbg_curr_thread = dbg_get_thread(dbg_curr_process, mes->ThreadId)))
|
if ((dbg_curr_thread = dbg_get_thread(dbg_curr_process, mes->ThreadId)))
|
||||||
{
|
{
|
||||||
|
|
|
@ -346,7 +346,7 @@ struct type_find_t
|
||||||
|
|
||||||
static BOOL CALLBACK types_cb(PSYMBOL_INFO sym, ULONG size, void* _user)
|
static BOOL CALLBACK types_cb(PSYMBOL_INFO sym, ULONG size, void* _user)
|
||||||
{
|
{
|
||||||
struct type_find_t* user = (struct type_find_t*)_user;
|
struct type_find_t* user = _user;
|
||||||
BOOL ret = TRUE;
|
BOOL ret = TRUE;
|
||||||
struct dbg_type type;
|
struct dbg_type type;
|
||||||
DWORD type_id;
|
DWORD type_id;
|
||||||
|
|
|
@ -404,7 +404,7 @@ struct mod_loader_info
|
||||||
|
|
||||||
static BOOL CALLBACK mod_loader_cb(PCSTR mod_name, ULONG base, PVOID ctx)
|
static BOOL CALLBACK mod_loader_cb(PCSTR mod_name, ULONG base, PVOID ctx)
|
||||||
{
|
{
|
||||||
struct mod_loader_info* mli = (struct mod_loader_info*)ctx;
|
struct mod_loader_info* mli = ctx;
|
||||||
|
|
||||||
if (!strcmp(mod_name, "<wine-loader>"))
|
if (!strcmp(mod_name, "<wine-loader>"))
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue