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
07762576
Commit
07762576
authored
Sep 29, 2015
by
Piotr Caban
Committed by
Alexandre Julliard
Oct 01, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msvcrt: Add i386 __CxxExceptionFilter implementation.
Signed-off-by:
Piotr Caban
<
piotr@codeweavers.com
>
parent
a05cdaa1
Hide whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
93 additions
and
18 deletions
+93
-18
api-ms-win-crt-private-l1-1-0.spec
...win-crt-private-l1-1-0/api-ms-win-crt-private-l1-1-0.spec
+1
-1
msvcr100.spec
dlls/msvcr100/msvcr100.spec
+1
-1
msvcr110.spec
dlls/msvcr110/msvcr110.spec
+1
-1
msvcr120.spec
dlls/msvcr120/msvcr120.spec
+1
-1
msvcr120_app.spec
dlls/msvcr120_app/msvcr120_app.spec
+1
-1
msvcr70.spec
dlls/msvcr70/msvcr70.spec
+1
-1
msvcr71.spec
dlls/msvcr71/msvcr71.spec
+1
-1
msvcr80.spec
dlls/msvcr80/msvcr80.spec
+1
-1
msvcr90.spec
dlls/msvcr90/msvcr90.spec
+1
-1
except_arm.c
dlls/msvcrt/except_arm.c
+9
-0
except_i386.c
dlls/msvcrt/except_i386.c
+64
-7
except_x86_64.c
dlls/msvcrt/except_x86_64.c
+9
-0
msvcrt.spec
dlls/msvcrt/msvcrt.spec
+1
-1
ucrtbase.spec
dlls/ucrtbase/ucrtbase.spec
+1
-1
No files found.
dlls/api-ms-win-crt-private-l1-1-0/api-ms-win-crt-private-l1-1-0.spec
View file @
07762576
...
...
@@ -16,7 +16,7 @@
@ stub __BuildCatchObjectHelper
@ stdcall -arch=x86_64 __C_specific_handler(ptr long ptr ptr) ucrtbase.__C_specific_handler
@ cdecl -arch=i386,x86_64,arm __CxxDetectRethrow(ptr) ucrtbase.__CxxDetectRethrow
@
stub
__CxxExceptionFilter
@
cdecl -arch=i386,x86_64,arm __CxxExceptionFilter(ptr ptr long ptr) ucrtbase.
__CxxExceptionFilter
@ cdecl -arch=i386,x86_64,arm -norelay __CxxFrameHandler(ptr ptr ptr ptr) ucrtbase.__CxxFrameHandler
@ cdecl -arch=i386,x86_64,arm -norelay __CxxFrameHandler2(ptr ptr ptr ptr) ucrtbase.__CxxFrameHandler2
@ cdecl -arch=i386,x86_64,arm -norelay __CxxFrameHandler3(ptr ptr ptr ptr) ucrtbase.__CxxFrameHandler3
...
...
dlls/msvcr100/msvcr100.spec
View file @
07762576
...
...
@@ -548,7 +548,7 @@
@ stub __CxxCallUnwindStdDelDtor
@ stub __CxxCallUnwindVecDtor
@ cdecl -arch=i386,x86_64,arm __CxxDetectRethrow(ptr)
@
stub __CxxExceptionFilter
@
cdecl -arch=i386,x86_64,arm __CxxExceptionFilter(ptr ptr long ptr)
@ cdecl -arch=i386,x86_64,arm -norelay __CxxFrameHandler(ptr ptr ptr ptr)
@ cdecl -arch=i386,x86_64,arm -norelay __CxxFrameHandler2(ptr ptr ptr ptr) __CxxFrameHandler
@ cdecl -arch=i386,x86_64,arm -norelay __CxxFrameHandler3(ptr ptr ptr ptr) __CxxFrameHandler
...
...
dlls/msvcr110/msvcr110.spec
View file @
07762576
...
...
@@ -875,7 +875,7 @@
@ stdcall -arch=x86_64 __C_specific_handler(ptr long ptr ptr) ntdll.__C_specific_handler
@ cdecl -arch=i386,x86_64,arm __CppXcptFilter(long ptr)
@ cdecl -arch=i386,x86_64,arm __CxxDetectRethrow(ptr)
@
stub __CxxExceptionFilter
@
cdecl -arch=i386,x86_64,arm __CxxExceptionFilter(ptr ptr long ptr)
@ cdecl -arch=i386,x86_64,arm -norelay __CxxFrameHandler(ptr ptr ptr ptr)
@ cdecl -arch=i386,x86_64,arm -norelay __CxxFrameHandler2(ptr ptr ptr ptr) __CxxFrameHandler
@ cdecl -arch=i386,x86_64,arm -norelay __CxxFrameHandler3(ptr ptr ptr ptr) __CxxFrameHandler
...
...
dlls/msvcr120/msvcr120.spec
View file @
07762576
...
...
@@ -859,7 +859,7 @@
@ stdcall -arch=x86_64 __C_specific_handler(ptr long ptr ptr) ntdll.__C_specific_handler
@ cdecl -arch=i386,x86_64,arm __CppXcptFilter(long ptr)
@ cdecl -arch=i386,x86_64,arm __CxxDetectRethrow(ptr)
@
stub __CxxExceptionFilter
@
cdecl -arch=i386,x86_64,arm __CxxExceptionFilter(ptr ptr long ptr)
@ cdecl -arch=i386,x86_64,arm -norelay __CxxFrameHandler(ptr ptr ptr ptr)
@ cdecl -arch=i386,x86_64,arm -norelay __CxxFrameHandler2(ptr ptr ptr ptr) __CxxFrameHandler
@ cdecl -arch=i386,x86_64,arm -norelay __CxxFrameHandler3(ptr ptr ptr ptr) __CxxFrameHandler
...
...
dlls/msvcr120_app/msvcr120_app.spec
View file @
07762576
...
...
@@ -853,7 +853,7 @@
@ stdcall -arch=x86_64 __C_specific_handler(ptr long ptr ptr) msvcr120.__C_specific_handler
@ cdecl -arch=i386,x86_64,arm __CppXcptFilter(long ptr) msvcr120.__CppXcptFilter
@ cdecl -arch=i386,x86_64,arm __CxxDetectRethrow(ptr) msvcr120.__CxxDetectRethrow
@
stub
__CxxExceptionFilter
@
cdecl -arch=i386,x86_64,arm __CxxExceptionFilter(ptr ptr long ptr) msvcr120.
__CxxExceptionFilter
@ cdecl -arch=i386,x86_64,arm -norelay __CxxFrameHandler(ptr ptr ptr ptr) msvcr120.__CxxFrameHandler
@ cdecl -arch=i386,x86_64,arm -norelay __CxxFrameHandler2(ptr ptr ptr ptr) msvcr120.__CxxFrameHandler2
@ cdecl -arch=i386,x86_64,arm -norelay __CxxFrameHandler3(ptr ptr ptr ptr) msvcr120.__CxxFrameHandler3
...
...
dlls/msvcr70/msvcr70.spec
View file @
07762576
...
...
@@ -119,7 +119,7 @@
@ stub __CxxCallUnwindDtor
@ stub __CxxCallUnwindVecDtor
@ cdecl -arch=i386,x86_64,arm __CxxDetectRethrow(ptr)
@
stub __CxxExceptionFilter
@
cdecl -arch=i386,x86_64,arm __CxxExceptionFilter(ptr ptr long ptr)
@ cdecl -arch=i386,x86_64,arm -norelay __CxxFrameHandler(ptr ptr ptr ptr)
@ stdcall -arch=i386 __CxxLongjmpUnwind(ptr)
@ cdecl -arch=i386,x86_64,arm __CxxQueryExceptionSize()
...
...
dlls/msvcr71/msvcr71.spec
View file @
07762576
...
...
@@ -114,7 +114,7 @@
@ stub __CxxCallUnwindDtor
@ stub __CxxCallUnwindVecDtor
@ cdecl -arch=i386,x86_64,arm __CxxDetectRethrow(ptr)
@
stub __CxxExceptionFilter
@
cdecl -arch=i386,x86_64,arm __CxxExceptionFilter(ptr ptr long ptr)
@ cdecl -arch=i386,x86_64,arm -norelay __CxxFrameHandler(ptr ptr ptr ptr)
@ stdcall -arch=i386 __CxxLongjmpUnwind(ptr)
@ cdecl -arch=i386,x86_64,arm __CxxQueryExceptionSize()
...
...
dlls/msvcr80/msvcr80.spec
View file @
07762576
...
...
@@ -182,7 +182,7 @@
@ stub __CxxCallUnwindStdDelDtor
@ stub __CxxCallUnwindVecDtor
@ cdecl -arch=i386,x86_64,arm __CxxDetectRethrow(ptr)
@
stub __CxxExceptionFilter
@
cdecl -arch=i386,x86_64,arm __CxxExceptionFilter(ptr ptr long ptr)
@ cdecl -arch=i386,x86_64,arm -norelay __CxxFrameHandler(ptr ptr ptr ptr)
@ cdecl -arch=i386,x86_64,arm -norelay __CxxFrameHandler2(ptr ptr ptr ptr) __CxxFrameHandler
@ cdecl -arch=i386,x86_64,arm -norelay __CxxFrameHandler3(ptr ptr ptr ptr) __CxxFrameHandler
...
...
dlls/msvcr90/msvcr90.spec
View file @
07762576
...
...
@@ -173,7 +173,7 @@
@ stub __CxxCallUnwindStdDelDtor
@ stub __CxxCallUnwindVecDtor
@ cdecl -arch=i386,x86_64,arm __CxxDetectRethrow(ptr)
@
stub __CxxExceptionFilter
@
cdecl -arch=i386,x86_64,arm __CxxExceptionFilter(ptr ptr long ptr)
@ cdecl -arch=i386,x86_64,arm -norelay __CxxFrameHandler(ptr ptr ptr ptr)
@ cdecl -arch=i386,x86_64,arm -norelay __CxxFrameHandler2(ptr ptr ptr ptr) __CxxFrameHandler
@ cdecl -arch=i386,x86_64,arm -norelay __CxxFrameHandler3(ptr ptr ptr ptr) __CxxFrameHandler
...
...
dlls/msvcrt/except_arm.c
View file @
07762576
...
...
@@ -64,6 +64,15 @@ typedef struct _DISPATCHER_CONTEXT
DWORD
VirtualVfpHead
;
}
DISPATCHER_CONTEXT
;
/*********************************************************************
* __CxxExceptionFilter (MSVCRT.@)
*/
int
CDECL
__CxxExceptionFilter
(
PEXCEPTION_POINTERS
ptrs
,
const
type_info
*
ti
,
int
flags
,
void
**
copy
)
{
FIXME
(
"%p %p %x %p: not implemented
\n
"
,
ptrs
,
ti
,
flags
,
copy
);
return
EXCEPTION_CONTINUE_SEARCH
;
}
/*********************************************************************
* __CxxFrameHandler (MSVCRT.@)
...
...
dlls/msvcrt/except_i386.c
View file @
07762576
...
...
@@ -266,7 +266,7 @@ static void dump_function_descr( const cxx_function_descr *descr )
/* check if the exception type is caught by a given catch block, and return the type that matched */
static
const
cxx_type_info
*
find_caught_type
(
cxx_exception_type
*
exc_type
,
const
catchblock_info
*
catchblock
)
const
type_info
*
catch_ti
,
UINT
catch_flags
)
{
UINT
i
;
...
...
@@ -274,16 +274,16 @@ static const cxx_type_info *find_caught_type( cxx_exception_type *exc_type,
{
const
cxx_type_info
*
type
=
exc_type
->
type_info_table
->
info
[
i
];
if
(
!
catch
block
->
type_info
)
return
type
;
/* catch(...) matches any type */
if
(
catch
block
->
type_info
!=
type
->
type_info
)
if
(
!
catch
_ti
)
return
type
;
/* catch(...) matches any type */
if
(
catch
_ti
!=
type
->
type_info
)
{
if
(
strcmp
(
catch
block
->
type_info
->
mangled
,
type
->
type_info
->
mangled
))
continue
;
if
(
strcmp
(
catch
_ti
->
mangled
,
type
->
type_info
->
mangled
))
continue
;
}
/* type is the same, now check the flags */
if
((
exc_type
->
flags
&
TYPE_FLAG_CONST
)
&&
!
(
catch
block
->
flags
&
TYPE_FLAG_CONST
))
continue
;
!
(
catch
_
flags
&
TYPE_FLAG_CONST
))
continue
;
if
((
exc_type
->
flags
&
TYPE_FLAG_VOLATILE
)
&&
!
(
catch
block
->
flags
&
TYPE_FLAG_VOLATILE
))
continue
;
!
(
catch
_
flags
&
TYPE_FLAG_VOLATILE
))
continue
;
return
type
;
/* it matched */
}
return
NULL
;
...
...
@@ -442,7 +442,8 @@ static inline void call_catch_block( PEXCEPTION_RECORD rec, cxx_exception_frame
const
catchblock_info
*
catchblock
=
&
tryblock
->
catchblock
[
j
];
if
(
info
)
{
const
cxx_type_info
*
type
=
find_caught_type
(
info
,
catchblock
);
const
cxx_type_info
*
type
=
find_caught_type
(
info
,
catchblock
->
type_info
,
catchblock
->
flags
);
if
(
!
type
)
continue
;
TRACE
(
"matched type %p in tryblock %d catchblock %d
\n
"
,
type
,
i
,
j
);
...
...
@@ -491,6 +492,62 @@ static inline void call_catch_block( PEXCEPTION_RECORD rec, cxx_exception_frame
}
}
/*********************************************************************
* __CxxExceptionFilter (MSVCRT.@)
*/
int
CDECL
__CxxExceptionFilter
(
PEXCEPTION_POINTERS
ptrs
,
const
type_info
*
ti
,
int
flags
,
void
**
copy
)
{
const
cxx_type_info
*
type
;
PEXCEPTION_RECORD
rec
;
TRACE
(
"%p %p %x %p
\n
"
,
ptrs
,
ti
,
flags
,
copy
);
if
(
!
ptrs
)
return
EXCEPTION_CONTINUE_SEARCH
;
/* handle catch(...) */
if
(
!
ti
)
return
EXCEPTION_EXECUTE_HANDLER
;
rec
=
ptrs
->
ExceptionRecord
;
if
(
rec
->
ExceptionCode
!=
CXX_EXCEPTION
||
rec
->
NumberParameters
!=
3
||
rec
->
ExceptionInformation
[
0
]
<
CXX_FRAME_MAGIC_VC6
||
rec
->
ExceptionInformation
[
0
]
>
CXX_FRAME_MAGIC_VC8
)
return
EXCEPTION_CONTINUE_SEARCH
;
if
(
rec
->
ExceptionInformation
[
1
]
==
0
&&
rec
->
ExceptionInformation
[
2
]
==
0
)
{
rec
=
msvcrt_get_thread_data
()
->
exc_record
;
if
(
!
rec
)
return
EXCEPTION_CONTINUE_SEARCH
;
}
type
=
find_caught_type
(
(
cxx_exception_type
*
)
rec
->
ExceptionInformation
[
2
],
ti
,
flags
);
if
(
!
type
)
return
EXCEPTION_CONTINUE_SEARCH
;
if
(
copy
)
{
void
*
object
=
(
void
*
)
rec
->
ExceptionInformation
[
1
];
if
(
flags
&
TYPE_FLAG_REFERENCE
)
{
*
copy
=
get_this_pointer
(
&
type
->
offsets
,
object
);
}
else
if
(
type
->
flags
&
CLASS_IS_SIMPLE_TYPE
)
{
memmove
(
copy
,
object
,
type
->
size
);
/* if it is a pointer, adjust it */
if
(
type
->
size
==
sizeof
(
void
*
))
*
copy
=
get_this_pointer
(
&
type
->
offsets
,
*
copy
);
}
else
/* copy the object */
{
if
(
type
->
copy_ctor
)
call_copy_ctor
(
type
->
copy_ctor
,
copy
,
get_this_pointer
(
&
type
->
offsets
,
object
),
(
type
->
flags
&
CLASS_HAS_VIRTUAL_BASE_CLASS
)
);
else
memmove
(
copy
,
get_this_pointer
(
&
type
->
offsets
,
object
),
type
->
size
);
}
}
return
EXCEPTION_EXECUTE_HANDLER
;
}
/*********************************************************************
* cxx_frame_handler
...
...
dlls/msvcrt/except_x86_64.c
View file @
07762576
...
...
@@ -61,6 +61,15 @@ typedef struct _DISPATCHER_CONTEXT
ULONG
ScopeIndex
;
}
DISPATCHER_CONTEXT
;
/*********************************************************************
* __CxxExceptionFilter (MSVCRT.@)
*/
int
CDECL
__CxxExceptionFilter
(
PEXCEPTION_POINTERS
ptrs
,
const
type_info
*
ti
,
int
flags
,
void
**
copy
)
{
FIXME
(
"%p %p %x %p: not implemented
\n
"
,
ptrs
,
ti
,
flags
,
copy
);
return
EXCEPTION_CONTINUE_SEARCH
;
}
/*********************************************************************
* __CxxFrameHandler (MSVCRT.@)
...
...
dlls/msvcrt/msvcrt.spec
View file @
07762576
...
...
@@ -178,7 +178,7 @@
# stub __CxxCallUnwindDtor
# stub __CxxCallUnwindVecDtor
@ cdecl -arch=i386,x86_64,arm __CxxDetectRethrow(ptr)
# stub __CxxExceptionFilter
@ cdecl -arch=i386,x86_64,arm __CxxExceptionFilter(ptr ptr long ptr)
@ cdecl -arch=i386,x86_64,arm -norelay __CxxFrameHandler(ptr ptr ptr ptr)
@ cdecl -arch=i386,x86_64,arm -norelay __CxxFrameHandler2(ptr ptr ptr ptr) __CxxFrameHandler
@ cdecl -arch=i386,x86_64,arm -norelay __CxxFrameHandler3(ptr ptr ptr ptr) __CxxFrameHandler
...
...
dlls/ucrtbase/ucrtbase.spec
View file @
07762576
...
...
@@ -50,7 +50,7 @@
@ stub __BuildCatchObjectHelper
@ stdcall -arch=x86_64 __C_specific_handler(ptr long ptr ptr) ntdll.__C_specific_handler
@ cdecl -arch=i386,x86_64,arm __CxxDetectRethrow(ptr)
@
stub __CxxExceptionFilter
@
cdecl -arch=i386,x86_64,arm __CxxExceptionFilter(ptr ptr long ptr)
@ cdecl -arch=i386,x86_64,arm -norelay __CxxFrameHandler(ptr ptr ptr ptr)
@ cdecl -arch=i386,x86_64,arm -norelay __CxxFrameHandler2(ptr ptr ptr ptr) __CxxFrameHandler
@ cdecl -arch=i386,x86_64,arm -norelay __CxxFrameHandler3(ptr ptr ptr ptr) __CxxFrameHandler
...
...
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