* libgcc2.c (find_exception_handler): Not found is -1.
From-SVN: r15504
This commit is contained in:
parent
5ae9a80ae1
commit
c0727e2a06
2 changed files with 6 additions and 4 deletions
|
@ -1,5 +1,7 @@
|
|||
Tue Sep 16 14:22:36 1997 Jason Merrill <jason@yorick.cygnus.com>
|
||||
|
||||
* libgcc2.c (find_exception_handler): Not found is -1.
|
||||
|
||||
* integrate.c (expand_inline_function): Move expand_start_bindings
|
||||
after expanding the arguments.
|
||||
|
||||
|
|
|
@ -3335,7 +3335,7 @@ find_exception_handler (void *pc, exception_table *table)
|
|||
if (table)
|
||||
{
|
||||
int pos;
|
||||
int best = 0;
|
||||
int best = -1;
|
||||
|
||||
/* We can't do a binary search because the table isn't guaranteed
|
||||
to be sorted from function to function. */
|
||||
|
@ -3345,15 +3345,15 @@ find_exception_handler (void *pc, exception_table *table)
|
|||
{
|
||||
/* This can apply. Make sure it is at least as small as
|
||||
the previous best. */
|
||||
if (best == 0 || (table[pos].end <= table[best].end
|
||||
&& table[pos].start >= table[best].start))
|
||||
if (best == -1 || (table[pos].end <= table[best].end
|
||||
&& table[pos].start >= table[best].start))
|
||||
best = pos;
|
||||
}
|
||||
/* But it is sorted by starting PC within a function. */
|
||||
else if (best && table[pos].start > pc)
|
||||
break;
|
||||
}
|
||||
if (best != 0)
|
||||
if (best != -1)
|
||||
return table[best].exception_handler;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue