Don't send an extra signal when waiting for a debug event, just do a
normal wait. Return the debug event status directly as return value of the server call.
This commit is contained in:
parent
d6f7adb367
commit
ff7795ef4c
|
@ -196,19 +196,15 @@ static NTSTATUS send_debug_event( EXCEPTION_RECORD *rec, int first_chance, CONTE
|
||||||
SERVER_END_REQ;
|
SERVER_END_REQ;
|
||||||
if (ret) return ret;
|
if (ret) return ret;
|
||||||
|
|
||||||
/* No need to wait on the handle since the process gets suspended
|
WaitForSingleObject( handle, INFINITE );
|
||||||
* once the event is passed to the debugger, so when we get back
|
|
||||||
* here the event has been continued already.
|
|
||||||
*/
|
|
||||||
SERVER_START_REQ( get_exception_status )
|
SERVER_START_REQ( get_exception_status )
|
||||||
{
|
{
|
||||||
req->handle = handle;
|
req->handle = handle;
|
||||||
wine_server_set_reply( req, context, sizeof(*context) );
|
wine_server_set_reply( req, context, sizeof(*context) );
|
||||||
wine_server_call( req );
|
ret = wine_server_call( req );
|
||||||
ret = reply->status;
|
|
||||||
}
|
}
|
||||||
SERVER_END_REQ;
|
SERVER_END_REQ;
|
||||||
NtClose( handle );
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -164,19 +164,15 @@ static int send_debug_event( EXCEPTION_RECORD *rec, int first_chance, CONTEXT *c
|
||||||
SERVER_END_REQ;
|
SERVER_END_REQ;
|
||||||
if (!handle) return 0;
|
if (!handle) return 0;
|
||||||
|
|
||||||
/* No need to wait on the handle since the process gets suspended
|
NTDLL_wait_for_multiple_objects( 1, &handle, 0, NULL, 0 );
|
||||||
* once the event is passed to the debugger, so when we get back
|
|
||||||
* here the event has been continued already.
|
|
||||||
*/
|
|
||||||
SERVER_START_REQ( get_exception_status )
|
SERVER_START_REQ( get_exception_status )
|
||||||
{
|
{
|
||||||
req->handle = handle;
|
req->handle = handle;
|
||||||
wine_server_set_reply( req, context, sizeof(*context) );
|
wine_server_set_reply( req, context, sizeof(*context) );
|
||||||
wine_server_call( req );
|
ret = wine_server_call( req );
|
||||||
ret = reply->status;
|
|
||||||
}
|
}
|
||||||
SERVER_END_REQ;
|
SERVER_END_REQ;
|
||||||
NtClose( handle );
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -4207,6 +4207,6 @@ union generic_reply
|
||||||
struct set_mailslot_info_reply set_mailslot_info_reply;
|
struct set_mailslot_info_reply set_mailslot_info_reply;
|
||||||
};
|
};
|
||||||
|
|
||||||
#define SERVER_PROTOCOL_VERSION 195
|
#define SERVER_PROTOCOL_VERSION 196
|
||||||
|
|
||||||
#endif /* __WINE_WINE_SERVER_PROTOCOL_H */
|
#endif /* __WINE_WINE_SERVER_PROTOCOL_H */
|
||||||
|
|
|
@ -661,19 +661,19 @@ DECL_HANDLER(get_exception_status)
|
||||||
{
|
{
|
||||||
struct debug_event *event;
|
struct debug_event *event;
|
||||||
|
|
||||||
reply->status = 0;
|
|
||||||
if ((event = (struct debug_event *)get_handle_obj( current->process, req->handle,
|
if ((event = (struct debug_event *)get_handle_obj( current->process, req->handle,
|
||||||
0, &debug_event_ops )))
|
0, &debug_event_ops )))
|
||||||
{
|
{
|
||||||
|
close_handle( current->process, req->handle, NULL );
|
||||||
if (event->state == EVENT_CONTINUED)
|
if (event->state == EVENT_CONTINUED)
|
||||||
{
|
{
|
||||||
reply->status = event->status;
|
|
||||||
if (current->context == &event->context)
|
if (current->context == &event->context)
|
||||||
{
|
{
|
||||||
size_t size = min( sizeof(CONTEXT), get_reply_max_size() );
|
size_t size = min( sizeof(CONTEXT), get_reply_max_size() );
|
||||||
set_reply_data( &event->context, size );
|
set_reply_data( &event->context, size );
|
||||||
current->context = NULL;
|
current->context = NULL;
|
||||||
}
|
}
|
||||||
|
set_error( event->status );
|
||||||
}
|
}
|
||||||
else set_error( STATUS_PENDING );
|
else set_error( STATUS_PENDING );
|
||||||
release_object( event );
|
release_object( event );
|
||||||
|
|
|
@ -1162,7 +1162,6 @@ enum char_info_mode
|
||||||
@REQ(get_exception_status)
|
@REQ(get_exception_status)
|
||||||
obj_handle_t handle; /* handle to the queued event */
|
obj_handle_t handle; /* handle to the queued event */
|
||||||
@REPLY
|
@REPLY
|
||||||
int status; /* event continuation status */
|
|
||||||
VARARG(context,context); /* modified thread context */
|
VARARG(context,context); /* modified thread context */
|
||||||
@END
|
@END
|
||||||
|
|
||||||
|
|
|
@ -315,6 +315,7 @@ static void set_thread_info( struct thread *thread,
|
||||||
/* stop a thread (at the Unix level) */
|
/* stop a thread (at the Unix level) */
|
||||||
void stop_thread( struct thread *thread )
|
void stop_thread( struct thread *thread )
|
||||||
{
|
{
|
||||||
|
if (thread->context) return; /* already inside a debug event, no need for a signal */
|
||||||
/* can't stop a thread while initialisation is in progress */
|
/* can't stop a thread while initialisation is in progress */
|
||||||
if (is_process_init_done(thread->process)) send_thread_signal( thread, SIGUSR1 );
|
if (is_process_init_done(thread->process)) send_thread_signal( thread, SIGUSR1 );
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue