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
372a32b5
Commit
372a32b5
authored
Apr 15, 2011
by
André Hentschel
Committed by
Alexandre Julliard
Apr 18, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ntdll: Implement call_stack_handlers on ARM.
parent
12a4706f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
51 additions
and
6 deletions
+51
-6
signal_arm.c
dlls/ntdll/signal_arm.c
+51
-6
No files found.
dlls/ntdll/signal_arm.c
View file @
372a32b5
...
...
@@ -93,6 +93,16 @@ static inline int dispatch_signal(unsigned int sig)
return
handlers
[
sig
](
sig
);
}
/*******************************************************************
* is_valid_frame
*/
static
inline
BOOL
is_valid_frame
(
void
*
frame
)
{
if
((
ULONG_PTR
)
frame
&
3
)
return
FALSE
;
return
(
frame
>=
NtCurrentTeb
()
->
Tib
.
StackLimit
&&
(
void
**
)
frame
<
(
void
**
)
NtCurrentTeb
()
->
Tib
.
StackBase
-
1
);
}
/***********************************************************************
* save_context
*
...
...
@@ -305,14 +315,49 @@ NTSTATUS context_from_server( CONTEXT *to, const context_t *from )
*/
static
NTSTATUS
call_stack_handlers
(
EXCEPTION_RECORD
*
rec
,
CONTEXT
*
context
)
{
EXCEPTION_POINTERS
ptrs
;
EXCEPTION_REGISTRATION_RECORD
*
frame
,
*
dispatch
,
*
nested_frame
;
DWORD
res
;
FIXME
(
"not implemented on ARM, exceptioncode: %x
\n
"
,
rec
->
ExceptionCode
);
frame
=
NtCurrentTeb
()
->
Tib
.
ExceptionList
;
nested_frame
=
NULL
;
while
(
frame
!=
(
EXCEPTION_REGISTRATION_RECORD
*
)
~
0UL
)
{
/* Check frame address */
if
(
!
is_valid_frame
(
frame
))
{
rec
->
ExceptionFlags
|=
EH_STACK_INVALID
;
break
;
}
/* hack: call unhandled exception filter directly */
ptrs
.
ExceptionRecord
=
rec
;
ptrs
.
ContextRecord
=
context
;
unhandled_exception_filter
(
&
ptrs
);
/* Call handler */
TRACE
(
"calling handler at %p code=%x flags=%x
\n
"
,
frame
->
Handler
,
rec
->
ExceptionCode
,
rec
->
ExceptionFlags
);
res
=
frame
->
Handler
(
rec
,
frame
,
context
,
&
dispatch
);
TRACE
(
"handler at %p returned %x
\n
"
,
frame
->
Handler
,
res
);
if
(
frame
==
nested_frame
)
{
/* no longer nested */
nested_frame
=
NULL
;
rec
->
ExceptionFlags
&=
~
EH_NESTED_CALL
;
}
switch
(
res
)
{
case
ExceptionContinueExecution
:
if
(
!
(
rec
->
ExceptionFlags
&
EH_NONCONTINUABLE
))
return
STATUS_SUCCESS
;
return
STATUS_NONCONTINUABLE_EXCEPTION
;
case
ExceptionContinueSearch
:
break
;
case
ExceptionNestedException
:
if
(
nested_frame
<
dispatch
)
nested_frame
=
dispatch
;
rec
->
ExceptionFlags
|=
EH_NESTED_CALL
;
break
;
default
:
return
STATUS_INVALID_DISPOSITION
;
}
frame
=
frame
->
Prev
;
}
return
STATUS_UNHANDLED_EXCEPTION
;
}
...
...
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