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
d066a9a0
Commit
d066a9a0
authored
Dec 30, 2008
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
server: Make the mapping base address a client_ptr_t instead of a void pointer.
parent
8e9c156e
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
13 additions
and
10 deletions
+13
-10
virtual.c
dlls/ntdll/virtual.c
+2
-1
server_protocol.h
include/wine/server_protocol.h
+2
-2
mapping.c
server/mapping.c
+5
-5
protocol.def
server/protocol.def
+1
-1
trace.c
server/trace.c
+3
-1
No files found.
dlls/ntdll/virtual.c
View file @
d066a9a0
...
...
@@ -2285,11 +2285,12 @@ NTSTATUS WINAPI NtMapViewOfSection( HANDLE handle, HANDLE process, PVOID *addr_p
req
->
access
=
access
;
res
=
wine_server_call
(
req
);
map_vprot
=
reply
->
protect
;
base
=
reply
->
base
;
base
=
wine_server_get_ptr
(
reply
->
base
)
;
full_size
=
reply
->
size
;
header_size
=
reply
->
header_size
;
dup_mapping
=
wine_server_ptr_handle
(
reply
->
mapping
);
shared_file
=
wine_server_ptr_handle
(
reply
->
shared_file
);
if
((
ULONG_PTR
)
base
!=
reply
->
base
)
base
=
NULL
;
}
SERVER_END_REQ
;
if
(
res
)
return
res
;
...
...
include/wine/server_protocol.h
View file @
d066a9a0
...
...
@@ -1737,7 +1737,7 @@ struct get_mapping_info_reply
mem_size_t
size
;
int
protect
;
int
header_size
;
void
*
base
;
client_ptr_t
base
;
obj_handle_t
mapping
;
obj_handle_t
shared_file
;
};
...
...
@@ -5052,6 +5052,6 @@ union generic_reply
struct
set_window_layered_info_reply
set_window_layered_info_reply
;
};
#define SERVER_PROTOCOL_VERSION 36
5
#define SERVER_PROTOCOL_VERSION 36
6
#endif
/* __WINE_WINE_SERVER_PROTOCOL_H */
server/mapping.c
View file @
d066a9a0
...
...
@@ -58,7 +58,7 @@ struct mapping
int
protect
;
/* protection flags */
struct
file
*
file
;
/* file mapped */
int
header_size
;
/* size of headers (for PE image mapping) */
void
*
base
;
/* default base addr (for PE image mapping) */
client_ptr_t
base
;
/* default base addr (for PE image mapping) */
struct
ranges
*
committed
;
/* list of committed ranges in this mapping */
struct
file
*
shared_file
;
/* temp file for shared PE mapping */
struct
list
shared_entry
;
/* entry in global shared PE mappings list */
...
...
@@ -341,7 +341,7 @@ static int get_image_params( struct mapping *mapping )
if
(
mapping
->
shared_file
)
list_add_head
(
&
shared_list
,
&
mapping
->
shared_entry
);
mapping
->
size
=
ROUND_SIZE
(
nt
.
OptionalHeader
.
SizeOfImage
);
mapping
->
base
=
(
void
*
)
nt
.
OptionalHeader
.
ImageBase
;
mapping
->
base
=
nt
.
OptionalHeader
.
ImageBase
;
mapping
->
header_size
=
max
(
pos
+
size
,
nt
.
OptionalHeader
.
SizeOfHeaders
);
mapping
->
protect
=
VPROT_IMAGE
;
...
...
@@ -389,7 +389,7 @@ static struct object *create_mapping( struct directory *root, const struct unico
DACL_SECURITY_INFORMATION
|
SACL_SECURITY_INFORMATION
);
mapping
->
header_size
=
0
;
mapping
->
base
=
NULL
;
mapping
->
base
=
0
;
mapping
->
file
=
NULL
;
mapping
->
shared_file
=
NULL
;
mapping
->
committed
=
NULL
;
...
...
@@ -453,11 +453,11 @@ static void mapping_dump( struct object *obj, int verbose )
{
struct
mapping
*
mapping
=
(
struct
mapping
*
)
obj
;
assert
(
obj
->
ops
==
&
mapping_ops
);
fprintf
(
stderr
,
"Mapping size=%08x%08x prot=%08x file=%p header_size=%08x base=%
p
"
fprintf
(
stderr
,
"Mapping size=%08x%08x prot=%08x file=%p header_size=%08x base=%
08lx
"
"shared_file=%p "
,
(
unsigned
int
)(
mapping
->
size
>>
32
),
(
unsigned
int
)
mapping
->
size
,
mapping
->
protect
,
mapping
->
file
,
mapping
->
header_size
,
mapping
->
base
,
mapping
->
shared_file
);
(
unsigned
long
)
mapping
->
base
,
mapping
->
shared_file
);
dump_object_name
(
&
mapping
->
obj
);
fputc
(
'\n'
,
stderr
);
}
...
...
server/protocol.def
View file @
d066a9a0
...
...
@@ -1369,7 +1369,7 @@ enum char_info_mode
mem_size_t size; /* mapping size */
int protect; /* protection flags */
int header_size; /* header size (for VPROT_IMAGE mapping) */
void*
base; /* default base addr (for VPROT_IMAGE mapping) */
client_ptr_t
base; /* default base addr (for VPROT_IMAGE mapping) */
obj_handle_t mapping; /* duplicate mapping handle unless removable */
obj_handle_t shared_file; /* shared mapping file handle */
@END
...
...
server/trace.c
View file @
d066a9a0
...
...
@@ -1813,7 +1813,9 @@ static void dump_get_mapping_info_reply( const struct get_mapping_info_reply *re
fprintf
(
stderr
,
","
);
fprintf
(
stderr
,
" protect=%d,"
,
req
->
protect
);
fprintf
(
stderr
,
" header_size=%d,"
,
req
->
header_size
);
fprintf
(
stderr
,
" base=%p,"
,
req
->
base
);
fprintf
(
stderr
,
" base="
);
dump_uint64
(
&
req
->
base
);
fprintf
(
stderr
,
","
);
fprintf
(
stderr
,
" mapping=%04x,"
,
req
->
mapping
);
fprintf
(
stderr
,
" shared_file=%04x"
,
req
->
shared_file
);
}
...
...
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