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
44ab1206
Commit
44ab1206
authored
Oct 13, 2023
by
Eric Pouech
Committed by
Alexandre Julliard
Oct 13, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winedbg: Correctly read LDT entries for wow64 debuggee.
This mostly matters for Mac as segment CS is handled as a real LDT entry. Signed-off-by:
Eric Pouech
<
epouech@codeweavers.com
>
parent
91ba80df
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
1 deletion
+16
-1
be_i386.c
programs/winedbg/be_i386.c
+6
-1
tgt_active.c
programs/winedbg/tgt_active.c
+10
-0
No files found.
programs/winedbg/be_i386.c
View file @
44ab1206
...
...
@@ -40,7 +40,12 @@ static ADDRESS_MODE get_selector_type(HANDLE hThread, const WOW64_CONTEXT *ctx,
/* null or system selector */
if
(
!
(
sel
&
4
)
||
((
sel
>>
3
)
<
first_ldt_entry
))
return
AddrModeFlat
;
if
(
dbg_curr_process
->
process_io
->
get_selector
(
hThread
,
sel
,
&
le
))
return
le
.
HighWord
.
Bits
.
Default_Big
?
AddrMode1632
:
AddrMode1616
;
{
ULONG
base
=
(
le
.
HighWord
.
Bits
.
BaseHi
<<
24
)
+
(
le
.
HighWord
.
Bits
.
BaseMid
<<
16
)
+
le
.
BaseLow
;
if
(
le
.
HighWord
.
Bits
.
Default_Big
)
return
base
==
0
?
AddrModeFlat
:
AddrMode1632
;
return
AddrMode1616
;
}
/* selector doesn't exist */
return
-
1
;
}
...
...
programs/winedbg/tgt_active.c
View file @
44ab1206
...
...
@@ -1067,7 +1067,17 @@ static BOOL tgt_process_active_write(HANDLE hProcess, void* addr,
static
BOOL
tgt_process_active_get_selector
(
HANDLE
hThread
,
DWORD
sel
,
LDT_ENTRY
*
le
)
{
#ifdef _WIN64
THREAD_DESCRIPTOR_INFORMATION
desc
=
{
.
Selector
=
sel
};
ULONG
retlen
;
if
(
RtlWow64GetThreadSelectorEntry
(
hThread
,
&
desc
,
sizeof
(
desc
),
&
retlen
))
return
FALSE
;
*
le
=
desc
.
Entry
;
return
TRUE
;
#else
return
GetThreadSelectorEntry
(
hThread
,
sel
,
le
);
#endif
}
static
struct
be_process_io
be_process_active_io
=
...
...
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