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
d707fe5a
Commit
d707fe5a
authored
Feb 21, 2007
by
Eric Pouech
Committed by
Alexandre Julliard
Feb 22, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dbghelp: Added module_get_type_by_name in Unicode form and keep the ANSI form for compatibility.
parent
46684a9f
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
38 additions
and
6 deletions
+38
-6
dbghelp_private.h
dlls/dbghelp/dbghelp_private.h
+3
-1
module.c
dlls/dbghelp/module.c
+34
-4
path.c
dlls/dbghelp/path.c
+1
-1
No files found.
dlls/dbghelp/dbghelp_private.h
View file @
d707fe5a
...
...
@@ -455,7 +455,9 @@ extern struct module*
module_get_containee
(
const
struct
process
*
pcs
,
const
struct
module
*
inner
);
extern
enum
module_type
module_get_type_by_name
(
const
char
*
name
);
module_get_type_by_name
(
const
WCHAR
*
name
);
extern
enum
module_type
module_get_type_by_nameA
(
const
char
*
name
);
extern
void
module_reset_debug_info
(
struct
module
*
module
);
extern
BOOL
module_remove
(
struct
process
*
pcs
,
struct
module
*
module
);
...
...
dlls/dbghelp/module.c
View file @
d707fe5a
...
...
@@ -36,7 +36,7 @@ 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_
PdbW
[]
=
{
'.'
,
'p'
,
'd'
,
'b'
,
'\0'
};
static
const
WCHAR
S_
DotPdbW
[]
=
{
'.'
,
'p'
,
'd'
,
'b'
,
'\0'
};
static
const
WCHAR
S_WinePThreadW
[]
=
{
'w'
,
'i'
,
'n'
,
'e'
,
'-'
,
'p'
,
't'
,
'h'
,
'r'
,
'e'
,
'a'
,
'd'
,
'\0'
};
static
const
WCHAR
S_WineKThreadW
[]
=
{
'w'
,
'i'
,
'n'
,
'e'
,
'-'
,
'k'
,
't'
,
'h'
,
'r'
,
'e'
,
'a'
,
'd'
,
'\0'
};
...
...
@@ -378,7 +378,37 @@ static BOOL module_is_elf_container_loaded(struct process* pcs,
*
* Guesses a filename type from its extension
*/
enum
module_type
module_get_type_by_name
(
const
char
*
name
)
enum
module_type
module_get_type_by_name
(
const
WCHAR
*
name
)
{
const
WCHAR
*
ptr
;
int
len
=
strlenW
(
name
);
/* check for terminating .so or .so.[digit] */
ptr
=
strrchrW
(
name
,
'.'
);
if
(
ptr
)
{
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
;
}
/* 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
)))
{
return
DMT_ELF
;
}
return
DMT_PE
;
}
/******************************************************************
* module_get_type_by_nameA
*
* Guesses a filename type from its extension
*/
enum
module_type
module_get_type_by_nameA
(
const
char
*
name
)
{
const
char
*
ptr
;
int
len
=
strlen
(
name
);
...
...
@@ -477,7 +507,7 @@ DWORD64 WINAPI SymLoadModuleExW(HANDLE hProcess, HANDLE hFile, PCWSTR wImageNam
{
WideCharToMultiByte
(
CP_ACP
,
0
,
wImageName
,
-
1
,
ImageName
,
MAX_PATH
,
NULL
,
NULL
);
module
=
module_new
(
pcs
,
wImageName
,
module_get_type_by_name
(
ImageName
),
module
=
module_new
(
pcs
,
wImageName
,
module_get_type_by_name
(
w
ImageName
),
TRUE
,
(
DWORD
)
BaseOfDll
,
SizeOfDll
,
0
,
0
);
if
(
!
module
)
return
FALSE
;
if
(
wModuleName
)
module_set_module
(
module
,
wModuleName
);
...
...
@@ -515,7 +545,7 @@ DWORD64 WINAPI SymLoadModuleExW(HANDLE hProcess, HANDLE hFile, PCWSTR wImageNam
TRACE
(
"Assuming %s as native DLL
\n
"
,
debugstr_w
(
wImageName
));
if
(
!
(
module
=
pe_load_module
(
pcs
,
wImageName
,
hFile
,
BaseOfDll
,
SizeOfDll
)))
{
if
(
module_get_type_by_name
(
ImageName
)
==
DMT_ELF
&&
if
(
module_get_type_by_name
(
w
ImageName
)
==
DMT_ELF
&&
(
module
=
elf_load_module
(
pcs
,
wImageName
,
BaseOfDll
)))
goto
done
;
FIXME
(
"Should have successfully loaded debug information for image %s
\n
"
,
...
...
dlls/dbghelp/path.c
View file @
d707fe5a
...
...
@@ -404,7 +404,7 @@ BOOL WINAPI SymFindFileInPath(HANDLE hProcess, PCSTR inSearchPath, PCSTR full_pa
s
.
user
=
user
;
filename
=
file_name
(
full_path
);
s
.
kind
=
module_get_type_by_name
(
filename
);
s
.
kind
=
module_get_type_by_name
A
(
filename
);
/* first check full path to file */
if
(
sffip_cb
(
full_path
,
&
s
))
...
...
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