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
dfe21d0e
Commit
dfe21d0e
authored
Oct 28, 2007
by
Vitaliy Margolen
Committed by
Alexandre Julliard
Oct 29, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dbghelp: Fix detection of ELF libs by their name.
parent
e193d6bf
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
14 deletions
+23
-14
module.c
dlls/dbghelp/module.c
+23
-14
No files found.
dlls/dbghelp/module.c
View file @
dfe21d0e
...
...
@@ -402,23 +402,32 @@ static BOOL module_is_elf_container_loaded(const struct process* pcs,
*/
enum
module_type
module_get_type_by_name
(
const
WCHAR
*
name
)
{
const
WCHAR
*
ptr
;
int
len
=
strlenW
(
name
);
int
len
=
strlenW
(
name
);
/* check for terminating .so or .so.[digit] */
ptr
=
strrchrW
(
name
,
'.'
);
if
(
ptr
)
/* Skip all version extensions (.[digits]) regex: "(\.\d+)*$" */
do
{
if
(
!
strcmpW
(
ptr
,
S_DotSoW
)
||
(
isdigit
(
ptr
[
1
])
&&
!
ptr
[
2
]
&&
ptr
>=
name
+
3
&&
!
memcmp
(
ptr
-
3
,
S_DotSoW
,
3
)))
return
DMT_ELF
;
else
if
(
!
strcmpiW
(
ptr
,
S_DotPdbW
))
return
DMT_PDB
;
}
int
i
=
len
;
while
(
i
&&
isdigit
(
name
[
i
-
1
]))
i
--
;
if
(
i
&&
name
[
i
-
1
]
==
'.'
)
len
=
i
-
1
;
else
break
;
}
while
(
len
);
/* check for terminating .so or .so.[digit] */
if
(
len
>
3
&&
!
memcmp
(
name
+
len
-
3
,
S_DotSoW
,
3
))
return
DMT_ELF
;
if
(
len
>
4
&&
!
strncmpiW
(
name
+
len
-
4
,
S_DotPdbW
,
4
))
return
DMT_PDB
;
/* wine-[kp]thread is also an ELF module */
else
if
(((
len
>
12
&&
name
[
len
-
13
]
==
'/'
)
||
len
==
12
)
&&
(
!
strcmpiW
(
name
+
len
-
12
,
S_WinePThreadW
)
||
!
strcmpiW
(
name
+
len
-
12
,
S_WineKThreadW
)))
if
(((
len
>
12
&&
name
[
len
-
13
]
==
'/'
)
||
len
==
12
)
&&
(
!
strncmpiW
(
name
+
len
-
12
,
S_WinePThreadW
,
12
)
||
!
strncmpiW
(
name
+
len
-
12
,
S_WineKThreadW
,
12
)))
{
return
DMT_ELF
;
}
...
...
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