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
bce64150
Commit
bce64150
authored
Jan 13, 2008
by
Eric Pouech
Committed by
Alexandre Julliard
Jan 14, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winedbg: Added a way to support differently selector information depending on current target.
parent
bd007a15
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
20 additions
and
3 deletions
+20
-3
be_i386.c
programs/winedbg/be_i386.c
+2
-2
debugger.h
programs/winedbg/debugger.h
+1
-0
info.c
programs/winedbg/info.c
+1
-1
tgt_active.c
programs/winedbg/tgt_active.c
+1
-0
tgt_minidump.c
programs/winedbg/tgt_minidump.c
+9
-0
tgt_module.c
programs/winedbg/tgt_module.c
+6
-0
No files found.
programs/winedbg/be_i386.c
View file @
bce64150
...
...
@@ -40,7 +40,7 @@ static ADDRESS_MODE get_selector_type(HANDLE hThread, const CONTEXT* ctx, WORD s
if
(
IS_VM86_MODE
(
ctx
))
return
AddrModeReal
;
/* null or system selector */
if
(
!
(
sel
&
4
)
||
((
sel
>>
3
)
<
17
))
return
AddrModeFlat
;
if
(
GetThreadSelectorEntry
(
hThread
,
sel
,
&
le
))
if
(
dbg_curr_process
->
process_io
->
get_selector
(
hThread
,
sel
,
&
le
))
return
le
.
HighWord
.
Bits
.
Default_Big
?
AddrMode1632
:
AddrMode1616
;
/* selector doesn't exist */
return
-
1
;
...
...
@@ -59,7 +59,7 @@ static void* be_i386_linearize(HANDLE hThread, const ADDRESS64* addr)
return
(
void
*
)(
DWORD
)
addr
->
Offset
;
/* fall through */
case
AddrMode1616
:
if
(
!
GetThreadSelectorEntry
(
hThread
,
addr
->
Segment
,
&
le
))
return
NULL
;
if
(
!
dbg_curr_process
->
process_io
->
get_selector
(
hThread
,
addr
->
Segment
,
&
le
))
return
NULL
;
return
(
void
*
)((
le
.
HighWord
.
Bits
.
BaseHi
<<
24
)
+
(
le
.
HighWord
.
Bits
.
BaseMid
<<
16
)
+
le
.
BaseLow
+
(
DWORD
)
addr
->
Offset
);
...
...
programs/winedbg/debugger.h
View file @
bce64150
...
...
@@ -234,6 +234,7 @@ struct be_process_io
BOOL
(
*
close_process
)(
struct
dbg_process
*
,
BOOL
);
BOOL
(
WINAPI
*
read
)(
HANDLE
,
const
void
*
,
void
*
,
SIZE_T
,
SIZE_T
*
);
BOOL
(
WINAPI
*
write
)(
HANDLE
,
void
*
,
const
void
*
,
SIZE_T
,
SIZE_T
*
);
BOOL
(
WINAPI
*
get_selector
)(
HANDLE
,
DWORD
,
LDT_ENTRY
*
);
};
extern
struct
dbg_process
*
dbg_curr_process
;
...
...
programs/winedbg/info.c
View file @
bce64150
...
...
@@ -584,7 +584,7 @@ void info_win32_segments(DWORD start, int length)
for
(
i
=
start
;
i
<
start
+
length
;
i
++
)
{
if
(
!
GetThreadSelectorEntry
(
dbg_curr_thread
->
handle
,
(
i
<<
3
)
|
7
,
&
le
))
if
(
!
dbg_curr_process
->
process_io
->
get_selector
(
dbg_curr_thread
->
handle
,
(
i
<<
3
)
|
7
,
&
le
))
continue
;
if
(
le
.
HighWord
.
Bits
.
Type
&
0x08
)
...
...
programs/winedbg/tgt_active.c
View file @
bce64150
...
...
@@ -984,4 +984,5 @@ static struct be_process_io be_process_active_io =
tgt_process_active_close_process
,
ReadProcessMemory
,
WriteProcessMemory
,
GetThreadSelectorEntry
,
};
programs/winedbg/tgt_minidump.c
View file @
bce64150
...
...
@@ -452,9 +452,18 @@ static BOOL tgt_process_minidump_close_process(struct dbg_process* pcs, BOOL kil
return
TRUE
;
}
static
BOOL
WINAPI
tgt_process_minidump_get_selector
(
HANDLE
hThread
,
DWORD
sel
,
LDT_ENTRY
*
le
)
{
/* so far, pretend all selectors are valid, and mapped to a 32bit flat address space */
memset
(
le
,
0
,
sizeof
(
*
le
));
le
->
HighWord
.
Bits
.
Default_Big
=
1
;
return
TRUE
;
}
static
struct
be_process_io
be_process_minidump_io
=
{
tgt_process_minidump_close_process
,
tgt_process_minidump_read
,
tgt_process_minidump_write
,
tgt_process_minidump_get_selector
,
};
programs/winedbg/tgt_module.c
View file @
bce64150
...
...
@@ -90,9 +90,15 @@ static BOOL tgt_process_module_close_process(struct dbg_process* pcs, BOOL kill)
return
TRUE
;
}
static
BOOL
WINAPI
tgt_process_module_get_selector
(
HANDLE
hThread
,
DWORD
sel
,
LDT_ENTRY
*
le
)
{
return
FALSE
;
}
static
struct
be_process_io
be_process_module_io
=
{
tgt_process_module_close_process
,
tgt_process_module_read
,
tgt_process_module_write
,
tgt_process_module_get_selector
,
};
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