mirror of
https://github.com/reactos/wine.git
synced 2024-11-28 14:10:32 +00:00
ntdll: ProcessDebugFlags should return debug_children flag instead of !debugger_present.
Signed-off-by: Sebastian Lackner <sebastian@fds-team.de> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
6cf682d207
commit
1980834c7d
@ -339,7 +339,7 @@ NTSTATUS WINAPI NtQueryInformationProcess(
|
||||
req->handle = wine_server_obj_handle( ProcessHandle );
|
||||
if ((ret = wine_server_call( req )) == STATUS_SUCCESS)
|
||||
{
|
||||
*(DWORD *)ProcessInformation = !reply->debugger_present;
|
||||
*(DWORD *)ProcessInformation = reply->debug_children;
|
||||
}
|
||||
}
|
||||
SERVER_END_REQ;
|
||||
|
@ -1345,10 +1345,6 @@ static void test_query_process_debug_flags(int argc, char **argv)
|
||||
status = pNtQueryInformationProcess(pi.hProcess, ProcessDebugFlags,
|
||||
&debug_flags, sizeof(debug_flags), NULL);
|
||||
ok(!status, "NtQueryInformationProcess failed, status %#x.\n", status);
|
||||
if (!expected_flags)
|
||||
ok(debug_flags == expected_flags, "Expected flag %x, got %x.\n", expected_flags, debug_flags);
|
||||
else
|
||||
todo_wine
|
||||
ok(debug_flags == expected_flags, "Expected flag %x, got %x.\n", expected_flags, debug_flags);
|
||||
|
||||
if (!(test_flags[i] & CREATE_SUSPENDED))
|
||||
@ -1379,10 +1375,6 @@ static void test_query_process_debug_flags(int argc, char **argv)
|
||||
status = pNtQueryInformationProcess(pi.hProcess, ProcessDebugFlags,
|
||||
&debug_flags, sizeof(debug_flags), NULL);
|
||||
ok(!status, "NtQueryInformationProcess failed, status %#x.\n", status);
|
||||
if (expected_flags)
|
||||
ok(debug_flags == expected_flags, "Expected flag %x, got %x.\n", expected_flags, debug_flags);
|
||||
else
|
||||
todo_wine
|
||||
ok(debug_flags == expected_flags, "Expected flag %x, got %x.\n", expected_flags, debug_flags);
|
||||
|
||||
ret = DebugActiveProcess(pi.dwProcessId);
|
||||
|
@ -857,7 +857,8 @@ struct get_process_info_reply
|
||||
int exit_code;
|
||||
int priority;
|
||||
cpu_type_t cpu;
|
||||
int debugger_present;
|
||||
short int debugger_present;
|
||||
short int debug_children;
|
||||
};
|
||||
|
||||
|
||||
@ -6153,6 +6154,6 @@ union generic_reply
|
||||
struct terminate_job_reply terminate_job_reply;
|
||||
};
|
||||
|
||||
#define SERVER_PROTOCOL_VERSION 490
|
||||
#define SERVER_PROTOCOL_VERSION 491
|
||||
|
||||
#endif /* __WINE_WINE_SERVER_PROTOCOL_H */
|
||||
|
@ -443,6 +443,7 @@ static int debugger_attach( struct process *process, struct thread *debugger )
|
||||
resume_process( process );
|
||||
return 0;
|
||||
}
|
||||
process->debug_children = 0;
|
||||
return 1;
|
||||
|
||||
error:
|
||||
@ -483,7 +484,6 @@ int debugger_detach( struct process *process, struct thread *debugger )
|
||||
|
||||
/* remove relationships between process and its debugger */
|
||||
process->debugger = NULL;
|
||||
process->debug_children = 0;
|
||||
if (!set_process_debug_flag( process, 0 )) clear_error(); /* ignore error */
|
||||
|
||||
/* from this function */
|
||||
|
@ -513,7 +513,7 @@ struct thread *create_process( int fd, struct thread *parent_thread, int inherit
|
||||
process->priority = PROCESS_PRIOCLASS_NORMAL;
|
||||
process->suspend = 0;
|
||||
process->is_system = 0;
|
||||
process->debug_children = 0;
|
||||
process->debug_children = 1;
|
||||
process->is_terminating = 0;
|
||||
process->job = NULL;
|
||||
process->console = NULL;
|
||||
@ -1228,7 +1228,7 @@ DECL_HANDLER(new_process)
|
||||
else if (parent->debugger && parent->debug_children)
|
||||
{
|
||||
set_process_debugger( process, parent->debugger );
|
||||
process->debug_children = 1;
|
||||
/* debug_children is set to 1 by default */
|
||||
}
|
||||
|
||||
if (!(req->create_flags & CREATE_NEW_PROCESS_GROUP))
|
||||
@ -1359,6 +1359,7 @@ DECL_HANDLER(get_process_info)
|
||||
reply->end_time = process->end_time;
|
||||
reply->cpu = process->cpu;
|
||||
reply->debugger_present = !!process->debugger;
|
||||
reply->debug_children = process->debug_children;
|
||||
release_object( process );
|
||||
}
|
||||
}
|
||||
|
@ -818,7 +818,8 @@ struct rawinput_device
|
||||
int exit_code; /* process exit code */
|
||||
int priority; /* priority class */
|
||||
cpu_type_t cpu; /* CPU that this process is running on */
|
||||
int debugger_present; /* process is being debugged */
|
||||
short int debugger_present; /* process is being debugged */
|
||||
short int debug_children; /* inherit debugger to child processes */
|
||||
@END
|
||||
|
||||
|
||||
|
@ -760,6 +760,7 @@ C_ASSERT( FIELD_OFFSET(struct get_process_info_reply, exit_code) == 48 );
|
||||
C_ASSERT( FIELD_OFFSET(struct get_process_info_reply, priority) == 52 );
|
||||
C_ASSERT( FIELD_OFFSET(struct get_process_info_reply, cpu) == 56 );
|
||||
C_ASSERT( FIELD_OFFSET(struct get_process_info_reply, debugger_present) == 60 );
|
||||
C_ASSERT( FIELD_OFFSET(struct get_process_info_reply, debug_children) == 62 );
|
||||
C_ASSERT( sizeof(struct get_process_info_reply) == 64 );
|
||||
C_ASSERT( FIELD_OFFSET(struct set_process_info_request, handle) == 12 );
|
||||
C_ASSERT( FIELD_OFFSET(struct set_process_info_request, mask) == 16 );
|
||||
|
@ -1279,6 +1279,7 @@ static void dump_get_process_info_reply( const struct get_process_info_reply *re
|
||||
fprintf( stderr, ", priority=%d", req->priority );
|
||||
dump_cpu_type( ", cpu=", &req->cpu );
|
||||
fprintf( stderr, ", debugger_present=%d", req->debugger_present );
|
||||
fprintf( stderr, ", debug_children=%d", req->debug_children );
|
||||
}
|
||||
|
||||
static void dump_set_process_info_request( const struct set_process_info_request *req )
|
||||
|
Loading…
Reference in New Issue
Block a user