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
ab182dbf
Commit
ab182dbf
authored
Sep 26, 2017
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
server: No longer store the mapping object in the dll structure.
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
bc39a746
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
16 additions
and
53 deletions
+16
-53
loader.c
dlls/ntdll/loader.c
+0
-4
server_protocol.h
include/wine/server_protocol.h
+5
-7
file.h
server/file.h
+0
-1
mapping.c
server/mapping.c
+0
-6
process.c
server/process.c
+3
-16
process.h
server/process.h
+0
-2
protocol.def
server/protocol.def
+2
-5
request.h
server/request.h
+4
-7
trace.c
server/trace.c
+2
-5
No files found.
dlls/ntdll/loader.c
View file @
ab182dbf
...
...
@@ -1677,9 +1677,7 @@ static void load_builtin_callback( void *module, const char *filename )
SERVER_START_REQ
(
load_dll
)
{
req
->
mapping
=
0
;
req
->
base
=
wine_server_client_ptr
(
module
);
req
->
size
=
nt
->
OptionalHeader
.
SizeOfImage
;
req
->
dbg_offset
=
nt
->
FileHeader
.
PointerToSymbolTable
;
req
->
dbg_size
=
nt
->
FileHeader
.
NumberOfSymbols
;
req
->
name
=
wine_server_client_ptr
(
&
wm
->
ldr
.
FullDllName
.
Buffer
);
...
...
@@ -1895,9 +1893,7 @@ static NTSTATUS load_native_dll( LPCWSTR load_path, LPCWSTR name, HANDLE file,
SERVER_START_REQ
(
load_dll
)
{
req
->
mapping
=
wine_server_obj_handle
(
mapping
);
req
->
base
=
wine_server_client_ptr
(
module
);
req
->
size
=
nt
->
OptionalHeader
.
SizeOfImage
;
req
->
dbg_offset
=
nt
->
FileHeader
.
PointerToSymbolTable
;
req
->
dbg_size
=
nt
->
FileHeader
.
NumberOfSymbols
;
req
->
name
=
wine_server_client_ptr
(
&
wm
->
ldr
.
FullDllName
.
Buffer
);
...
...
include/wine/server_protocol.h
View file @
ab182dbf
...
...
@@ -991,9 +991,9 @@ struct get_dll_info_reply
{
struct
reply_header
__header
;
client_ptr_t
entry_point
;
data_size_t
size
;
data_size_t
filename_len
;
/* VARARG(filename,unicode_str); */
char
__pad_20
[
4
];
};
...
...
@@ -1029,14 +1029,12 @@ struct resume_thread_reply
struct
load_dll_request
{
struct
request_header
__header
;
obj_handle_t
mapping
;
data_size_t
dbg_offset
;
mod_handle_t
base
;
client_ptr_t
name
;
data_size_t
size
;
int
dbg_offset
;
int
dbg_size
;
data_size_t
dbg_size
;
/* VARARG(filename,unicode_str); */
char
__pad_
44
[
4
];
char
__pad_
36
[
4
];
};
struct
load_dll_reply
{
...
...
@@ -6463,6 +6461,6 @@ union generic_reply
struct
terminate_job_reply
terminate_job_reply
;
};
#define SERVER_PROTOCOL_VERSION 54
0
#define SERVER_PROTOCOL_VERSION 54
1
#endif
/* __WINE_WINE_SERVER_PROTOCOL_H */
server/file.h
View file @
ab182dbf
...
...
@@ -148,7 +148,6 @@ extern struct mapping *get_mapping_obj( struct process *process, obj_handle_t ha
unsigned
int
access
);
extern
obj_handle_t
open_mapping_file
(
struct
process
*
process
,
client_ptr_t
base
,
unsigned
int
access
,
unsigned
int
sharing
);
extern
struct
mapping
*
grab_mapping_unless_removable
(
struct
mapping
*
mapping
);
extern
void
free_mapped_views
(
struct
process
*
process
);
extern
int
get_page_size
(
void
);
...
...
server/mapping.c
View file @
ab182dbf
...
...
@@ -747,12 +747,6 @@ obj_handle_t open_mapping_file( struct process *process, client_ptr_t base,
return
handle
;
}
struct
mapping
*
grab_mapping_unless_removable
(
struct
mapping
*
mapping
)
{
if
(
is_fd_removable
(
mapping
->
fd
))
return
NULL
;
return
(
struct
mapping
*
)
grab_object
(
mapping
);
}
static
void
mapping_dump
(
struct
object
*
obj
,
int
verbose
)
{
struct
mapping
*
mapping
=
(
struct
mapping
*
)
obj
;
...
...
server/process.c
View file @
ab182dbf
...
...
@@ -735,9 +735,8 @@ static inline struct process_dll *find_process_dll( struct process *process, mod
}
/* add a dll to a process list */
static
struct
process_dll
*
process_load_dll
(
struct
process
*
process
,
struct
mapping
*
mapping
,
mod_handle_t
base
,
const
WCHAR
*
filename
,
data_size_t
name_len
)
static
struct
process_dll
*
process_load_dll
(
struct
process
*
process
,
mod_handle_t
base
,
const
WCHAR
*
filename
,
data_size_t
name_len
)
{
struct
process_dll
*
dll
;
...
...
@@ -750,7 +749,6 @@ static struct process_dll *process_load_dll( struct process *process, struct map
if
((
dll
=
mem_alloc
(
sizeof
(
*
dll
)
)))
{
dll
->
mapping
=
NULL
;
dll
->
base
=
base
;
dll
->
filename
=
NULL
;
dll
->
namelen
=
name_len
;
...
...
@@ -759,7 +757,6 @@ static struct process_dll *process_load_dll( struct process *process, struct map
free
(
dll
);
return
NULL
;
}
if
(
mapping
)
dll
->
mapping
=
grab_mapping_unless_removable
(
mapping
);
list_add_tail
(
&
process
->
dlls
,
&
dll
->
entry
);
}
return
dll
;
...
...
@@ -772,7 +769,6 @@ static void process_unload_dll( struct process *process, mod_handle_t base )
if
(
dll
&&
(
&
dll
->
entry
!=
list_head
(
&
process
->
dlls
)))
/* main exe can't be unloaded */
{
if
(
dll
->
mapping
)
release_object
(
dll
->
mapping
);
free
(
dll
->
filename
);
list_remove
(
&
dll
->
entry
);
free
(
dll
);
...
...
@@ -866,7 +862,6 @@ static void process_killed( struct process *process )
while
((
ptr
=
list_head
(
&
process
->
dlls
)))
{
struct
process_dll
*
dll
=
LIST_ENTRY
(
ptr
,
struct
process_dll
,
entry
);
if
(
dll
->
mapping
)
release_object
(
dll
->
mapping
);
free
(
dll
->
filename
);
list_remove
(
&
dll
->
entry
);
free
(
dll
);
...
...
@@ -1491,15 +1486,9 @@ DECL_HANDLER(write_process_memory)
DECL_HANDLER
(
load_dll
)
{
struct
process_dll
*
dll
;
struct
mapping
*
mapping
=
NULL
;
if
(
req
->
mapping
&&
!
(
mapping
=
get_mapping_obj
(
current
->
process
,
req
->
mapping
,
SECTION_QUERY
)))
return
;
if
((
dll
=
process_load_dll
(
current
->
process
,
mapping
,
req
->
base
,
get_req_data
(),
get_req_data_size
()
)))
if
((
dll
=
process_load_dll
(
current
->
process
,
req
->
base
,
get_req_data
(),
get_req_data_size
()
)))
{
dll
->
size
=
req
->
size
;
dll
->
dbg_offset
=
req
->
dbg_offset
;
dll
->
dbg_size
=
req
->
dbg_size
;
dll
->
name
=
req
->
name
;
...
...
@@ -1507,7 +1496,6 @@ DECL_HANDLER(load_dll)
if
(
is_process_init_done
(
current
->
process
))
generate_debug_event
(
current
,
LOAD_DLL_DEBUG_EVENT
,
dll
);
}
if
(
mapping
)
release_object
(
mapping
);
}
/* notify the server that a dll is being unloaded */
...
...
@@ -1533,7 +1521,6 @@ DECL_HANDLER(get_dll_info)
if
(
dll
)
{
reply
->
size
=
dll
->
size
;
reply
->
entry_point
=
0
;
/* FIXME */
reply
->
filename_len
=
dll
->
namelen
;
if
(
dll
->
filename
)
...
...
server/process.h
View file @
ab182dbf
...
...
@@ -36,10 +36,8 @@ enum startup_state { STARTUP_IN_PROGRESS, STARTUP_DONE, STARTUP_ABORTED };
struct
process_dll
{
struct
list
entry
;
/* entry in per-process dll list */
struct
mapping
*
mapping
;
/* dll file */
mod_handle_t
base
;
/* dll base address (in process addr space) */
client_ptr_t
name
;
/* ptr to ptr to name (in process addr space) */
data_size_t
size
;
/* dll size */
int
dbg_offset
;
/* debug info offset */
int
dbg_size
;
/* debug info size */
data_size_t
namelen
;
/* length of dll file name */
...
...
server/protocol.def
View file @
ab182dbf
...
...
@@ -917,7 +917,6 @@ struct rawinput_device
mod_handle_t base_address; /* base address of module */
@REPLY
client_ptr_t entry_point;
data_size_t size; /* module size */
data_size_t filename_len; /* buffer len in bytes required to store filename */
VARARG(filename,unicode_str); /* file name of module */
@END
...
...
@@ -941,12 +940,10 @@ struct rawinput_device
/* Notify the server that a dll has been loaded */
@REQ(load_dll)
obj_handle_t mapping; /* file mapping handle
*/
data_size_t dbg_offset; /* debug info offset
*/
mod_handle_t base; /* base address */
client_ptr_t name; /* ptr to ptr to name (in process addr space) */
data_size_t size; /* dll size */
int dbg_offset; /* debug info offset */
int dbg_size; /* debug info size */
data_size_t dbg_size; /* debug info size */
VARARG(filename,unicode_str); /* file name of dll */
@END
...
...
server/request.h
View file @
ab182dbf
...
...
@@ -848,8 +848,7 @@ C_ASSERT( FIELD_OFFSET(struct get_dll_info_request, handle) == 12 );
C_ASSERT
(
FIELD_OFFSET
(
struct
get_dll_info_request
,
base_address
)
==
16
);
C_ASSERT
(
sizeof
(
struct
get_dll_info_request
)
==
24
);
C_ASSERT
(
FIELD_OFFSET
(
struct
get_dll_info_reply
,
entry_point
)
==
8
);
C_ASSERT
(
FIELD_OFFSET
(
struct
get_dll_info_reply
,
size
)
==
16
);
C_ASSERT
(
FIELD_OFFSET
(
struct
get_dll_info_reply
,
filename_len
)
==
20
);
C_ASSERT
(
FIELD_OFFSET
(
struct
get_dll_info_reply
,
filename_len
)
==
16
);
C_ASSERT
(
sizeof
(
struct
get_dll_info_reply
)
==
24
);
C_ASSERT
(
FIELD_OFFSET
(
struct
suspend_thread_request
,
handle
)
==
12
);
C_ASSERT
(
sizeof
(
struct
suspend_thread_request
)
==
16
);
...
...
@@ -859,13 +858,11 @@ C_ASSERT( FIELD_OFFSET(struct resume_thread_request, handle) == 12 );
C_ASSERT
(
sizeof
(
struct
resume_thread_request
)
==
16
);
C_ASSERT
(
FIELD_OFFSET
(
struct
resume_thread_reply
,
count
)
==
8
);
C_ASSERT
(
sizeof
(
struct
resume_thread_reply
)
==
16
);
C_ASSERT
(
FIELD_OFFSET
(
struct
load_dll_request
,
mapping
)
==
12
);
C_ASSERT
(
FIELD_OFFSET
(
struct
load_dll_request
,
dbg_offset
)
==
12
);
C_ASSERT
(
FIELD_OFFSET
(
struct
load_dll_request
,
base
)
==
16
);
C_ASSERT
(
FIELD_OFFSET
(
struct
load_dll_request
,
name
)
==
24
);
C_ASSERT
(
FIELD_OFFSET
(
struct
load_dll_request
,
size
)
==
32
);
C_ASSERT
(
FIELD_OFFSET
(
struct
load_dll_request
,
dbg_offset
)
==
36
);
C_ASSERT
(
FIELD_OFFSET
(
struct
load_dll_request
,
dbg_size
)
==
40
);
C_ASSERT
(
sizeof
(
struct
load_dll_request
)
==
48
);
C_ASSERT
(
FIELD_OFFSET
(
struct
load_dll_request
,
dbg_size
)
==
32
);
C_ASSERT
(
sizeof
(
struct
load_dll_request
)
==
40
);
C_ASSERT
(
FIELD_OFFSET
(
struct
unload_dll_request
,
base
)
==
16
);
C_ASSERT
(
sizeof
(
struct
unload_dll_request
)
==
24
);
C_ASSERT
(
FIELD_OFFSET
(
struct
queue_apc_request
,
handle
)
==
12
);
...
...
server/trace.c
View file @
ab182dbf
...
...
@@ -1422,7 +1422,6 @@ static void dump_get_dll_info_request( const struct get_dll_info_request *req )
static
void
dump_get_dll_info_reply
(
const
struct
get_dll_info_reply
*
req
)
{
dump_uint64
(
" entry_point="
,
&
req
->
entry_point
);
fprintf
(
stderr
,
", size=%u"
,
req
->
size
);
fprintf
(
stderr
,
", filename_len=%u"
,
req
->
filename_len
);
dump_varargs_unicode_str
(
", filename="
,
cur_size
);
}
...
...
@@ -1449,12 +1448,10 @@ static void dump_resume_thread_reply( const struct resume_thread_reply *req )
static
void
dump_load_dll_request
(
const
struct
load_dll_request
*
req
)
{
fprintf
(
stderr
,
"
mapping=%04x"
,
req
->
mapping
);
fprintf
(
stderr
,
"
dbg_offset=%u"
,
req
->
dbg_offset
);
dump_uint64
(
", base="
,
&
req
->
base
);
dump_uint64
(
", name="
,
&
req
->
name
);
fprintf
(
stderr
,
", size=%u"
,
req
->
size
);
fprintf
(
stderr
,
", dbg_offset=%d"
,
req
->
dbg_offset
);
fprintf
(
stderr
,
", dbg_size=%d"
,
req
->
dbg_size
);
fprintf
(
stderr
,
", dbg_size=%u"
,
req
->
dbg_size
);
dump_varargs_unicode_str
(
", filename="
,
cur_size
);
}
...
...
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