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
63550692
Commit
63550692
authored
Mar 25, 2020
by
Jacek Caban
Committed by
Alexandre Julliard
Mar 25, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dbghelp: Use PE type for virtual modules.
Signed-off-by:
Jacek Caban
<
jacek@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
c8b5a3be
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
58 deletions
+1
-58
module.c
dlls/dbghelp/module.c
+1
-58
No files found.
dlls/dbghelp/module.c
View file @
63550692
...
...
@@ -37,9 +37,6 @@ WINE_DEFAULT_DEBUG_CHANNEL(dbghelp);
const
WCHAR
S_ElfW
[]
=
{
'<'
,
'e'
,
'l'
,
'f'
,
'>'
,
'\0'
};
const
WCHAR
S_WineLoaderW
[]
=
{
'<'
,
'w'
,
'i'
,
'n'
,
'e'
,
'-'
,
'l'
,
'o'
,
'a'
,
'd'
,
'e'
,
'r'
,
'>'
,
'\0'
};
static
const
WCHAR
S_DotSoW
[]
=
{
'.'
,
's'
,
'o'
,
'\0'
};
static
const
WCHAR
S_DotDylibW
[]
=
{
'.'
,
'd'
,
'y'
,
'l'
,
'i'
,
'b'
,
'\0'
};
static
const
WCHAR
S_DotPdbW
[]
=
{
'.'
,
'p'
,
'd'
,
'b'
,
'\0'
};
static
const
WCHAR
S_DotDbgW
[]
=
{
'.'
,
'd'
,
'b'
,
'g'
,
'\0'
};
const
WCHAR
S_SlashW
[]
=
{
'/'
,
'\0'
};
static
const
WCHAR
S_AcmW
[]
=
{
'.'
,
'a'
,
'c'
,
'm'
,
'\0'
};
...
...
@@ -467,59 +464,6 @@ static BOOL module_is_container_loaded(const struct process* pcs,
return
FALSE
;
}
/******************************************************************
* module_get_type_by_name
*
* Guesses a filename type from its extension
*/
enum
module_type
module_get_type_by_name
(
const
WCHAR
*
name
)
{
int
len
=
strlenW
(
name
);
/* Skip all version extensions (.[digits]) regex: "(\.\d+)*$" */
do
{
int
i
=
len
;
while
(
i
&&
name
[
i
-
1
]
>=
'0'
&&
name
[
i
-
1
]
<=
'9'
)
i
--
;
if
(
i
&&
name
[
i
-
1
]
==
'.'
)
len
=
i
-
1
;
else
break
;
}
while
(
len
);
/* check for terminating .so or .so.[digit] */
/* FIXME: Can't rely solely on extension; have to check magic or
* stop using .so on Mac OS X. For now, base on platform. */
if
(
len
>
3
&&
!
memcmp
(
name
+
len
-
3
,
S_DotSoW
,
3
))
#ifdef __APPLE__
return
DMT_MACHO
;
#else
return
DMT_ELF
;
#endif
if
(
len
>
6
&&
!
strncmpiW
(
name
+
len
-
6
,
S_DotDylibW
,
6
))
return
DMT_MACHO
;
if
(
len
>
4
&&
!
strncmpiW
(
name
+
len
-
4
,
S_DotPdbW
,
4
))
return
DMT_PDB
;
if
(
len
>
4
&&
!
strncmpiW
(
name
+
len
-
4
,
S_DotDbgW
,
4
))
return
DMT_DBG
;
/* wine is also a native module (Mach-O on Mac OS X, ELF elsewhere) */
if
(
is_wine_loader
(
name
))
{
#ifdef __APPLE__
return
DMT_MACHO
;
#else
return
DMT_ELF
;
#endif
}
return
DMT_PE
;
}
static
BOOL
image_check_debug_link
(
const
WCHAR
*
file
,
struct
image_file_map
*
fmap
,
DWORD
link_crc
)
{
DWORD
read_bytes
;
...
...
@@ -846,8 +790,7 @@ DWORD64 WINAPI SymLoadModuleExW(HANDLE hProcess, HANDLE hFile, PCWSTR wImageNam
if
(
Flags
&
SLMFLAG_VIRTUAL
)
{
if
(
!
wImageName
)
return
FALSE
;
module
=
module_new
(
pcs
,
wImageName
,
module_get_type_by_name
(
wImageName
),
TRUE
,
BaseOfDll
,
SizeOfDll
,
0
,
0
);
module
=
module_new
(
pcs
,
wImageName
,
DMT_PE
,
TRUE
,
BaseOfDll
,
SizeOfDll
,
0
,
0
);
if
(
!
module
)
return
FALSE
;
if
(
wModuleName
)
module_set_module
(
module
,
wModuleName
);
module
->
module
.
SymType
=
SymVirtual
;
...
...
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