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
ebef9a95
Commit
ebef9a95
authored
Sep 01, 2000
by
James Abbatiello
Committed by
Alexandre Julliard
Sep 01, 2000
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix for debugger disassembly being off by one byte after using nexti
on a "call" instruction.
parent
ec6f37bf
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
17 additions
and
12 deletions
+17
-12
break.c
debugger/break.c
+14
-10
debugger.h
debugger/debugger.h
+1
-1
winedbg.c
debugger/winedbg.c
+2
-1
No files found.
debugger/break.c
View file @
ebef9a95
...
@@ -695,9 +695,8 @@ static BOOL DEBUG_ShallBreak( int bpnum )
...
@@ -695,9 +695,8 @@ static BOOL DEBUG_ShallBreak( int bpnum )
* Determine if we should continue execution after a SIGTRAP signal when
* Determine if we should continue execution after a SIGTRAP signal when
* executing in the given mode.
* executing in the given mode.
*/
*/
BOOL
DEBUG_ShouldContinue
(
DWORD
code
,
enum
exec_mode
mode
,
int
*
count
)
BOOL
DEBUG_ShouldContinue
(
D
BG_ADDR
*
addr
,
D
WORD
code
,
enum
exec_mode
mode
,
int
*
count
)
{
{
DBG_ADDR
addr
;
int
bpnum
;
int
bpnum
;
DWORD
oldval
;
DWORD
oldval
;
int
wpnum
;
int
wpnum
;
...
@@ -706,12 +705,14 @@ BOOL DEBUG_ShouldContinue( DWORD code, enum exec_mode mode, int * count )
...
@@ -706,12 +705,14 @@ BOOL DEBUG_ShouldContinue( DWORD code, enum exec_mode mode, int * count )
#ifdef __i386__
#ifdef __i386__
/* If not single-stepping, back up over the int3 instruction */
/* If not single-stepping, back up over the int3 instruction */
if
(
code
==
EXCEPTION_BREAKPOINT
)
if
(
code
==
EXCEPTION_BREAKPOINT
)
{
DEBUG_context
.
Eip
--
;
DEBUG_context
.
Eip
--
;
addr
->
off
--
;
}
#endif
#endif
DEBUG_GetCurrentAddress
(
&
addr
);
bpnum
=
DEBUG_FindBreakpoint
(
addr
,
DBG_BREAK
);
bpnum
=
DEBUG_FindBreakpoint
(
&
addr
,
DBG_BREAK
);
breakpoints
[
0
].
enabled
=
FALSE
;
/* disable the step-over breakpoint */
breakpoints
[
0
].
enabled
=
FALSE
;
/* disable the step-over breakpoint */
if
((
bpnum
!=
0
)
&&
(
bpnum
!=
-
1
))
if
((
bpnum
!=
0
)
&&
(
bpnum
!=
-
1
))
...
@@ -736,16 +737,16 @@ BOOL DEBUG_ShouldContinue( DWORD code, enum exec_mode mode, int * count )
...
@@ -736,16 +737,16 @@ BOOL DEBUG_ShouldContinue( DWORD code, enum exec_mode mode, int * count )
{
{
#ifdef __i386__
#ifdef __i386__
DEBUG_context
.
Eip
++
;
DEBUG_context
.
Eip
++
;
addr
.
off
++
;
addr
->
off
++
;
#endif
#endif
}
}
if
(
!
DEBUG_ShallBreak
(
wpnum
))
return
TRUE
;
if
(
!
DEBUG_ShallBreak
(
wpnum
))
return
TRUE
;
#ifdef __i386__
#ifdef __i386__
if
(
addr
.
seg
)
addrlen
=
DEBUG_GetSelectorType
(
addr
.
seg
);
if
(
addr
->
seg
)
addrlen
=
DEBUG_GetSelectorType
(
addr
->
seg
);
#endif
#endif
DEBUG_Printf
(
DBG_CHN_MESG
,
"Stopped on watchpoint %d at "
,
wpnum
);
DEBUG_Printf
(
DBG_CHN_MESG
,
"Stopped on watchpoint %d at "
,
wpnum
);
syminfo
=
DEBUG_PrintAddress
(
&
addr
,
addrlen
,
TRUE
);
syminfo
=
DEBUG_PrintAddress
(
addr
,
addrlen
,
TRUE
);
DEBUG_Printf
(
DBG_CHN_MESG
,
" values: old=%lu new=%lu
\n
"
,
DEBUG_Printf
(
DBG_CHN_MESG
,
" values: old=%lu new=%lu
\n
"
,
oldval
,
breakpoints
[
wpnum
].
u
.
w
.
oldval
);
oldval
,
breakpoints
[
wpnum
].
u
.
w
.
oldval
);
...
@@ -761,7 +762,7 @@ BOOL DEBUG_ShouldContinue( DWORD code, enum exec_mode mode, int * count )
...
@@ -761,7 +762,7 @@ BOOL DEBUG_ShouldContinue( DWORD code, enum exec_mode mode, int * count )
*/
*/
if
(
mode
==
EXEC_STEP_OVER
||
mode
==
EXEC_STEP_INSTR
)
if
(
mode
==
EXEC_STEP_OVER
||
mode
==
EXEC_STEP_INSTR
)
{
{
if
(
DEBUG_CheckLinenoStatus
(
&
addr
)
==
AT_LINENUMBER
)
if
(
DEBUG_CheckLinenoStatus
(
addr
)
==
AT_LINENUMBER
)
{
{
(
*
count
)
--
;
(
*
count
)
--
;
}
}
...
@@ -785,7 +786,7 @@ BOOL DEBUG_ShouldContinue( DWORD code, enum exec_mode mode, int * count )
...
@@ -785,7 +786,7 @@ BOOL DEBUG_ShouldContinue( DWORD code, enum exec_mode mode, int * count )
*/
*/
if
(
mode
!=
EXEC_CONT
&&
mode
!=
EXEC_PASS
&&
mode
!=
EXEC_FINISH
)
if
(
mode
!=
EXEC_CONT
&&
mode
!=
EXEC_PASS
&&
mode
!=
EXEC_FINISH
)
{
{
DEBUG_FindNearestSymbol
(
&
addr
,
TRUE
,
NULL
,
0
,
&
syminfo
.
list
);
DEBUG_FindNearestSymbol
(
addr
,
TRUE
,
NULL
,
0
,
&
syminfo
.
list
);
if
(
syminfo
.
list
.
sourcefile
!=
NULL
)
if
(
syminfo
.
list
.
sourcefile
!=
NULL
)
{
{
DEBUG_List
(
&
syminfo
.
list
,
NULL
,
0
);
DEBUG_List
(
&
syminfo
.
list
,
NULL
,
0
);
...
@@ -796,7 +797,10 @@ BOOL DEBUG_ShouldContinue( DWORD code, enum exec_mode mode, int * count )
...
@@ -796,7 +797,10 @@ BOOL DEBUG_ShouldContinue( DWORD code, enum exec_mode mode, int * count )
/* If there's no breakpoint and we are not single-stepping, then we */
/* If there's no breakpoint and we are not single-stepping, then we */
/* must have encountered an int3 in the Windows program; let's skip it. */
/* must have encountered an int3 in the Windows program; let's skip it. */
if
((
bpnum
==
-
1
)
&&
code
==
EXCEPTION_BREAKPOINT
)
if
((
bpnum
==
-
1
)
&&
code
==
EXCEPTION_BREAKPOINT
)
{
DEBUG_context
.
Eip
++
;
DEBUG_context
.
Eip
++
;
addr
->
off
++
;
}
#endif
#endif
/* no breakpoint, continue if in continuous mode */
/* no breakpoint, continue if in continuous mode */
...
...
debugger/debugger.h
View file @
ebef9a95
...
@@ -241,7 +241,7 @@ extern void DEBUG_DelBreakpoint( int num );
...
@@ -241,7 +241,7 @@ extern void DEBUG_DelBreakpoint( int num );
extern
void
DEBUG_EnableBreakpoint
(
int
num
,
BOOL
enable
);
extern
void
DEBUG_EnableBreakpoint
(
int
num
,
BOOL
enable
);
extern
void
DEBUG_InfoBreakpoints
(
void
);
extern
void
DEBUG_InfoBreakpoints
(
void
);
extern
BOOL
DEBUG_HandleTrap
(
void
);
extern
BOOL
DEBUG_HandleTrap
(
void
);
extern
BOOL
DEBUG_ShouldContinue
(
DWORD
code
,
enum
exec_mode
mode
,
int
*
count
);
extern
BOOL
DEBUG_ShouldContinue
(
D
BG_ADDR
*
addr
,
D
WORD
code
,
enum
exec_mode
mode
,
int
*
count
);
extern
void
DEBUG_SuspendExecution
(
void
);
extern
void
DEBUG_SuspendExecution
(
void
);
extern
enum
exec_mode
DEBUG_RestartExecution
(
enum
exec_mode
mode
,
int
count
);
extern
enum
exec_mode
DEBUG_RestartExecution
(
enum
exec_mode
mode
,
int
count
);
extern
BOOL
DEBUG_IsFctReturn
(
void
);
extern
BOOL
DEBUG_IsFctReturn
(
void
);
...
...
debugger/winedbg.c
View file @
ebef9a95
...
@@ -296,7 +296,8 @@ static BOOL DEBUG_ExceptionProlog(BOOL is_debug, BOOL force, DWORD code)
...
@@ -296,7 +296,8 @@ static BOOL DEBUG_ExceptionProlog(BOOL is_debug, BOOL force, DWORD code)
DEBUG_LoadEntryPoints
(
"Loading new modules symbols:
\n
"
);
DEBUG_LoadEntryPoints
(
"Loading new modules symbols:
\n
"
);
if
(
!
force
&&
is_debug
&&
if
(
!
force
&&
is_debug
&&
DEBUG_ShouldContinue
(
code
,
DEBUG_ShouldContinue
(
&
addr
,
code
,
DEBUG_CurrThread
->
dbg_exec_mode
,
DEBUG_CurrThread
->
dbg_exec_mode
,
&
DEBUG_CurrThread
->
dbg_exec_count
))
&
DEBUG_CurrThread
->
dbg_exec_count
))
return
FALSE
;
return
FALSE
;
...
...
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