Commit 48b24bcd by Andrew MacLeod Committed by Andrew Macleod

libgcc2.c (__get_eh_table_version, [...]): New functions to return exception…

libgcc2.c (__get_eh_table_version, [...]): New functions to return exception descriptor information.

Tue Jun 23 13:38:18 EDT 1998  Andrew MacLeod  <amacleod@cygnus.com>
	* libgcc2.c (__get_eh_table_version, __get_eh_table_language): New
	functions to return exception descriptor information.
	(find_exception_handler): Pass match_info field to runtime matcher,
	not a descriptor table entry.
	* exception.cc (__cplus_type_matcher): Get a match_info pointer
	instead of an exception table entry as a parameter.

From-SVN: r20673
parent daf21dfd
Tue Jun 23 13:38:18 EDT 1998 Andrew MacLeod <amacleod@cygnus.com>
* libgcc2.c (__get_eh_table_version, __get_eh_table_language): New
functions to return exception descriptor information.
(find_exception_handler): Pass match_info field to runtime matcher,
not a descriptor table entry.
Tue Jun 23 09:30:58 1998 Dave Love <d.love@dl.ac.uk> Tue Jun 23 09:30:58 1998 Dave Love <d.love@dl.ac.uk>
* cpp.texi, gcc.texi: Add @dircategory, @direntry meant to * cpp.texi, gcc.texi: Add @dircategory, @direntry meant to
accompany previous Makefile.in (install-info) change. accompany previous Makefile.in (install-info) change.
Tue Jun 23 10:06:07 EDT 1998 Andrew MacLeod (amacleod@cygnus.com) Tue Jun 23 10:06:07 EDT 1998 Andrew MacLeod <amacleod@cygnus.com>
* eh-common.h (struct __eh_info): Remove coerced value field. * eh-common.h (struct __eh_info): Remove coerced value field.
* libgcc2.c (find_exception_handler): Don't set coerced_value field. * libgcc2.c (find_exception_handler): Don't set coerced_value field.
......
1998-06-23 Andrew MacLeod (amacleod@cygnus.com) 1998-06-23 Andrew MacLeod <amacleod@cygnus.com>
* exception.cc (__cplus_type_matcher): Get a match_info pointer
instead of an exception table entry as a parameter.
1998-06-23 Andrew MacLeod <amacleod@cygnus.com>
* parse.y (function_try_block): Don't call start_catch_handler. * parse.y (function_try_block): Don't call start_catch_handler.
* except.c (call_eh_info): Remove coerced field from declaration. * except.c (call_eh_info): Remove coerced field from declaration.
......
...@@ -152,7 +152,7 @@ __eh_free (void *p) ...@@ -152,7 +152,7 @@ __eh_free (void *p)
typedef void * (* rtimetype) (void); typedef void * (* rtimetype) (void);
extern "C" void * extern "C" void *
__cplus_type_matcher (cp_eh_info *info, exception_table *matching_info, __cplus_type_matcher (cp_eh_info *info, rtimetype match_info,
exception_descriptor *exception_table) exception_descriptor *exception_table)
{ {
void *ret; void *ret;
...@@ -162,7 +162,7 @@ __cplus_type_matcher (cp_eh_info *info, exception_table *matching_info, ...@@ -162,7 +162,7 @@ __cplus_type_matcher (cp_eh_info *info, exception_table *matching_info,
/* we don't worry about version info yet, there is only one version! */ /* we don't worry about version info yet, there is only one version! */
void *match_type = ((rtimetype) (matching_info->match_info)) (); void *match_type = match_info ();
ret = __throw_type_match_rtti (match_type, info->type, info->original_value); ret = __throw_type_match_rtti (match_type, info->type, info->original_value);
/* change value of exception */ /* change value of exception */
if (ret) if (ret)
......
...@@ -3358,6 +3358,23 @@ EH_TABLE_LOOKUP ...@@ -3358,6 +3358,23 @@ EH_TABLE_LOOKUP
#ifdef DWARF2_UNWIND_INFO #ifdef DWARF2_UNWIND_INFO
/* Return the table version of an exception descriptor */
short
__get_eh_table_version (exception_descriptor *table)
{
return table->lang.version;
}
/* Return the originating table language of an exception descriptor */
short
__get_eh_table_language (exception_descriptor *table)
{
return table->lang.language;
}
/* This routine takes a PC and a pointer to the exception region TABLE for /* This routine takes a PC and a pointer to the exception region TABLE for
its translation unit, and returns the address of the exception handler its translation unit, and returns the address of the exception handler
associated with the closest exception table handler entry associated associated with the closest exception table handler entry associated
...@@ -3424,7 +3441,7 @@ find_exception_handler (void *pc, exception_descriptor *table, void *eh_info) ...@@ -3424,7 +3441,7 @@ find_exception_handler (void *pc, exception_descriptor *table, void *eh_info)
/* match info but no matcher is NOT a match */ /* match info but no matcher is NOT a match */
if (matcher) if (matcher)
{ {
ret = (*matcher)(eh_info, &tab[pos], table); ret = (*matcher)(eh_info, tab[pos].match_info, table);
if (ret) if (ret)
return tab[pos].exception_handler; return tab[pos].exception_handler;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment