Alexandre Julliard : ntdll: Move DbgUiIssueRemoteBreakin() to the Unix library.
Alexandre Julliard
julliard at winehq.org
Fri Jun 5 14:16:51 CDT 2020
Module: wine
Branch: master
Commit: 8e5d3042786917c04d3065755d81e7f8a751e529
URL: https://source.winehq.org/git/wine.git/?a=commit;h=8e5d3042786917c04d3065755d81e7f8a751e529
Author: Alexandre Julliard <julliard at winehq.org>
Date: Fri Jun 5 16:54:17 2020 +0200
ntdll: Move DbgUiIssueRemoteBreakin() to the Unix library.
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/ntdll/process.c | 13 +------------
dlls/ntdll/unix/loader.c | 2 +-
dlls/ntdll/unix/server.c | 19 ++++++++++++++++++-
dlls/ntdll/unix/unix_private.h | 3 ++-
dlls/ntdll/unixlib.h | 6 ++++--
5 files changed, 26 insertions(+), 17 deletions(-)
diff --git a/dlls/ntdll/process.c b/dlls/ntdll/process.c
index f47d3c4bc6..35937ce602 100644
--- a/dlls/ntdll/process.c
+++ b/dlls/ntdll/process.c
@@ -1788,16 +1788,5 @@ void WINAPI DbgUiRemoteBreakin( void *arg )
*/
NTSTATUS WINAPI DbgUiIssueRemoteBreakin( HANDLE process )
{
- apc_call_t call;
- apc_result_t result;
- NTSTATUS status;
-
- TRACE( "(%p)\n", process );
-
- memset( &call, 0, sizeof(call) );
-
- call.type = APC_BREAK_PROCESS;
- status = unix_funcs->server_queue_process_apc( process, &call, &result );
- if (status) return status;
- return result.break_process.status;
+ return unix_funcs->DbgUiIssueRemoteBreakin( process );
}
diff --git a/dlls/ntdll/unix/loader.c b/dlls/ntdll/unix/loader.c
index 4502be5f87..b5ee692024 100644
--- a/dlls/ntdll/unix/loader.c
+++ b/dlls/ntdll/unix/loader.c
@@ -1036,6 +1036,7 @@ static struct unix_funcs unix_funcs =
NtWaitForSingleObject,
NtWriteVirtualMemory,
NtYieldExecution,
+ DbgUiIssueRemoteBreakin,
get_main_args,
get_paths,
get_dll_path,
@@ -1072,7 +1073,6 @@ static struct unix_funcs unix_funcs =
wine_server_call,
server_select,
server_wait,
- server_queue_process_apc,
server_send_fd,
server_get_unix_fd,
server_fd_to_handle,
diff --git a/dlls/ntdll/unix/server.c b/dlls/ntdll/unix/server.c
index a7592f5e15..fb3f98dd57 100644
--- a/dlls/ntdll/unix/server.c
+++ b/dlls/ntdll/unix/server.c
@@ -727,7 +727,7 @@ unsigned int CDECL server_wait( const select_op_t *select_op, data_size_t size,
/***********************************************************************
* server_queue_process_apc
*/
-unsigned int CDECL server_queue_process_apc( HANDLE process, const apc_call_t *call, apc_result_t *result )
+unsigned int server_queue_process_apc( HANDLE process, const apc_call_t *call, apc_result_t *result )
{
for (;;)
{
@@ -1556,6 +1556,23 @@ size_t server_init_thread( void *entry_point, BOOL *suspend )
}
+/***********************************************************************
+ * DbgUiIssueRemoteBreakin
+ */
+NTSTATUS WINAPI DbgUiIssueRemoteBreakin( HANDLE process )
+{
+ apc_call_t call;
+ apc_result_t result;
+ NTSTATUS status;
+
+ memset( &call, 0, sizeof(call) );
+ call.type = APC_BREAK_PROCESS;
+ status = server_queue_process_apc( process, &call, &result );
+ if (status) return status;
+ return result.break_process.status;
+}
+
+
/******************************************************************************
* NtDuplicateObject
*/
diff --git a/dlls/ntdll/unix/unix_private.h b/dlls/ntdll/unix/unix_private.h
index debc14f68c..a422fd825e 100644
--- a/dlls/ntdll/unix/unix_private.h
+++ b/dlls/ntdll/unix/unix_private.h
@@ -83,7 +83,6 @@ extern unsigned int CDECL server_select( const select_op_t *select_op, data_size
user_apc_t *user_apc ) DECLSPEC_HIDDEN;
extern unsigned int CDECL server_wait( const select_op_t *select_op, data_size_t size, UINT flags,
const LARGE_INTEGER *timeout ) DECLSPEC_HIDDEN;
-extern unsigned int CDECL server_queue_process_apc( HANDLE process, const apc_call_t *call, apc_result_t *result ) DECLSPEC_HIDDEN;
extern void CDECL server_send_fd( int fd ) DECLSPEC_HIDDEN;
extern int CDECL server_get_unix_fd( HANDLE handle, unsigned int wanted_access, int *unix_fd,
int *needs_close, enum server_fd_type *type,
@@ -127,6 +126,8 @@ extern NTSTATUS context_from_server( CONTEXT *to, const context_t *from ) DECLSP
extern void wait_suspend( CONTEXT *context ) DECLSPEC_HIDDEN;
extern NTSTATUS set_thread_context( HANDLE handle, const context_t *context, BOOL *self ) DECLSPEC_HIDDEN;
extern NTSTATUS get_thread_context( HANDLE handle, context_t *context, unsigned int flags, BOOL *self ) DECLSPEC_HIDDEN;
+extern unsigned int server_queue_process_apc( HANDLE process, const apc_call_t *call,
+ apc_result_t *result ) DECLSPEC_HIDDEN;
extern NTSTATUS alloc_object_attributes( const OBJECT_ATTRIBUTES *attr, struct object_attributes **ret,
data_size_t *ret_len ) DECLSPEC_HIDDEN;
diff --git a/dlls/ntdll/unixlib.h b/dlls/ntdll/unixlib.h
index 5eea152a0e..58bdad1939 100644
--- a/dlls/ntdll/unixlib.h
+++ b/dlls/ntdll/unixlib.h
@@ -28,7 +28,7 @@ struct ldt_copy;
struct msghdr;
/* increment this when you change the function table */
-#define NTDLL_UNIXLIB_VERSION 29
+#define NTDLL_UNIXLIB_VERSION 30
struct unix_funcs
{
@@ -131,6 +131,9 @@ struct unix_funcs
SIZE_T size, SIZE_T *bytes_written );
NTSTATUS (WINAPI *NtYieldExecution)(void);
+ /* other Win32 API functions */
+ NTSTATUS (WINAPI *DbgUiIssueRemoteBreakin)( HANDLE process );
+
/* environment functions */
void (CDECL *get_main_args)( int *argc, char **argv[], char **envp[] );
void (CDECL *get_paths)( const char **builddir, const char **datadir, const char **configdir );
@@ -183,7 +186,6 @@ struct unix_funcs
user_apc_t *user_apc );
unsigned int (CDECL *server_wait)( const select_op_t *select_op, data_size_t size, UINT flags,
const LARGE_INTEGER *timeout );
- unsigned int (CDECL *server_queue_process_apc)( HANDLE process, const apc_call_t *call, apc_result_t *result );
void (CDECL *server_send_fd)( int fd );
int (CDECL *server_get_unix_fd)( HANDLE handle, unsigned int wanted_access, int *unix_fd,
int *needs_close, enum server_fd_type *type, unsigned int *options );
More information about the wine-cvs
mailing list