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
160d961e
Commit
160d961e
authored
Feb 25, 2023
by
Eric Pouech
Committed by
Alexandre Julliard
Feb 27, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dbghelp/tests: Only retrieve the system directories once.
Signed-off-by:
Eric Pouech
<
eric.pouech@gmail.com
>
parent
91a644ae
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
5 deletions
+10
-5
dbghelp.c
dlls/dbghelp/tests/dbghelp.c
+10
-5
No files found.
dlls/dbghelp/tests/dbghelp.c
View file @
160d961e
...
...
@@ -26,6 +26,8 @@
#include "winternl.h"
static
const
BOOL
is_win64
=
sizeof
(
void
*
)
>
sizeof
(
int
);
static
WCHAR
system_directory
[
MAX_PATH
];
static
WCHAR
wow64_directory
[
MAX_PATH
];
#if defined(__i386__) || defined(__x86_64__)
...
...
@@ -550,7 +552,6 @@ static BOOL CALLBACK aggregate_cb(PCWSTR imagename, DWORD64 base, ULONG sz, PVOI
struct
loaded_module_aggregation
*
aggregation
=
usr
;
IMAGEHLP_MODULEW64
im
;
BOOL
ret
,
wow64
;
WCHAR
buffer
[
MAX_PATH
];
memset
(
&
im
,
0
,
sizeof
(
im
));
im
.
SizeOfStruct
=
sizeof
(
im
);
...
...
@@ -590,12 +591,10 @@ static BOOL CALLBACK aggregate_cb(PCWSTR imagename, DWORD64 base, ULONG sz, PVOI
aggregation
->
count_exe
++
;
if
(
!
wcsicmp
(
im
.
ModuleName
,
L"ntdll"
))
aggregation
->
count_ntdll
++
;
if
(
GetSystemDirectoryW
(
buffer
,
ARRAY_SIZE
(
buffer
))
&&
!
wcsnicmp
(
imagename
,
buffer
,
wcslen
(
buffer
)))
if
(
!
wcsnicmp
(
imagename
,
system_directory
,
wcslen
(
system_directory
)))
aggregation
->
count_systemdir
++
;
if
(
is_win64
&&
IsWow64Process
(
aggregation
->
proc
,
&
wow64
)
&&
wow64
&&
GetSystemWow64DirectoryW
(
buffer
,
ARRAY_SIZE
(
buffer
))
&&
!
wcsnicmp
(
imagename
,
buffer
,
wcslen
(
buffer
)))
!
wcsnicmp
(
imagename
,
wow64_directory
,
wcslen
(
wow64_directory
)))
aggregation
->
count_wowdir
++
;
return
TRUE
;
...
...
@@ -756,6 +755,12 @@ START_TEST(dbghelp)
ret
=
SymCleanup
(
GetCurrentProcess
());
ok
(
ret
,
"got error %lu
\n
"
,
GetLastError
());
ret
=
GetSystemDirectoryW
(
system_directory
,
ARRAY_SIZE
(
system_directory
));
ok
(
ret
,
"GetSystemDirectoryW failed: %lu
\n
"
,
GetLastError
());
/* failure happens on a 32bit only wine setup */
if
(
!
GetSystemWow64DirectoryW
(
wow64_directory
,
ARRAY_SIZE
(
wow64_directory
)))
wow64_directory
[
0
]
=
L'\0'
;
if
(
test_modules
())
{
test_modules_overlap
();
...
...
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