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
eab168cf
Commit
eab168cf
authored
May 22, 2007
by
Peter Oberndorfer
Committed by
Alexandre Julliard
May 23, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ntdll: Fix up instruction pointer in context inside raise_exception.
parent
30cc2119
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
9 deletions
+6
-9
exception.c
dlls/ntdll/exception.c
+5
-0
exception.c
dlls/ntdll/tests/exception.c
+1
-9
No files found.
dlls/ntdll/exception.c
View file @
eab168cf
...
...
@@ -336,6 +336,11 @@ static NTSTATUS raise_exception( EXCEPTION_RECORD *rec, CONTEXT *context, BOOL f
if
(
status
==
DBG_CONTINUE
||
status
==
DBG_EXCEPTION_HANDLED
)
return
STATUS_SUCCESS
;
#ifdef __i386__
/* fix up instruction pointer in context for EXCEPTION_BREAKPOINT */
if
(
rec
->
ExceptionCode
==
EXCEPTION_BREAKPOINT
)
context
->
Eip
--
;
#endif
if
(
call_vectored_handlers
(
rec
,
context
)
==
EXCEPTION_CONTINUE_EXECUTION
)
return
STATUS_SUCCESS
;
...
...
dlls/ntdll/tests/exception.c
View file @
eab168cf
...
...
@@ -215,10 +215,8 @@ LONG CALLBACK rtlraiseexception_vectored_handler(EXCEPTION_POINTERS *ExceptionIn
*/
if
(
rec
->
ExceptionCode
==
EXCEPTION_BREAKPOINT
)
{
todo_wine
{
ok
(
context
->
Eip
==
(
DWORD
)
code_mem
+
0xa
,
"Eip at %x instead of %x
\n
"
,
context
->
Eip
,
(
DWORD
)
code_mem
+
0xa
);
}
}
else
{
...
...
@@ -247,10 +245,8 @@ static DWORD rtlraiseexception_handler( EXCEPTION_RECORD *rec, EXCEPTION_REGISTR
*/
if
(
rec
->
ExceptionCode
==
EXCEPTION_BREAKPOINT
)
{
todo_wine
{
ok
(
context
->
Eip
==
(
DWORD
)
code_mem
+
0xa
,
"Eip at %x instead of %x
\n
"
,
context
->
Eip
,
(
DWORD
)
code_mem
+
0xa
);
}
}
else
{
...
...
@@ -525,9 +521,7 @@ static DWORD int3_handler( EXCEPTION_RECORD *rec, EXCEPTION_REGISTRATION_RECORD
{
ok
(
rec
->
ExceptionAddress
==
code_mem
,
"exception address not at: %p, but at %p
\n
"
,
code_mem
,
rec
->
ExceptionAddress
);
todo_wine
{
ok
(
context
->
Eip
==
(
DWORD
)
code_mem
,
"eip not at: %p, but at %#x
\n
"
,
code_mem
,
context
->
Eip
);
}
ok
(
context
->
Eip
==
(
DWORD
)
code_mem
,
"eip not at: %p, but at %#x
\n
"
,
code_mem
,
context
->
Eip
);
if
(
context
->
Eip
==
(
DWORD
)
code_mem
)
context
->
Eip
++
;
/* skip breakpoint */
return
ExceptionContinueExecution
;
...
...
@@ -692,10 +686,8 @@ static void test_debugger(void)
/* ctx.Eip is the same value the exception handler got */
if
(
de
.
u
.
Exception
.
ExceptionRecord
.
ExceptionCode
==
EXCEPTION_BREAKPOINT
)
{
todo_wine
{
ok
((
char
*
)
ctx
.
Eip
==
(
char
*
)
code_mem_address
+
0xa
,
"Eip at 0x%x instead of %p
\n
"
,
ctx
.
Eip
,
(
char
*
)
code_mem_address
+
0xa
);
}
/* need to fixup Eip for debuggee */
if
((
char
*
)
ctx
.
Eip
==
(
char
*
)
code_mem_address
+
0xa
)
ctx
.
Eip
+=
1
;
...
...
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