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
7544b9f6
Commit
7544b9f6
authored
Mar 20, 2020
by
Jacek Caban
Committed by
Alexandre Julliard
Mar 20, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dbghelp: Call GetSystemInfo in DllMain.
Signed-off-by:
Jacek Caban
<
jacek@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
234115c8
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
14 additions
and
4 deletions
+14
-4
dbghelp.c
dlls/dbghelp/dbghelp.c
+13
-0
dbghelp_private.h
dlls/dbghelp/dbghelp_private.h
+1
-0
elf_module.c
dlls/dbghelp/elf_module.c
+0
-2
macho_module.c
dlls/dbghelp/macho_module.c
+0
-2
No files found.
dlls/dbghelp/dbghelp.c
View file @
7544b9f6
...
...
@@ -68,9 +68,22 @@ WINE_DEFAULT_DEBUG_CHANNEL(dbghelp);
unsigned
dbghelp_options
=
SYMOPT_UNDNAME
;
BOOL
dbghelp_opt_native
=
FALSE
;
SYSTEM_INFO
sysinfo
;
static
struct
process
*
process_first
/* = NULL */
;
BOOL
WINAPI
DllMain
(
HINSTANCE
instance
,
DWORD
reason
,
LPVOID
reserved
)
{
switch
(
reason
)
{
case
DLL_PROCESS_ATTACH
:
GetSystemInfo
(
&
sysinfo
);
DisableThreadLibraryCalls
(
instance
);
break
;
}
return
TRUE
;
}
/******************************************************************
* process_find_by_handle
*
...
...
dlls/dbghelp/dbghelp_private.h
View file @
7544b9f6
...
...
@@ -115,6 +115,7 @@ void* hash_table_iter_up(struct hash_table_iter* hti) DECLSPEC_HIDDEN;
extern
unsigned
dbghelp_options
DECLSPEC_HIDDEN
;
extern
BOOL
dbghelp_opt_native
DECLSPEC_HIDDEN
;
extern
SYSTEM_INFO
sysinfo
DECLSPEC_HIDDEN
;
enum
location_kind
{
loc_error
,
/* reg is the error code */
loc_unavailable
,
/* location is not available */
...
...
dlls/dbghelp/elf_module.c
View file @
7544b9f6
...
...
@@ -137,7 +137,6 @@ struct elf_module_info
static
const
char
*
elf_map_section
(
struct
image_section_map
*
ism
)
{
struct
elf_file_map
*
fmap
=
&
ism
->
fmap
->
u
.
elf
;
SYSTEM_INFO
sysinfo
;
SIZE_T
ofst
,
size
;
HANDLE
mapping
;
...
...
@@ -152,7 +151,6 @@ static const char* elf_map_section(struct image_section_map* ism)
}
/* align required information on allocation granularity */
GetSystemInfo
(
&
sysinfo
);
ofst
=
fmap
->
sect
[
ism
->
sidx
].
shdr
.
sh_offset
&
~
(
sysinfo
.
dwAllocationGranularity
-
1
);
size
=
fmap
->
sect
[
ism
->
sidx
].
shdr
.
sh_offset
+
fmap
->
sect
[
ism
->
sidx
].
shdr
.
sh_size
-
ofst
;
if
(
!
(
mapping
=
CreateFileMappingW
(
fmap
->
handle
,
NULL
,
PAGE_READONLY
,
0
,
ofst
+
size
,
NULL
)))
...
...
dlls/dbghelp/macho_module.c
View file @
7544b9f6
...
...
@@ -164,11 +164,9 @@ static void macho_calc_range(const struct macho_file_map* fmap, unsigned long of
unsigned
long
len
,
unsigned
long
*
out_aligned_offset
,
unsigned
long
*
out_aligned_end
,
unsigned
long
*
out_misalign
)
{
SYSTEM_INFO
sysinfo
;
unsigned
long
pagemask
;
unsigned
long
file_offset
,
misalign
;
GetSystemInfo
(
&
sysinfo
);
pagemask
=
sysinfo
.
dwAllocationGranularity
-
1
;
file_offset
=
fmap
->
arch_offset
+
offset
;
misalign
=
file_offset
&
pagemask
;
...
...
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