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
1fe7b8dd
Commit
1fe7b8dd
authored
Nov 10, 2022
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ntdll: Use a proper Unix syscall for unwind_builtin_dll().
parent
1d169078
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
34 additions
and
23 deletions
+34
-23
loader.c
dlls/ntdll/loader.c
+0
-7
signal_arm.c
dlls/ntdll/signal_arm.c
+3
-1
signal_arm64.c
dlls/ntdll/signal_arm64.c
+3
-1
signal_x86_64.c
dlls/ntdll/signal_x86_64.c
+2
-1
loader.c
dlls/ntdll/unix/loader.c
+3
-1
signal_arm.c
dlls/ntdll/unix/signal_arm.c
+4
-1
signal_arm64.c
dlls/ntdll/unix/signal_arm64.c
+4
-1
signal_i386.c
dlls/ntdll/unix/signal_i386.c
+1
-1
signal_x86_64.c
dlls/ntdll/unix/signal_x86_64.c
+4
-1
unix_private.h
dlls/ntdll/unix/unix_private.h
+1
-3
unixlib.h
dlls/ntdll/unixlib.h
+9
-5
No files found.
dlls/ntdll/loader.c
View file @
1fe7b8dd
...
...
@@ -4602,12 +4602,6 @@ BOOL WINAPI DllMain( HINSTANCE inst, DWORD reason, LPVOID reserved )
}
static
NTSTATUS
CDECL
unwind_builtin_dll_fallback
(
ULONG
type
,
struct
_DISPATCHER_CONTEXT
*
dispatch
,
CONTEXT
*
context
)
{
return
STATUS_UNSUCCESSFUL
;
}
static
LONGLONG
WINAPI
RtlGetSystemTimePrecise_fallback
(
void
)
{
LARGE_INTEGER
now
;
...
...
@@ -4617,7 +4611,6 @@ static LONGLONG WINAPI RtlGetSystemTimePrecise_fallback(void)
static
const
struct
unix_funcs
unix_fallbacks
=
{
unwind_builtin_dll_fallback
,
RtlGetSystemTimePrecise_fallback
,
};
...
...
dlls/ntdll/signal_arm.c
View file @
1fe7b8dd
...
...
@@ -163,7 +163,9 @@ static NTSTATUS virtual_unwind( ULONG type, DISPATCHER_CONTEXT *dispatch, CONTEX
if
(
!
module
||
(
module
->
Flags
&
LDR_WINE_INTERNAL
))
{
status
=
unix_funcs
->
unwind_builtin_dll
(
type
,
dispatch
,
context
);
struct
unwind_builtin_dll_params
params
=
{
type
,
dispatch
,
context
};
status
=
NTDLL_UNIX_CALL
(
unwind_builtin_dll
,
&
params
);
if
(
status
!=
STATUS_SUCCESS
)
return
status
;
if
(
dispatch
->
EstablisherFrame
)
...
...
dlls/ntdll/signal_arm64.c
View file @
1fe7b8dd
...
...
@@ -197,7 +197,9 @@ static NTSTATUS virtual_unwind( ULONG type, DISPATCHER_CONTEXT *dispatch, CONTEX
if
(
!
module
||
(
module
->
Flags
&
LDR_WINE_INTERNAL
))
{
status
=
unix_funcs
->
unwind_builtin_dll
(
type
,
dispatch
,
context
);
struct
unwind_builtin_dll_params
params
=
{
type
,
dispatch
,
context
};
status
=
NTDLL_UNIX_CALL
(
unwind_builtin_dll
,
&
params
);
if
(
status
!=
STATUS_SUCCESS
)
return
status
;
if
(
dispatch
->
EstablisherFrame
)
...
...
dlls/ntdll/signal_x86_64.c
View file @
1fe7b8dd
...
...
@@ -280,8 +280,9 @@ static NTSTATUS virtual_unwind( ULONG type, DISPATCHER_CONTEXT *dispatch, CONTEX
if
(
!
module
||
(
module
->
Flags
&
LDR_WINE_INTERNAL
))
{
st
atus
=
unix_funcs
->
unwind_builtin_dll
(
type
,
dispatch
,
context
)
;
st
ruct
unwind_builtin_dll_params
params
=
{
type
,
dispatch
,
context
}
;
status
=
NTDLL_UNIX_CALL
(
unwind_builtin_dll
,
&
params
);
if
(
!
status
&&
dispatch
->
LanguageHandler
&&
!
module
)
{
FIXME
(
"calling personality routine in system library not supported yet
\n
"
);
...
...
dlls/ntdll/unix/loader.c
View file @
1fe7b8dd
...
...
@@ -2155,7 +2155,6 @@ static ULONG_PTR get_image_address(void)
*/
static
struct
unix_funcs
unix_funcs
=
{
unwind_builtin_dll
,
RtlGetSystemTimePrecise
,
};
...
...
@@ -2167,11 +2166,13 @@ const unixlib_entry_t __wine_unix_call_funcs[] =
{
load_so_dll
,
init_builtin_dll
,
unwind_builtin_dll
,
};
static
NTSTATUS
wow64_load_so_dll
(
void
*
args
)
{
return
STATUS_INVALID_IMAGE_FORMAT
;
}
static
NTSTATUS
wow64_init_builtin_dll
(
void
*
args
)
{
return
STATUS_UNSUCCESSFUL
;
}
static
NTSTATUS
wow64_unwind_builtin_dll
(
void
*
args
)
{
return
STATUS_UNSUCCESSFUL
;
}
/***********************************************************************
* __wine_unix_call_wow64_funcs
...
...
@@ -2180,6 +2181,7 @@ const unixlib_entry_t __wine_unix_call_wow64_funcs[] =
{
wow64_load_so_dll
,
wow64_init_builtin_dll
,
wow64_unwind_builtin_dll
,
};
...
...
dlls/ntdll/unix/signal_arm.c
View file @
1fe7b8dd
...
...
@@ -728,8 +728,11 @@ static NTSTATUS libunwind_virtual_unwind( DWORD ip, DWORD *frame, CONTEXT *conte
/***********************************************************************
* unwind_builtin_dll
*/
NTSTATUS
CDECL
unwind_builtin_dll
(
ULONG
type
,
struct
_DISPATCHER_CONTEXT
*
dispatch
,
CONTEXT
*
context
)
NTSTATUS
unwind_builtin_dll
(
void
*
args
)
{
struct
unwind_builtin_dll_params
*
params
=
args
;
DISPATCHER_CONTEXT
*
dispatch
=
params
->
dispatch
;
CONTEXT
*
context
=
params
->
context
;
DWORD
ip
=
context
->
Pc
-
(
dispatch
->
ControlPcIsUnwound
?
2
:
0
);
#ifdef linux
const
struct
exidx_entry
*
entry
=
find_exidx_entry
(
(
void
*
)
ip
);
...
...
dlls/ntdll/unix/signal_arm64.c
View file @
1fe7b8dd
...
...
@@ -458,8 +458,11 @@ static NTSTATUS libunwind_virtual_unwind( ULONG_PTR ip, ULONG_PTR *frame, CONTEX
*
* Equivalent of RtlVirtualUnwind for builtin modules.
*/
NTSTATUS
CDECL
unwind_builtin_dll
(
ULONG
type
,
DISPATCHER_CONTEXT
*
dispatch
,
CONTEXT
*
context
)
NTSTATUS
unwind_builtin_dll
(
void
*
args
)
{
struct
unwind_builtin_dll_params
*
params
=
args
;
DISPATCHER_CONTEXT
*
dispatch
=
params
->
dispatch
;
CONTEXT
*
context
=
params
->
context
;
struct
dwarf_eh_bases
bases
;
const
struct
dwarf_fde
*
fde
=
_Unwind_Find_FDE
(
(
void
*
)(
context
->
Pc
-
1
),
&
bases
);
...
...
dlls/ntdll/unix/signal_i386.c
View file @
1fe7b8dd
...
...
@@ -512,7 +512,7 @@ static inline void set_gs( WORD val ) { __asm__( "mov %0,%%gs" :: "r" (val)); }
/***********************************************************************
* unwind_builtin_dll
*/
NTSTATUS
CDECL
unwind_builtin_dll
(
ULONG
type
,
struct
_DISPATCHER_CONTEXT
*
dispatch
,
CONTEXT
*
context
)
NTSTATUS
unwind_builtin_dll
(
void
*
args
)
{
return
STATUS_UNSUCCESSFUL
;
}
...
...
dlls/ntdll/unix/signal_x86_64.c
View file @
1fe7b8dd
...
...
@@ -746,8 +746,11 @@ static NTSTATUS libunwind_virtual_unwind( ULONG64 ip, ULONG64 *frame, CONTEXT *c
/***********************************************************************
* unwind_builtin_dll
*/
NTSTATUS
CDECL
unwind_builtin_dll
(
ULONG
type
,
DISPATCHER_CONTEXT
*
dispatch
,
CONTEXT
*
context
)
NTSTATUS
unwind_builtin_dll
(
void
*
args
)
{
struct
unwind_builtin_dll_params
*
params
=
args
;
DISPATCHER_CONTEXT
*
dispatch
=
params
->
dispatch
;
CONTEXT
*
context
=
params
->
context
;
struct
dwarf_eh_bases
bases
;
const
struct
dwarf_fde
*
fde
=
_Unwind_Find_FDE
(
(
void
*
)(
context
->
Rip
-
1
),
&
bases
);
...
...
dlls/ntdll/unix/unix_private.h
View file @
1fe7b8dd
...
...
@@ -108,9 +108,6 @@ extern void (WINAPI *p__wine_ctrl_routine)(void *) DECLSPEC_HIDDEN;
extern
SYSTEM_DLL_INIT_BLOCK
*
pLdrSystemDllInitBlock
DECLSPEC_HIDDEN
;
extern
LONGLONG
CDECL
fast_RtlGetSystemTimePrecise
(
void
)
DECLSPEC_HIDDEN
;
extern
NTSTATUS
CDECL
unwind_builtin_dll
(
ULONG
type
,
struct
_DISPATCHER_CONTEXT
*
dispatch
,
CONTEXT
*
context
)
DECLSPEC_HIDDEN
;
struct
_FILE_FS_DEVICE_INFORMATION
;
extern
const
char
wine_build
[]
DECLSPEC_HIDDEN
;
...
...
@@ -230,6 +227,7 @@ extern void virtual_fill_image_information( const pe_image_info_t *pe_info,
extern
void
release_builtin_module
(
void
*
module
)
DECLSPEC_HIDDEN
;
extern
void
*
get_builtin_so_handle
(
void
*
module
)
DECLSPEC_HIDDEN
;
extern
NTSTATUS
load_builtin_unixlib
(
void
*
module
,
const
char
*
name
)
DECLSPEC_HIDDEN
;
extern
NTSTATUS
unwind_builtin_dll
(
void
*
args
)
DECLSPEC_HIDDEN
;
extern
NTSTATUS
get_thread_ldt_entry
(
HANDLE
handle
,
void
*
data
,
ULONG
len
,
ULONG
*
ret_len
)
DECLSPEC_HIDDEN
;
extern
void
*
get_native_context
(
CONTEXT
*
context
)
DECLSPEC_HIDDEN
;
...
...
dlls/ntdll/unixlib.h
View file @
1fe7b8dd
...
...
@@ -31,10 +31,18 @@ struct load_so_dll_params
void
**
module
;
};
struct
unwind_builtin_dll_params
{
ULONG
type
;
struct
_DISPATCHER_CONTEXT
*
dispatch
;
CONTEXT
*
context
;
};
enum
ntdll_unix_funcs
{
unix_load_so_dll
,
unix_init_builtin_dll
,
unix_unwind_builtin_dll
,
};
extern
unixlib_handle_t
ntdll_unix_handle
;
...
...
@@ -42,14 +50,10 @@ extern unixlib_handle_t ntdll_unix_handle;
#define NTDLL_UNIX_CALL( func, params ) __wine_unix_call( ntdll_unix_handle, unix_ ## func, params )
/* increment this when you change the function table */
#define NTDLL_UNIXLIB_VERSION 13
7
#define NTDLL_UNIXLIB_VERSION 13
8
struct
unix_funcs
{
/* loader functions */
NTSTATUS
(
CDECL
*
unwind_builtin_dll
)(
ULONG
type
,
struct
_DISPATCHER_CONTEXT
*
dispatch
,
CONTEXT
*
context
);
/* other Win32 API functions */
LONGLONG
(
WINAPI
*
RtlGetSystemTimePrecise
)(
void
);
};
...
...
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