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
3f7f290b
Commit
3f7f290b
authored
Mar 03, 2005
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed a few regressions in the handling of segmented addresses.
parent
7b261656
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
30 additions
and
16 deletions
+30
-16
dbg.y
programs/winedbg/dbg.y
+3
-3
debugger.h
programs/winedbg/debugger.h
+1
-1
display.c
programs/winedbg/display.c
+1
-2
memory.c
programs/winedbg/memory.c
+13
-3
stack.c
programs/winedbg/stack.c
+10
-6
winedbg.c
programs/winedbg/winedbg.c
+2
-1
No files found.
programs/winedbg/dbg.y
View file @
3f7f290b
...
...
@@ -204,8 +204,8 @@ set_command:
;
x_command:
tEXAM expr_
rvalue { memory_examine((void*)
$2, 1, 'x'); }
| tEXAM tFORMAT expr_
rvalue { memory_examine((void*)
$3, $2 >> 8, $2 & 0xff); }
tEXAM expr_
lvalue { memory_examine(&
$2, 1, 'x'); }
| tEXAM tFORMAT expr_
lvalue { memory_examine(&
$3, $2 >> 8, $2 & 0xff); }
;
print_command:
...
...
@@ -249,7 +249,7 @@ info_command:
| tINFO tSHARE { info_win32_module(0); }
| tINFO tSHARE expr_rvalue { info_win32_module($3); }
| tINFO tREGS { be_cpu->print_context(dbg_curr_thread->handle, &dbg_context); }
| tINFO tSEGMENTS expr_rvalue { info_win32_segments($3, 1); }
| tINFO tSEGMENTS expr_rvalue { info_win32_segments($3
>> 3
, 1); }
| tINFO tSEGMENTS { info_win32_segments(0, -1); }
| tINFO tSTACK { stack_info(); }
| tINFO tSYMBOL tSTRING { symbol_info($3); }
...
...
programs/winedbg/debugger.h
View file @
3f7f290b
...
...
@@ -306,7 +306,7 @@ extern void info_wine_dbg_channel(BOOL add, const char* chnl, const
/* memory.c */
extern
BOOL
memory_read_value
(
const
struct
dbg_lvalue
*
lvalue
,
DWORD
size
,
void
*
result
);
extern
BOOL
memory_write_value
(
const
struct
dbg_lvalue
*
val
,
DWORD
size
,
void
*
value
);
extern
void
memory_examine
(
void
*
linear
,
int
count
,
char
format
);
extern
void
memory_examine
(
const
struct
dbg_lvalue
*
lvalue
,
int
count
,
char
format
);
extern
void
memory_report_invalid_addr
(
const
void
*
addr
);
extern
void
*
memory_to_linear_addr
(
const
ADDRESS
*
address
);
extern
BOOL
memory_get_current_pc
(
ADDRESS
*
address
);
...
...
programs/winedbg/display.c
View file @
3f7f290b
...
...
@@ -159,8 +159,7 @@ static void print_one_display(int i)
dbg_printf
(
"(disabled)
\n
"
);
else
if
(
displaypoints
[
i
].
format
==
'i'
)
memory_examine
((
void
*
)
types_extract_as_integer
(
&
lvalue
),
displaypoints
[
i
].
count
,
displaypoints
[
i
].
format
);
memory_examine
(
&
lvalue
,
displaypoints
[
i
].
count
,
displaypoints
[
i
].
format
);
else
print_value
(
&
lvalue
,
displaypoints
[
i
].
format
,
0
);
}
...
...
programs/winedbg/memory.c
View file @
3f7f290b
...
...
@@ -137,14 +137,24 @@ BOOL memory_write_value(const struct dbg_lvalue* lvalue, DWORD size, void* value
*
* Implementation of the 'x' command.
*/
void
memory_examine
(
void
*
linear
,
int
count
,
char
format
)
void
memory_examine
(
const
struct
dbg_lvalue
*
lvalue
,
int
count
,
char
format
)
{
int
i
;
char
buffer
[
256
];
ADDRESS
addr
;
void
*
linear
;
addr
.
Mode
=
AddrModeFlat
;
addr
.
Offset
=
(
unsigned
long
)
linear
;
if
(
lvalue
->
type
.
id
==
dbg_itype_none
)
{
addr
=
lvalue
->
addr
;
linear
=
memory_to_linear_addr
(
&
addr
);
}
else
{
linear
=
types_extract_as_integer
(
lvalue
);
addr
.
Mode
=
AddrModeFlat
;
addr
.
Offset
=
(
unsigned
long
)
linear
;
}
if
(
format
!=
'i'
&&
count
>
1
)
{
...
...
programs/winedbg/stack.c
View file @
3f7f290b
...
...
@@ -42,22 +42,26 @@ static IMAGEHLP_STACK_FRAME* frames = NULL;
*/
void
stack_info
(
void
)
{
ADDRESS
addr
;
struct
dbg_lvalue
lvalue
;
lvalue
.
cookie
=
0
;
lvalue
.
type
.
id
=
dbg_itype_none
;
lvalue
.
type
.
module
=
0
;
/* FIXME: we assume stack grows the same way as on i386 */
if
(
!
memory_get_current_stack
(
&
addr
))
dbg_printf
(
"Bad segment (%d)
\n
"
,
addr
.
Segment
);
if
(
!
memory_get_current_stack
(
&
lvalue
.
addr
))
dbg_printf
(
"Bad segment (%d)
\n
"
,
lvalue
.
addr
.
Segment
);
dbg_printf
(
"Stack dump:
\n
"
);
switch
(
addr
.
Mode
)
switch
(
lvalue
.
addr
.
Mode
)
{
case
AddrModeFlat
:
/* 32-bit mode */
case
AddrMode1632
:
/* 32-bit mode */
memory_examine
(
memory_to_linear_addr
(
&
addr
)
,
24
,
'x'
);
memory_examine
(
&
lvalue
,
24
,
'x'
);
break
;
case
AddrModeReal
:
/* 16-bit mode */
case
AddrMode1616
:
memory_examine
(
memory_to_linear_addr
(
&
addr
)
,
24
,
'w'
);
memory_examine
(
&
lvalue
,
24
,
'w'
);
break
;
}
}
...
...
programs/winedbg/winedbg.c
View file @
3f7f290b
...
...
@@ -472,6 +472,7 @@ static unsigned dbg_exception_prolog(BOOL is_debug, DWORD code)
case
AddrModeFlat
:
dbg_printf
(
" in 32-bit code (0x%08lx)"
,
addr
.
Offset
);
break
;
case
AddrModeReal
:
dbg_printf
(
" in vm86 code (%04x:%04lx)"
,
addr
.
Segment
,
addr
.
Offset
);
break
;
case
AddrMode1616
:
dbg_printf
(
" in 16-bit code (%04x:%04lx)"
,
addr
.
Segment
,
addr
.
Offset
);
break
;
case
AddrMode1632
:
dbg_printf
(
" in 32-bit code (%04x:%08lx)"
,
addr
.
Segment
,
addr
.
Offset
);
break
;
default:
dbg_printf
(
" bad address"
);
}
dbg_printf
(
".
\n
"
);
...
...
@@ -496,7 +497,7 @@ static unsigned dbg_exception_prolog(BOOL is_debug, DWORD code)
switch
(
addr
.
Mode
)
{
case
AddrMode1616
:
name
=
"16 bit"
;
break
;
case
AddrMode1632
:
name
=
"
X?X??X
"
;
break
;
case
AddrMode1632
:
name
=
"
32 bit
"
;
break
;
case
AddrModeReal
:
name
=
"vm86"
;
break
;
case
AddrModeFlat
:
name
=
"32 bit"
;
break
;
}
...
...
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