mirror of
git://source.winehq.org/git/wine.git
synced 2024-09-01 07:24:58 +00:00
server: Fix sharing parameters for debug event files, and don't fail if the file can't be opened.
This commit is contained in:
parent
fa608e247a
commit
1b868f4967
|
@ -155,18 +155,8 @@ static int fill_create_process_event( struct debug_event *event, const void *arg
|
|||
close_handle( debugger, event->data.create_process.process );
|
||||
return 0;
|
||||
}
|
||||
event->data.create_process.thread = handle;
|
||||
|
||||
handle = 0;
|
||||
if (exe_module->mapping &&
|
||||
/* the doc says write access too, but this doesn't seem a good idea */
|
||||
!(handle = open_mapping_file( debugger, exe_module->mapping, GENERIC_READ, 0 )))
|
||||
{
|
||||
close_handle( debugger, event->data.create_process.process );
|
||||
close_handle( debugger, event->data.create_process.thread );
|
||||
return 0;
|
||||
}
|
||||
event->data.create_process.file = handle;
|
||||
event->data.create_process.thread = handle;
|
||||
event->data.create_process.file = 0;
|
||||
event->data.create_process.teb = thread->teb;
|
||||
event->data.create_process.base = exe_module->base;
|
||||
event->data.create_process.start = *entry;
|
||||
|
@ -174,6 +164,10 @@ static int fill_create_process_event( struct debug_event *event, const void *arg
|
|||
event->data.create_process.dbg_size = exe_module->dbg_size;
|
||||
event->data.create_process.name = exe_module->name;
|
||||
event->data.create_process.unicode = 1;
|
||||
|
||||
if (exe_module->mapping) /* the doc says write access too, but this doesn't seem a good idea */
|
||||
event->data.create_process.file = open_mapping_file( debugger, exe_module->mapping, GENERIC_READ,
|
||||
FILE_SHARE_READ | FILE_SHARE_WRITE );
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
@ -195,16 +189,16 @@ static int fill_load_dll_event( struct debug_event *event, const void *arg )
|
|||
{
|
||||
struct process *debugger = event->debugger->process;
|
||||
const struct process_dll *dll = arg;
|
||||
obj_handle_t handle = 0;
|
||||
|
||||
if (dll->mapping && !(handle = open_mapping_file( debugger, dll->mapping, GENERIC_READ, 0 )))
|
||||
return 0;
|
||||
event->data.load_dll.handle = handle;
|
||||
event->data.load_dll.handle = 0;
|
||||
event->data.load_dll.base = dll->base;
|
||||
event->data.load_dll.dbg_offset = dll->dbg_offset;
|
||||
event->data.load_dll.dbg_size = dll->dbg_size;
|
||||
event->data.load_dll.name = dll->name;
|
||||
event->data.load_dll.unicode = 1;
|
||||
if (dll->mapping)
|
||||
event->data.load_dll.handle = open_mapping_file( debugger, dll->mapping, GENERIC_READ,
|
||||
FILE_SHARE_READ | FILE_SHARE_WRITE );
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue