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
5ba1c596
Commit
5ba1c596
authored
Mar 16, 2020
by
Jacek Caban
Committed by
Alexandre Julliard
Mar 16, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dbghelp: Pass module struct to elf_locate_debug_link.
Signed-off-by:
Jacek Caban
<
jacek@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
e1b28a9c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
5 deletions
+4
-5
elf_module.c
dlls/dbghelp/elf_module.c
+4
-5
No files found.
dlls/dbghelp/elf_module.c
View file @
5ba1c596
...
...
@@ -1004,8 +1004,7 @@ static BOOL elf_check_debug_link(const WCHAR* file, struct image_file_map* fmap,
* is the global debug file directory, and execdir has been turned
* into a relative path)." (from GDB manual)
*/
static
BOOL
elf_locate_debug_link
(
struct
image_file_map
*
fmap
,
const
char
*
filename
,
const
WCHAR
*
loaded_file
,
DWORD
crc
)
static
BOOL
elf_locate_debug_link
(
const
struct
module
*
module
,
struct
image_file_map
*
fmap
,
const
char
*
filename
,
DWORD
crc
)
{
static
const
WCHAR
globalDebugDirW
[]
=
{
'/'
,
'u'
,
's'
,
'r'
,
'/'
,
'l'
,
'i'
,
'b'
,
'/'
,
'd'
,
'e'
,
'b'
,
'u'
,
'g'
,
'/'
};
static
const
WCHAR
dotDebugW
[]
=
{
'.'
,
'd'
,
'e'
,
'b'
,
'u'
,
'g'
,
'/'
};
...
...
@@ -1020,13 +1019,13 @@ static BOOL elf_locate_debug_link(struct image_file_map* fmap, const char* filen
if
(
!
fmap_link
)
return
FALSE
;
filename_len
=
MultiByteToWideChar
(
CP_UNIXCP
,
0
,
filename
,
-
1
,
NULL
,
0
);
path_len
=
strlenW
(
loaded_fil
e
);
path_len
=
strlenW
(
module
->
module
.
LoadedImageNam
e
);
p
=
HeapAlloc
(
GetProcessHeap
(),
0
,
(
globalDebugDirLen
+
path_len
+
6
+
1
+
filename_len
+
1
)
*
sizeof
(
WCHAR
));
if
(
!
p
)
goto
found
;
/* we prebuild the string with "execdir" */
strcpyW
(
p
,
loaded_fil
e
);
strcpyW
(
p
,
module
->
module
.
LoadedImageNam
e
);
slash
=
p
;
if
((
slash2
=
strrchrW
(
slash
,
'/'
)))
slash
=
slash2
+
1
;
if
((
slash2
=
strrchrW
(
slash
,
'\\'
)))
slash
=
slash2
+
1
;
...
...
@@ -1190,7 +1189,7 @@ static BOOL elf_check_alternate(struct image_file_map* fmap, const struct module
* 3/ CRC of the linked ELF file
*/
DWORD
crc
=
*
(
const
DWORD
*
)(
dbg_link
+
((
DWORD_PTR
)(
strlen
(
dbg_link
)
+
4
)
&
~
3
));
ret
=
elf_locate_debug_link
(
fmap
,
dbg_link
,
module
->
module
.
LoadedImageName
,
crc
);
ret
=
elf_locate_debug_link
(
module
,
fmap
,
dbg_link
,
crc
);
if
(
!
ret
)
WARN
(
"Couldn't load linked debug file for %s
\n
"
,
debugstr_w
(
module
->
module
.
ModuleName
));
...
...
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