From d7e7852964c2fd25f97b232fbe825bc879473f01 Mon Sep 17 00:00:00 2001 From: Andrew MacLeod Date: Wed, 17 Jun 1998 13:29:22 +0000 Subject: [PATCH] except.c (add_new_handler): fix bug in finding last region handler. Wed Jun 17 16:25:38 EDT 1998 Andrew MacLeod (amacleod@cygnus.com) * except.c (add_new_handler): fix bug in finding last region handler. * libgcc2.c (find_exception_handler): Pass exception table pointer to runtime type matcher, not the match info field. From-SVN: r20541 --- gcc/ChangeLog | 6 ++++++ gcc/except.c | 3 ++- gcc/libgcc2.c | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 18888da7aad..b6f2d3d3dc5 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +Wed Jun 17 16:25:38 EDT 1998 Andrew MacLeod (amacleod@cygnus.com) + + * except.c (add_new_handler): fix bug in finding last region handler. + * libgcc2.c (find_exception_handler): Pass exception table pointer + to runtime type matcher, not the match info field. + Wed Jun 17 15:57:48 EDT 1998 Andrew MacLeod (amacleod@cygnus.com) * eh-common.h (struct eh_context): Add comment for hidden use of diff --git a/gcc/except.c b/gcc/except.c index c5c725992d2..d707a0ebbb8 100644 --- a/gcc/except.c +++ b/gcc/except.c @@ -750,7 +750,8 @@ add_new_handler (region, newhandler) else { for ( ; last->next != NULL; last = last->next) - last->next = newhandler; + ; + last->next = newhandler; } } diff --git a/gcc/libgcc2.c b/gcc/libgcc2.c index 379586b8728..1fc703e84d2 100644 --- a/gcc/libgcc2.c +++ b/gcc/libgcc2.c @@ -3424,7 +3424,7 @@ find_exception_handler (void *pc, exception_descriptor *table, void *eh_info) /* match info but no matcher is NOT a match */ if (matcher) { - ret = (*matcher)(eh_info, tab[pos].match_info, table); + ret = (*matcher)(eh_info, &tab[pos], table); if (ret) { ((__eh_info *)eh_info)->coerced_value = ret; -- 2.30.2