This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Request for Exception Handling Table Information


> Also in the file except.c there is "Future Direction" talk about adding type 
> information to the exception handling tables.  When I use GCC (egcs-2.91.66) 
> and look at __EXCEPTION_TABLE__ there appear to be only three fields per 
> entry.

If you compile

struct A{
 ~A();
};

void bar();

void foo()
{
  A x;
  try{
    bar();
  }catch(A& x){
  }
}

with gcc 2.95, and the -fnew-exceptions flag, you'll see the other
slot being used.

> 2) When looking at the code for throw and catch there appear to be calls to 
> routines like __tfi (depends on type) and __cp_push_exception is there a 
> place where it is documented what calls have to be done (for throw and 
> catch), in what order, with what parameters, and what each call is supposed 
> to do?

When you do

mira% c++filt __tfi
int type_info function

you'll understand why the name of the function depends on the type :-)

The full source code is available, so you can get any information you
want. Your questions seem to involve quite a few areas (type
information, generic exception handling, C++ interactions); high-level
documentation for each of these areas is available in various places
in the compiler.

Regards,
Martin


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]