server: Store module names as client_ptr_t instead of void pointers.
This commit is contained in:
parent
f2c4e09e80
commit
947976f22c
|
@ -91,7 +91,7 @@ BOOL WINAPI WaitForDebugEvent(
|
||||||
event->u.CreateProcessInfo.nDebugInfoSize = data.info.create_process.dbg_size;
|
event->u.CreateProcessInfo.nDebugInfoSize = data.info.create_process.dbg_size;
|
||||||
event->u.CreateProcessInfo.lpThreadLocalBase = data.info.create_process.teb;
|
event->u.CreateProcessInfo.lpThreadLocalBase = data.info.create_process.teb;
|
||||||
event->u.CreateProcessInfo.lpStartAddress = data.info.create_process.start;
|
event->u.CreateProcessInfo.lpStartAddress = data.info.create_process.start;
|
||||||
event->u.CreateProcessInfo.lpImageName = data.info.create_process.name;
|
event->u.CreateProcessInfo.lpImageName = wine_server_get_ptr( data.info.create_process.name );
|
||||||
event->u.CreateProcessInfo.fUnicode = data.info.create_process.unicode;
|
event->u.CreateProcessInfo.fUnicode = data.info.create_process.unicode;
|
||||||
break;
|
break;
|
||||||
case EXIT_THREAD_DEBUG_EVENT:
|
case EXIT_THREAD_DEBUG_EVENT:
|
||||||
|
@ -105,7 +105,7 @@ BOOL WINAPI WaitForDebugEvent(
|
||||||
event->u.LoadDll.lpBaseOfDll = wine_server_get_ptr( data.info.load_dll.base );
|
event->u.LoadDll.lpBaseOfDll = wine_server_get_ptr( data.info.load_dll.base );
|
||||||
event->u.LoadDll.dwDebugInfoFileOffset = data.info.load_dll.dbg_offset;
|
event->u.LoadDll.dwDebugInfoFileOffset = data.info.load_dll.dbg_offset;
|
||||||
event->u.LoadDll.nDebugInfoSize = data.info.load_dll.dbg_size;
|
event->u.LoadDll.nDebugInfoSize = data.info.load_dll.dbg_size;
|
||||||
event->u.LoadDll.lpImageName = data.info.load_dll.name;
|
event->u.LoadDll.lpImageName = wine_server_get_ptr( data.info.load_dll.name );
|
||||||
event->u.LoadDll.fUnicode = data.info.load_dll.unicode;
|
event->u.LoadDll.fUnicode = data.info.load_dll.unicode;
|
||||||
break;
|
break;
|
||||||
case UNLOAD_DLL_DEBUG_EVENT:
|
case UNLOAD_DLL_DEBUG_EVENT:
|
||||||
|
|
|
@ -1451,7 +1451,7 @@ static void load_builtin_callback( void *module, const char *filename )
|
||||||
req->size = nt->OptionalHeader.SizeOfImage;
|
req->size = nt->OptionalHeader.SizeOfImage;
|
||||||
req->dbg_offset = nt->FileHeader.PointerToSymbolTable;
|
req->dbg_offset = nt->FileHeader.PointerToSymbolTable;
|
||||||
req->dbg_size = nt->FileHeader.NumberOfSymbols;
|
req->dbg_size = nt->FileHeader.NumberOfSymbols;
|
||||||
req->name = &wm->ldr.FullDllName.Buffer;
|
req->name = wine_server_client_ptr( &wm->ldr.FullDllName.Buffer );
|
||||||
wine_server_add_data( req, wm->ldr.FullDllName.Buffer, wm->ldr.FullDllName.Length );
|
wine_server_add_data( req, wm->ldr.FullDllName.Buffer, wm->ldr.FullDllName.Length );
|
||||||
wine_server_call( req );
|
wine_server_call( req );
|
||||||
}
|
}
|
||||||
|
@ -1533,7 +1533,7 @@ static NTSTATUS load_native_dll( LPCWSTR load_path, LPCWSTR name, HANDLE file,
|
||||||
req->size = nt->OptionalHeader.SizeOfImage;
|
req->size = nt->OptionalHeader.SizeOfImage;
|
||||||
req->dbg_offset = nt->FileHeader.PointerToSymbolTable;
|
req->dbg_offset = nt->FileHeader.PointerToSymbolTable;
|
||||||
req->dbg_size = nt->FileHeader.NumberOfSymbols;
|
req->dbg_size = nt->FileHeader.NumberOfSymbols;
|
||||||
req->name = &wm->ldr.FullDllName.Buffer;
|
req->name = wine_server_client_ptr( &wm->ldr.FullDllName.Buffer );
|
||||||
wine_server_add_data( req, wm->ldr.FullDllName.Buffer, wm->ldr.FullDllName.Length );
|
wine_server_add_data( req, wm->ldr.FullDllName.Buffer, wm->ldr.FullDllName.Length );
|
||||||
wine_server_call( req );
|
wine_server_call( req );
|
||||||
}
|
}
|
||||||
|
|
|
@ -75,7 +75,7 @@ struct debug_event_create_process
|
||||||
int dbg_size;
|
int dbg_size;
|
||||||
void *teb;
|
void *teb;
|
||||||
void *start;
|
void *start;
|
||||||
void *name;
|
client_ptr_t name;
|
||||||
int unicode;
|
int unicode;
|
||||||
};
|
};
|
||||||
struct debug_event_exit
|
struct debug_event_exit
|
||||||
|
@ -88,7 +88,7 @@ struct debug_event_load_dll
|
||||||
mod_handle_t base;
|
mod_handle_t base;
|
||||||
int dbg_offset;
|
int dbg_offset;
|
||||||
int dbg_size;
|
int dbg_size;
|
||||||
void *name;
|
client_ptr_t name;
|
||||||
int unicode;
|
int unicode;
|
||||||
};
|
};
|
||||||
struct debug_event_unload_dll
|
struct debug_event_unload_dll
|
||||||
|
@ -723,7 +723,7 @@ struct load_dll_request
|
||||||
struct request_header __header;
|
struct request_header __header;
|
||||||
obj_handle_t handle;
|
obj_handle_t handle;
|
||||||
mod_handle_t base;
|
mod_handle_t base;
|
||||||
void* name;
|
client_ptr_t name;
|
||||||
data_size_t size;
|
data_size_t size;
|
||||||
int dbg_offset;
|
int dbg_offset;
|
||||||
int dbg_size;
|
int dbg_size;
|
||||||
|
@ -5052,6 +5052,6 @@ union generic_reply
|
||||||
struct set_window_layered_info_reply set_window_layered_info_reply;
|
struct set_window_layered_info_reply set_window_layered_info_reply;
|
||||||
};
|
};
|
||||||
|
|
||||||
#define SERVER_PROTOCOL_VERSION 356
|
#define SERVER_PROTOCOL_VERSION 357
|
||||||
|
|
||||||
#endif /* __WINE_WINE_SERVER_PROTOCOL_H */
|
#endif /* __WINE_WINE_SERVER_PROTOCOL_H */
|
||||||
|
|
|
@ -38,7 +38,7 @@ struct process_dll
|
||||||
struct list entry; /* entry in per-process dll list */
|
struct list entry; /* entry in per-process dll list */
|
||||||
struct file *file; /* dll file */
|
struct file *file; /* dll file */
|
||||||
mod_handle_t base; /* dll base address (in process addr space) */
|
mod_handle_t base; /* dll base address (in process addr space) */
|
||||||
void *name; /* ptr to ptr to name (in process addr space) */
|
client_ptr_t name; /* ptr to ptr to name (in process addr space) */
|
||||||
data_size_t size; /* dll size */
|
data_size_t size; /* dll size */
|
||||||
int dbg_offset; /* debug info offset */
|
int dbg_offset; /* debug info offset */
|
||||||
int dbg_size; /* debug info size */
|
int dbg_size; /* debug info size */
|
||||||
|
|
|
@ -91,7 +91,7 @@ struct debug_event_create_process
|
||||||
int dbg_size; /* size of debug info */
|
int dbg_size; /* size of debug info */
|
||||||
void *teb; /* thread teb (in debugged process address space) */
|
void *teb; /* thread teb (in debugged process address space) */
|
||||||
void *start; /* thread startup routine */
|
void *start; /* thread startup routine */
|
||||||
void *name; /* image name (optional) */
|
client_ptr_t name; /* image name (optional) */
|
||||||
int unicode; /* is it Unicode? */
|
int unicode; /* is it Unicode? */
|
||||||
};
|
};
|
||||||
struct debug_event_exit
|
struct debug_event_exit
|
||||||
|
@ -104,7 +104,7 @@ struct debug_event_load_dll
|
||||||
mod_handle_t base; /* base address of the dll */
|
mod_handle_t base; /* base address of the dll */
|
||||||
int dbg_offset; /* offset of debug info in file */
|
int dbg_offset; /* offset of debug info in file */
|
||||||
int dbg_size; /* size of debug info */
|
int dbg_size; /* size of debug info */
|
||||||
void *name; /* image name (optional) */
|
client_ptr_t name; /* image name (optional) */
|
||||||
int unicode; /* is it Unicode? */
|
int unicode; /* is it Unicode? */
|
||||||
};
|
};
|
||||||
struct debug_event_unload_dll
|
struct debug_event_unload_dll
|
||||||
|
@ -659,7 +659,7 @@ typedef union
|
||||||
@REQ(load_dll)
|
@REQ(load_dll)
|
||||||
obj_handle_t handle; /* file handle */
|
obj_handle_t handle; /* file handle */
|
||||||
mod_handle_t base; /* base address */
|
mod_handle_t base; /* base address */
|
||||||
void* name; /* ptr to ptr to name (in process addr space) */
|
client_ptr_t name; /* ptr to ptr to name (in process addr space) */
|
||||||
data_size_t size; /* dll size */
|
data_size_t size; /* dll size */
|
||||||
int dbg_offset; /* debug info offset */
|
int dbg_offset; /* debug info offset */
|
||||||
int dbg_size; /* debug info size */
|
int dbg_size; /* debug info size */
|
||||||
|
|
|
@ -459,10 +459,11 @@ static void dump_varargs_debug_event( data_size_t size )
|
||||||
event->info.create_process.file, event->info.create_process.process,
|
event->info.create_process.file, event->info.create_process.process,
|
||||||
event->info.create_process.thread );
|
event->info.create_process.thread );
|
||||||
dump_uint64( &event->info.create_process.base );
|
dump_uint64( &event->info.create_process.base );
|
||||||
fprintf( stderr, ",offset=%d,size=%d,teb=%p,start=%p,name=%p,unicode=%d}",
|
fprintf( stderr, ",offset=%d,size=%d,teb=%p,start=%p,name=",
|
||||||
event->info.create_process.dbg_offset, event->info.create_process.dbg_size,
|
event->info.create_process.dbg_offset, event->info.create_process.dbg_size,
|
||||||
event->info.create_process.teb, event->info.create_process.start,
|
event->info.create_process.teb, event->info.create_process.start );
|
||||||
event->info.create_process.name, event->info.create_process.unicode );
|
dump_uint64( &event->info.create_process.name );
|
||||||
|
fprintf( stderr, ",unicode=%d}", event->info.create_process.unicode );
|
||||||
break;
|
break;
|
||||||
case EXIT_THREAD_DEBUG_EVENT:
|
case EXIT_THREAD_DEBUG_EVENT:
|
||||||
fprintf( stderr, "{exit_thread,code=%d}", event->info.exit.exit_code );
|
fprintf( stderr, "{exit_thread,code=%d}", event->info.exit.exit_code );
|
||||||
|
@ -473,9 +474,10 @@ static void dump_varargs_debug_event( data_size_t size )
|
||||||
case LOAD_DLL_DEBUG_EVENT:
|
case LOAD_DLL_DEBUG_EVENT:
|
||||||
fprintf( stderr, "{load_dll,file=%04x,base", event->info.load_dll.handle );
|
fprintf( stderr, "{load_dll,file=%04x,base", event->info.load_dll.handle );
|
||||||
dump_uint64( &event->info.load_dll.base );
|
dump_uint64( &event->info.load_dll.base );
|
||||||
fprintf( stderr, ",offset=%d,size=%d,name=%p,unicode=%d}",
|
fprintf( stderr, ",offset=%d,size=%d,name=",
|
||||||
event->info.load_dll.dbg_offset, event->info.load_dll.dbg_size,
|
event->info.load_dll.dbg_offset, event->info.load_dll.dbg_size );
|
||||||
event->info.load_dll.name, event->info.load_dll.unicode );
|
dump_uint64( &event->info.load_dll.name );
|
||||||
|
fprintf( stderr, ",unicode=%d}", event->info.load_dll.unicode );
|
||||||
break;
|
break;
|
||||||
case UNLOAD_DLL_DEBUG_EVENT:
|
case UNLOAD_DLL_DEBUG_EVENT:
|
||||||
fputs( "{unload_dll,base=", stderr );
|
fputs( "{unload_dll,base=", stderr );
|
||||||
|
@ -1071,7 +1073,9 @@ static void dump_load_dll_request( const struct load_dll_request *req )
|
||||||
fprintf( stderr, " base=" );
|
fprintf( stderr, " base=" );
|
||||||
dump_uint64( &req->base );
|
dump_uint64( &req->base );
|
||||||
fprintf( stderr, "," );
|
fprintf( stderr, "," );
|
||||||
fprintf( stderr, " name=%p,", req->name );
|
fprintf( stderr, " name=" );
|
||||||
|
dump_uint64( &req->name );
|
||||||
|
fprintf( stderr, "," );
|
||||||
fprintf( stderr, " size=%u,", req->size );
|
fprintf( stderr, " size=%u,", req->size );
|
||||||
fprintf( stderr, " dbg_offset=%d,", req->dbg_offset );
|
fprintf( stderr, " dbg_offset=%d,", req->dbg_offset );
|
||||||
fprintf( stderr, " dbg_size=%d,", req->dbg_size );
|
fprintf( stderr, " dbg_size=%d,", req->dbg_size );
|
||||||
|
|
|
@ -36,6 +36,7 @@ my %formats =
|
||||||
"user_handle_t" => [ 4, 4, "%08x" ],
|
"user_handle_t" => [ 4, 4, "%08x" ],
|
||||||
"process_id_t" => [ 4, 4, "%04x" ],
|
"process_id_t" => [ 4, 4, "%04x" ],
|
||||||
"thread_id_t" => [ 4, 4, "%04x" ],
|
"thread_id_t" => [ 4, 4, "%04x" ],
|
||||||
|
"client_ptr_t" => [ 8, 8, "&dump_uint64" ],
|
||||||
"mod_handle_t" => [ 8, 8, "&dump_uint64" ],
|
"mod_handle_t" => [ 8, 8, "&dump_uint64" ],
|
||||||
"lparam_t" => [ 8, 8, "&dump_uint64" ],
|
"lparam_t" => [ 8, 8, "&dump_uint64" ],
|
||||||
"apc_param_t" => [ 8, 8, "&dump_uint64" ],
|
"apc_param_t" => [ 8, 8, "&dump_uint64" ],
|
||||||
|
|
Loading…
Reference in New Issue