server: Remove no longer needed break_process.
Signed-off-by: Jacek Caban <jacek@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
4ee629a3ba
commit
b0ae02bea6
|
@ -1041,28 +1041,6 @@ void kill_debugged_processes( struct thread *debugger, int exit_code )
|
|||
}
|
||||
|
||||
|
||||
/* trigger a breakpoint event in a given process */
|
||||
void break_process( struct process *process )
|
||||
{
|
||||
struct thread *thread;
|
||||
|
||||
suspend_process( process );
|
||||
|
||||
LIST_FOR_EACH_ENTRY( thread, &process->thread_list, struct thread, proc_entry )
|
||||
{
|
||||
if (thread->context) /* inside an exception event already */
|
||||
{
|
||||
break_thread( thread );
|
||||
goto done;
|
||||
}
|
||||
}
|
||||
if ((thread = get_process_first_thread( process ))) thread->debug_break = 1;
|
||||
else set_error( STATUS_ACCESS_DENIED );
|
||||
done:
|
||||
resume_process( process );
|
||||
}
|
||||
|
||||
|
||||
/* detach a debugger from all its debuggees */
|
||||
void detach_debugged_processes( struct thread *debugger )
|
||||
{
|
||||
|
|
|
@ -135,7 +135,6 @@ extern void resume_process( struct process *process );
|
|||
extern void kill_process( struct process *process, int violent_death );
|
||||
extern void kill_console_processes( struct thread *renderer, int exit_code );
|
||||
extern void kill_debugged_processes( struct thread *debugger, int exit_code );
|
||||
extern void break_process( struct process *process );
|
||||
extern void detach_debugged_processes( struct thread *debugger );
|
||||
extern struct process_snapshot *process_snap( int *count );
|
||||
extern void enum_processes( int (*cb)(struct process*, void*), void *user);
|
||||
|
|
|
@ -185,7 +185,6 @@ static inline void init_thread_structure( struct thread *thread )
|
|||
thread->entry_point = 0;
|
||||
thread->debug_ctx = NULL;
|
||||
thread->debug_event = NULL;
|
||||
thread->debug_break = 0;
|
||||
thread->system_regs = 0;
|
||||
thread->queue = NULL;
|
||||
thread->wait = NULL;
|
||||
|
@ -1198,39 +1197,6 @@ static unsigned int get_context_system_regs( enum cpu_type cpu )
|
|||
return 0;
|
||||
}
|
||||
|
||||
/* trigger a breakpoint event in a given thread */
|
||||
void break_thread( struct thread *thread )
|
||||
{
|
||||
debug_event_t data;
|
||||
|
||||
assert( thread->context );
|
||||
|
||||
memset( &data, 0, sizeof(data) );
|
||||
data.exception.first = 1;
|
||||
data.exception.exc_code = STATUS_BREAKPOINT;
|
||||
data.exception.flags = EXCEPTION_CONTINUABLE;
|
||||
switch (thread->context->cpu)
|
||||
{
|
||||
case CPU_x86:
|
||||
data.exception.address = thread->context->ctl.i386_regs.eip;
|
||||
break;
|
||||
case CPU_x86_64:
|
||||
data.exception.address = thread->context->ctl.x86_64_regs.rip;
|
||||
break;
|
||||
case CPU_POWERPC:
|
||||
data.exception.address = thread->context->ctl.powerpc_regs.iar;
|
||||
break;
|
||||
case CPU_ARM:
|
||||
data.exception.address = thread->context->ctl.arm_regs.pc;
|
||||
break;
|
||||
case CPU_ARM64:
|
||||
data.exception.address = thread->context->ctl.arm64_regs.pc;
|
||||
break;
|
||||
}
|
||||
generate_debug_event( thread, EXCEPTION_DEBUG_EVENT, &data );
|
||||
thread->debug_break = 0;
|
||||
}
|
||||
|
||||
/* take a snapshot of currently running threads */
|
||||
struct thread_snapshot *thread_snap( int *count )
|
||||
{
|
||||
|
@ -1829,7 +1795,6 @@ DECL_HANDLER(set_suspend_context)
|
|||
memcpy( current->suspend_context, get_req_data(), sizeof(context_t) );
|
||||
current->suspend_context->flags = 0; /* to keep track of what is modified */
|
||||
current->context = current->suspend_context;
|
||||
if (current->debug_break) break_thread( current );
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -56,7 +56,6 @@ struct thread
|
|||
struct list mutex_list; /* list of currently owned mutexes */
|
||||
struct debug_ctx *debug_ctx; /* debugger context if this thread is a debugger */
|
||||
struct debug_event *debug_event; /* debug event being sent to debugger */
|
||||
int debug_break; /* debug breakpoint pending? */
|
||||
unsigned int system_regs; /* which system regs have been set */
|
||||
struct msg_queue *queue; /* message queue */
|
||||
struct thread_wait *wait; /* current wait condition if sleeping */
|
||||
|
@ -120,7 +119,6 @@ extern int wake_thread_queue_entry( struct wait_queue_entry *entry );
|
|||
extern int add_queue( struct object *obj, struct wait_queue_entry *entry );
|
||||
extern void remove_queue( struct object *obj, struct wait_queue_entry *entry );
|
||||
extern void kill_thread( struct thread *thread, int violent_death );
|
||||
extern void break_thread( struct thread *thread );
|
||||
extern void wake_up( struct object *obj, int max );
|
||||
extern int thread_queue_apc( struct process *process, struct thread *thread, struct object *owner, const apc_call_t *call_data );
|
||||
extern void thread_cancel_apc( struct thread *thread, struct object *owner, enum apc_type type );
|
||||
|
|
|
@ -5510,7 +5510,6 @@ static const struct
|
|||
{ "ALIAS_EXISTS", STATUS_ALIAS_EXISTS },
|
||||
{ "BAD_DEVICE_TYPE", STATUS_BAD_DEVICE_TYPE },
|
||||
{ "BAD_IMPERSONATION_LEVEL", STATUS_BAD_IMPERSONATION_LEVEL },
|
||||
{ "BREAKPOINT", STATUS_BREAKPOINT },
|
||||
{ "BUFFER_OVERFLOW", STATUS_BUFFER_OVERFLOW },
|
||||
{ "BUFFER_TOO_SMALL", STATUS_BUFFER_TOO_SMALL },
|
||||
{ "CANCELLED", STATUS_CANCELLED },
|
||||
|
|
Loading…
Reference in New Issue