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
91ba80df
Commit
91ba80df
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: Set first LDT entry value as ntdll does.
Signed-off-by:
Eric Pouech
<
epouech@codeweavers.com
>
parent
b831dbfc
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
2 deletions
+4
-2
be_i386.c
programs/winedbg/be_i386.c
+4
-2
No files found.
programs/winedbg/be_i386.c
View file @
91ba80df
...
...
@@ -30,13 +30,15 @@ WINE_DEFAULT_DEBUG_CHANNEL(winedbg);
#define IS_VM86_MODE(ctx) (ctx->EFlags & V86_FLAG)
static
const
unsigned
first_ldt_entry
=
32
;
static
ADDRESS_MODE
get_selector_type
(
HANDLE
hThread
,
const
WOW64_CONTEXT
*
ctx
,
WORD
sel
)
{
LDT_ENTRY
le
;
if
(
IS_VM86_MODE
(
ctx
))
return
AddrModeReal
;
/* null or system selector */
if
(
!
(
sel
&
4
)
||
((
sel
>>
3
)
<
17
))
return
AddrModeFlat
;
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
;
/* selector doesn't exist */
...
...
@@ -52,7 +54,7 @@ static void* be_i386_linearize(HANDLE hThread, const ADDRESS64* addr)
case
AddrModeReal
:
return
(
void
*
)((
DWORD_PTR
)(
LOWORD
(
addr
->
Segment
)
<<
4
)
+
(
DWORD_PTR
)
addr
->
Offset
);
case
AddrMode1632
:
if
(
!
(
addr
->
Segment
&
4
)
||
((
addr
->
Segment
>>
3
)
<
17
))
if
(
!
(
addr
->
Segment
&
4
)
||
((
addr
->
Segment
>>
3
)
<
first_ldt_entry
))
return
(
void
*
)(
DWORD_PTR
)
addr
->
Offset
;
/* fall through */
case
AddrMode1616
:
...
...
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