зеркало из https://github.com/github/ruby.git
particular symbol for win32_exception_list.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2719 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
Родитель
6d9d1a9bb4
Коммит
71a202fc01
|
@ -1,10 +1,10 @@
|
|||
Mon Aug 19 09:36:00 2002 Nobuyoshi Nakada <nobu.nokada@softhome.net>
|
||||
Mon Aug 19 12:38:33 2002 Nobuyoshi Nakada <nobu.nokada@softhome.net>
|
||||
|
||||
* eval.c (rb_thread_save_context, rb_thread_restore_context):
|
||||
save/restore SEH chain on MS-Windows at thread switch.
|
||||
[ruby-win32:273]
|
||||
|
||||
* eval.c (win32_get_exception_frame, win32_set_exception_frame):
|
||||
* eval.c (win32_get_exception_list, win32_set_exception_list):
|
||||
added.
|
||||
|
||||
Fri Aug 16 15:58:16 2002 WATANABE Hirofumi <eban@ruby-lang.org>
|
||||
|
|
20
eval.c
20
eval.c
|
@ -7222,11 +7222,8 @@ Init_Proc()
|
|||
}
|
||||
|
||||
/* Windows SEH refers data on the stack. */
|
||||
#undef SAVE_WIN32_EXCEPTION_LIST
|
||||
#if defined _WIN32 || defined __CYGWIN__
|
||||
# if !(defined _M_IX86 || defined __i386__)
|
||||
# error unsupported processor
|
||||
# endif
|
||||
|
||||
#if defined __CYGWIN__
|
||||
typedef unsigned long DWORD;
|
||||
#endif
|
||||
|
@ -7237,18 +7234,19 @@ win32_get_exception_list()
|
|||
DWORD p;
|
||||
# if defined _MSC_VER
|
||||
# ifdef _M_IX86
|
||||
# define SAVE_WIN32_EXCEPTION_LIST
|
||||
__asm mov eax, fs:[0];
|
||||
__asm mov p, eax;
|
||||
# endif
|
||||
# elif defined __GNUC__
|
||||
# ifdef __i386__
|
||||
# define SAVE_WIN32_EXCEPTION_LIST
|
||||
__asm__("movl %%fs:0,%0" : "=r"(p));
|
||||
# endif
|
||||
# elif defined __BORLANDC__
|
||||
# define SAVE_WIN32_EXCEPTION_LIST
|
||||
__emit__(0x64, 0xA1, 0, 0, 0, 0); /* mov eax, fs:[0] */
|
||||
p = _EAX;
|
||||
# else
|
||||
# error unsupported compiler
|
||||
# endif
|
||||
return p;
|
||||
}
|
||||
|
@ -7271,6 +7269,10 @@ win32_set_exception_list(p)
|
|||
__emit__(0x64, 0xA3, 0, 0, 0, 0); /* mov fs:[0], eax */
|
||||
# endif
|
||||
}
|
||||
|
||||
#ifndef SAVE_WIN32_EXCEPTION_LIST
|
||||
# error unsupported platform
|
||||
#endif
|
||||
#endif
|
||||
|
||||
static VALUE rb_eThreadError;
|
||||
|
@ -7302,7 +7304,7 @@ enum thread_status {
|
|||
struct thread {
|
||||
struct thread *next, *prev;
|
||||
jmp_buf context;
|
||||
#ifdef _WIN32
|
||||
#ifdef SAVE_WIN32_EXCEPTION_LIST
|
||||
DWORD win32_exception_list;
|
||||
#endif
|
||||
|
||||
|
@ -7556,7 +7558,7 @@ rb_thread_save_context(th)
|
|||
th->stk_len = len;
|
||||
FLUSH_REGISTER_WINDOWS;
|
||||
MEMCPY(th->stk_ptr, th->stk_pos, VALUE, th->stk_len);
|
||||
#ifdef _WIN32
|
||||
#ifdef SAVE_WIN32_EXCEPTION_LIST
|
||||
th->win32_exception_list = win32_get_exception_list();
|
||||
#endif
|
||||
|
||||
|
@ -7672,7 +7674,7 @@ rb_thread_restore_context(th, exit)
|
|||
|
||||
ruby_current_node = th->node;
|
||||
|
||||
#ifdef _WIN32
|
||||
#ifdef SAVE_WIN32_EXCEPTION_LIST
|
||||
win32_set_exception_list(th->win32_exception_list);
|
||||
#endif
|
||||
tmp = th;
|
||||
|
|
Загрузка…
Ссылка в новой задаче