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
b7defd29
Commit
b7defd29
authored
Jul 31, 2018
by
Zebediah Figura
Committed by
Alexandre Julliard
Aug 14, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dbghelp: Correctly determine the dyld image info address.
Signed-off-by:
Zebediah Figura
<
z.figura12@gmail.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
42745c06
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
4 deletions
+14
-4
macho_module.c
dlls/dbghelp/macho_module.c
+14
-4
No files found.
dlls/dbghelp/macho_module.c
View file @
b7defd29
...
...
@@ -1360,18 +1360,28 @@ static ULONG_PTR get_dyld_image_info_address(struct process* pcs)
NTSTATUS
status
;
PROCESS_BASIC_INFORMATION
pbi
;
ULONG_PTR
dyld_image_info_address
=
0
;
BOOL
ret
;
/* Get address of PEB */
status
=
NtQueryInformationProcess
(
pcs
->
handle
,
ProcessBasicInformation
,
&
pbi
,
sizeof
(
pbi
),
NULL
);
if
(
status
==
STATUS_SUCCESS
)
{
/* Read dyld image info address from PEB */
if
(
ReadProcessMemory
(
pcs
->
handle
,
&
pbi
.
PebBaseAddress
->
Reserved
[
0
],
&
dyld_image_info_address
,
sizeof
(
dyld_image_info_address
),
NULL
))
if
(
!
pcs
->
is_64bit
)
ret
=
ReadProcessMemory
(
pcs
->
handle
,
&
pbi
.
PebBaseAddress
->
Reserved
[
0
],
&
dyld_image_info_address
,
sizeof
(
dyld_image_info_address
),
NULL
);
else
{
TRACE
(
"got dyld_image_info_address 0x%08lx from PEB %p MacDyldImageInfo %p
\n
"
,
(
unsigned
long
)
dyld_image_info_address
,
pbi
.
PebBaseAddress
,
&
pbi
.
PebBaseAddress
->
Reserved
);
PEB32
*
peb32
=
(
PEB32
*
)
pbi
.
PebBaseAddress
;
ULONG
addr32
;
ret
=
ReadProcessMemory
(
pcs
->
handle
,
&
peb32
->
Reserved
[
0
],
&
addr32
,
sizeof
(
addr32
),
NULL
);
dyld_image_info_address
=
addr32
;
}
if
(
ret
)
TRACE
(
"got dyld_image_info_address %#lx from PEB %p
\n
"
,
dyld_image_info_address
,
pbi
.
PebBaseAddress
);
}
#ifndef __LP64__
/* No reading the symtab with nlist(3) in LP64 */
...
...
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