Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
5c62fe0b
Commit
5c62fe0b
authored
Feb 14, 2023
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ntdll: Replace the __wine_dbg_write() syscall by a Unix call.
parent
7406583e
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
47 additions
and
19 deletions
+47
-19
ntdll.spec
dlls/ntdll/ntdll.spec
+1
-1
thread.c
dlls/ntdll/thread.c
+10
-0
debug.c
dlls/ntdll/unix/debug.c
+22
-4
loader.c
dlls/ntdll/unix/loader.c
+2
-1
unix_private.h
dlls/ntdll/unix/unix_private.h
+5
-0
unixlib.h
dlls/ntdll/unixlib.h
+7
-0
syscall.c
dlls/wow64/syscall.c
+0
-12
syscall.h
dlls/wow64/syscall.h
+0
-1
No files found.
dlls/ntdll/ntdll.spec
View file @
5c62fe0b
...
...
@@ -1702,7 +1702,7 @@
@ extern -arch=arm64 __wine_current_teb
# Debugging
@ stdcall -
syscall -
norelay __wine_dbg_write(ptr long)
@ stdcall -norelay __wine_dbg_write(ptr long)
@ cdecl -norelay __wine_dbg_get_channel_flags(ptr)
@ cdecl -norelay __wine_dbg_header(long long str)
@ cdecl -norelay __wine_dbg_output(str)
...
...
dlls/ntdll/thread.c
View file @
5c62fe0b
...
...
@@ -158,6 +158,16 @@ int __cdecl __wine_dbg_header( enum __wine_debug_class cls, struct __wine_debug_
}
/***********************************************************************
* __wine_dbg_write (NTDLL.@)
*/
int
WINAPI
__wine_dbg_write
(
const
char
*
str
,
unsigned
int
len
)
{
struct
wine_dbg_write_params
params
=
{
str
,
len
};
return
WINE_UNIX_CALL
(
unix_wine_dbg_write
,
&
params
);
}
/***********************************************************************
* __wine_dbg_output (NTDLL.@)
*/
int
__cdecl
__wine_dbg_output
(
const
char
*
str
)
...
...
dlls/ntdll/unix/debug.c
View file @
5c62fe0b
...
...
@@ -253,12 +253,30 @@ const char * __cdecl __wine_dbg_strdup( const char *str )
}
/***********************************************************************
*
__wine_dbg_write (NTDLL.@)
*
unixcall_wine_dbg_write
*/
int
WINAPI
__wine_dbg_write
(
const
char
*
str
,
unsigned
int
len
)
NTSTATUS
unixcall_wine_dbg_write
(
void
*
args
)
{
return
write
(
2
,
str
,
len
);
struct
wine_dbg_write_params
*
params
=
args
;
return
write
(
2
,
params
->
str
,
params
->
len
);
}
#ifdef _WIN64
/***********************************************************************
* wow64_wine_dbg_write
*/
NTSTATUS
wow64_wine_dbg_write
(
void
*
args
)
{
struct
{
ULONG
str
;
unsigned
int
len
;
}
const
*
params32
=
args
;
return
write
(
2
,
ULongToPtr
(
params32
->
str
),
params32
->
len
);
}
#endif
/***********************************************************************
* __wine_dbg_output (NTDLL.@)
...
...
@@ -272,7 +290,7 @@ int __cdecl __wine_dbg_output( const char *str )
if
(
end
)
{
ret
+=
append_output
(
info
,
str
,
end
+
1
-
str
);
__wine_dbg_write
(
info
->
output
,
info
->
out_pos
);
write
(
2
,
info
->
output
,
info
->
out_pos
);
info
->
out_pos
=
0
;
str
=
end
+
1
;
}
...
...
dlls/ntdll/unix/loader.c
View file @
5c62fe0b
...
...
@@ -357,7 +357,6 @@ static void * const syscalls[] =
NtWriteFileGather
,
NtWriteVirtualMemory
,
NtYieldExecution
,
__wine_dbg_write
,
__wine_unix_spawnvp
,
wine_nt_to_unix_file_name
,
wine_server_call
,
...
...
@@ -2061,6 +2060,7 @@ const unixlib_entry_t __wine_unix_call_funcs[] =
{
load_so_dll
,
unwind_builtin_dll
,
unixcall_wine_dbg_write
,
system_time_precise
,
};
...
...
@@ -2077,6 +2077,7 @@ const unixlib_entry_t __wine_unix_call_wow64_funcs[] =
{
wow64_load_so_dll
,
wow64_unwind_builtin_dll
,
wow64_wine_dbg_write
,
system_time_precise
,
};
...
...
dlls/ntdll/unix/unix_private.h
View file @
5c62fe0b
...
...
@@ -283,6 +283,11 @@ extern void init_cpu_info(void) DECLSPEC_HIDDEN;
extern
void
add_completion
(
HANDLE
handle
,
ULONG_PTR
value
,
NTSTATUS
status
,
ULONG
info
,
BOOL
async
)
DECLSPEC_HIDDEN
;
extern
void
set_async_direct_result
(
HANDLE
*
async_handle
,
NTSTATUS
status
,
ULONG_PTR
information
,
BOOL
mark_pending
)
DECLSPEC_HIDDEN
;
extern
NTSTATUS
unixcall_wine_dbg_write
(
void
*
args
)
DECLSPEC_HIDDEN
;
#ifdef _WIN64
extern
NTSTATUS
wow64_wine_dbg_write
(
void
*
args
)
DECLSPEC_HIDDEN
;
#endif
extern
void
dbg_init
(
void
)
DECLSPEC_HIDDEN
;
extern
NTSTATUS
call_user_apc_dispatcher
(
CONTEXT
*
context_ptr
,
ULONG_PTR
arg1
,
ULONG_PTR
arg2
,
ULONG_PTR
arg3
,
...
...
dlls/ntdll/unixlib.h
View file @
5c62fe0b
...
...
@@ -25,6 +25,12 @@
struct
_DISPATCHER_CONTEXT
;
struct
wine_dbg_write_params
{
const
char
*
str
;
unsigned
int
len
;
};
struct
load_so_dll_params
{
UNICODE_STRING
nt_name
;
...
...
@@ -42,6 +48,7 @@ enum ntdll_unix_funcs
{
unix_load_so_dll
,
unix_unwind_builtin_dll
,
unix_wine_dbg_write
,
unix_system_time_precise
,
};
...
...
dlls/wow64/syscall.c
View file @
5c62fe0b
...
...
@@ -542,18 +542,6 @@ NTSTATUS WINAPI wow64_NtSetDefaultUILanguage( UINT *args )
/**********************************************************************
* wow64___wine_dbg_write
*/
NTSTATUS
WINAPI
wow64___wine_dbg_write
(
UINT
*
args
)
{
const
char
*
str
=
get_ptr
(
&
args
);
ULONG
len
=
get_ulong
(
&
args
);
return
__wine_dbg_write
(
str
,
len
);
}
/**********************************************************************
* wow64___wine_unix_spawnvp
*/
NTSTATUS
WINAPI
wow64___wine_unix_spawnvp
(
UINT
*
args
)
...
...
dlls/wow64/syscall.h
View file @
5c62fe0b
...
...
@@ -257,7 +257,6 @@
SYSCALL_ENTRY( NtWriteFileGather ) \
SYSCALL_ENTRY( NtWriteVirtualMemory ) \
SYSCALL_ENTRY( NtYieldExecution ) \
SYSCALL_ENTRY( __wine_dbg_write ) \
SYSCALL_ENTRY( __wine_unix_spawnvp ) \
SYSCALL_ENTRY( wine_nt_to_unix_file_name ) \
SYSCALL_ENTRY( wine_server_call ) \
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment