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
3ff8fa7e
Commit
3ff8fa7e
authored
Jul 16, 2018
by
Ken Thomases
Committed by
Alexandre Julliard
Jul 17, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dbghelp: Fix loading of Mach-O load commands for 64-bit binaries.
Signed-off-by:
Ken Thomases
<
ken@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
36e87e03
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
2 deletions
+4
-2
image_private.h
dlls/dbghelp/image_private.h
+1
-0
macho_module.c
dlls/dbghelp/macho_module.c
+3
-2
No files found.
dlls/dbghelp/image_private.h
View file @
3ff8fa7e
...
...
@@ -89,6 +89,7 @@ struct image_file_map
#ifdef HAVE_MACH_O_LOADER_H
struct
mach_header
mach_header
;
size_t
header_size
;
/* size of real header in file */
const
struct
load_command
*
load_commands
;
const
struct
uuid_command
*
uuid
;
...
...
dlls/dbghelp/macho_module.c
View file @
3ff8fa7e
...
...
@@ -415,7 +415,7 @@ static const struct load_command* macho_map_load_commands(struct macho_file_map*
if
(
fmap
->
load_commands
==
IMAGE_NO_MAP
)
{
fmap
->
load_commands
=
(
const
struct
load_command
*
)
macho_map_range
(
fmap
,
sizeof
(
fmap
->
mach_header
)
,
fmap
->
mach_header
.
sizeofcmds
,
NULL
);
fmap
,
fmap
->
header_size
,
fmap
->
mach_header
.
sizeofcmds
,
NULL
);
TRACE
(
"Mapped load commands: %p
\n
"
,
fmap
->
load_commands
);
}
...
...
@@ -433,7 +433,7 @@ static void macho_unmap_load_commands(struct macho_file_map* fmap)
{
TRACE
(
"Unmapping load commands: %p
\n
"
,
fmap
->
load_commands
);
macho_unmap_range
(
NULL
,
(
const
void
**
)
&
fmap
->
load_commands
,
fmap
,
sizeof
(
fmap
->
mach_header
)
,
fmap
->
mach_header
.
sizeofcmds
);
fmap
->
header_size
,
fmap
->
mach_header
.
sizeofcmds
);
}
}
...
...
@@ -666,6 +666,7 @@ static BOOL macho_map_file(struct process *pcs, const WCHAR *filenameW,
ifm
->
modtype
=
DMT_MACHO
;
ifm
->
addr_size
=
(
pcs
->
is_64bit
)
?
64
:
32
;
fmap
->
header_size
=
(
pcs
->
is_64bit
)
?
sizeof
(
struct
mach_header_64
)
:
sizeof
(
struct
mach_header
);
len
=
WideCharToMultiByte
(
CP_UNIXCP
,
0
,
filenameW
,
-
1
,
NULL
,
0
,
NULL
,
NULL
);
if
(
!
(
filename
=
HeapAlloc
(
GetProcessHeap
(),
0
,
len
)))
...
...
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