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
900bc569
Commit
900bc569
authored
Jul 03, 2008
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
widl: Add support for exception handling in the generated server code.
parent
336a7dc1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
57 additions
and
1 deletion
+57
-1
server.c
tools/widl/server.c
+57
-1
No files found.
tools/widl/server.c
View file @
900bc569
...
...
@@ -382,7 +382,63 @@ static void init_server(void)
print_server
(
"#include <string.h>
\n
"
);
fprintf
(
server
,
"
\n
"
);
print_server
(
"#include
\"
%s
\"\n
"
,
header_name
);
fprintf
(
server
,
"
\n
"
);
print_server
(
"
\n
"
);
print_server
(
"#ifndef USE_COMPILER_EXCEPTIONS
\n
"
);
print_server
(
"
\n
"
);
print_server
(
"#include
\"
wine/exception.h
\"\n
"
);
print_server
(
"#undef RpcTryExcept
\n
"
);
print_server
(
"#undef RpcExcept
\n
"
);
print_server
(
"#undef RpcEndExcept
\n
"
);
print_server
(
"#undef RpcExceptionCode
\n
"
);
print_server
(
"
\n
"
);
print_server
(
"struct __server_frame
\n
"
);
print_server
(
"{
\n
"
);
print_server
(
" EXCEPTION_REGISTRATION_RECORD frame;
\n
"
);
print_server
(
" sigjmp_buf jmp;
\n
"
);
print_server
(
"};
\n
"
);
print_server
(
"
\n
"
);
print_server
(
"static DWORD __server_exception_handler( EXCEPTION_RECORD *record,
\n
"
);
print_server
(
" EXCEPTION_REGISTRATION_RECORD *frame,
\n
"
);
print_server
(
" CONTEXT *context,
\n
"
);
print_server
(
" EXCEPTION_REGISTRATION_RECORD **pdispatcher )
\n
"
);
print_server
(
"{
\n
"
);
print_server
(
" struct __server_frame *server_frame = (struct __server_frame *)frame;
\n
"
);
print_server
(
"
\n
"
);
print_server
(
" if (record->ExceptionFlags & (EH_UNWINDING | EH_EXIT_UNWIND | EH_NESTED_CALL))
\n
"
);
print_server
(
" return ExceptionContinueSearch;
\n
"
);
print_server
(
"
\n
"
);
print_server
(
" if (record->ExceptionCode != STATUS_ACCESS_VIOLATION &&
\n
"
);
print_server
(
" record->ExceptionCode != STATUS_DATATYPE_MISALIGNMENT &&
\n
"
);
print_server
(
" record->ExceptionCode != RPC_X_BAD_STUB_DATA &&
\n
"
);
print_server
(
" record->ExceptionCode != RPC_S_INVALID_BOUND)
\n
"
);
print_server
(
" return ExceptionContinueSearch;
\n
"
);
print_server
(
"
\n
"
);
print_server
(
" __wine_rtl_unwind( frame, record );
\n
"
);
print_server
(
" __wine_pop_frame( frame );
\n
"
);
print_server
(
" siglongjmp( server_frame->jmp, 1 );
\n
"
);
print_server
(
"}
\n
"
);
print_server
(
"#define RpcTryExcept
\\\n
"
);
print_server
(
" do {
\\\n
"
);
print_server
(
" struct __server_frame __server_frame;
\\\n
"
);
print_server
(
" __server_frame.frame.Handler = __server_exception_handler;
\\\n
"
);
print_server
(
" if (!sigsetjmp( __server_frame.jmp, 0 ))
\\\n
"
);
print_server
(
" {
\\\n
"
);
print_server
(
" __wine_push_frame( &__server_frame.frame );
\\\n
"
);
print_server
(
" {
\n
"
);
print_server
(
"
\n
"
);
print_server
(
"#define RpcExcept(expr)
\\\n
"
);
print_server
(
" }
\\\n
"
);
print_server
(
" __wine_pop_frame( &__server_frame.frame );
\\\n
"
);
print_server
(
" }
\\\n
"
);
print_server
(
" else
\\\n
"
);
print_server
(
" {
\n
"
);
print_server
(
"
\n
"
);
print_server
(
"#define RpcEndExcept
\\\n
"
);
print_server
(
" }
\\\n
"
);
print_server
(
" } while(0);
\n
"
);
print_server
(
"
\n
"
);
print_server
(
"#endif /* USE_COMPILER_EXCEPTIONS */
\n
"
);
print_server
(
"
\n
"
);
}
...
...
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