Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
91a644ae
Commit
91a644ae
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: Introduce ends_withW helper.
Signed-off-by:
Eric Pouech
<
eric.pouech@gmail.com
>
parent
fbe23daf
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 @
91a644ae
...
...
@@ -196,6 +196,14 @@ static void test_search_path(void)
ok
(
!
strcmp
(
search_path
,
"."
),
"Got search path '%s', expected '.'
\n
"
,
search_path
);
}
static
BOOL
ends_withW
(
const
WCHAR
*
str
,
const
WCHAR
*
suffix
)
{
size_t
strlen
=
wcslen
(
str
);
size_t
sfxlen
=
wcslen
(
suffix
);
return
strlen
>=
sfxlen
&&
!
wcsicmp
(
str
+
strlen
-
sfxlen
,
suffix
);
}
static
USHORT
get_module_machine
(
const
char
*
path
)
{
HANDLE
hFile
,
hMap
;
...
...
@@ -541,18 +549,15 @@ static BOOL CALLBACK aggregate_cb(PCWSTR imagename, DWORD64 base, ULONG sz, PVOI
{
struct
loaded_module_aggregation
*
aggregation
=
usr
;
IMAGEHLP_MODULEW64
im
;
size_t
image_len
;
BOOL
ret
,
wow64
;
WCHAR
buffer
[
MAX_PATH
];
memset
(
&
im
,
0
,
sizeof
(
im
));
im
.
SizeOfStruct
=
sizeof
(
im
);
image_len
=
wcslen
(
imagename
);
ret
=
SymGetModuleInfoW64
(
aggregation
->
proc
,
base
,
&
im
);
if
(
ret
)
ok
(
aggregation
->
count_exe
&&
image_len
>=
4
&&
!
wcscmp
(
imagename
+
image_len
-
4
,
L".exe"
),
ok
(
aggregation
->
count_exe
&&
ends_withW
(
imagename
,
L".exe"
),
"%ls shouldn't already be loaded
\n
"
,
imagename
);
else
{
...
...
@@ -581,7 +586,7 @@ static BOOL CALLBACK aggregate_cb(PCWSTR imagename, DWORD64 base, ULONG sz, PVOI
ok
(
0
,
"Unsupported machine %lx
\n
"
,
im
.
MachineType
);
break
;
}
if
(
image_len
>=
4
&&
!
wcsicmp
(
imagename
+
image_len
-
4
,
L".exe"
))
if
(
ends_withW
(
imagename
,
L".exe"
))
aggregation
->
count_exe
++
;
if
(
!
wcsicmp
(
im
.
ModuleName
,
L"ntdll"
))
aggregation
->
count_ntdll
++
;
...
...
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