Declaring a function from gcc internals

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

We are always working on implementing SEH exceptions on a arm
cross-compiler so we have started to add parser recognition for __try
,__except __finally keyword (resp. RID_SEH_TRY, RID_SEH_EXCEPT,
RID_SEH_FINALLY)

We have also declared the following new functions :
extern void c_begin_seh_try_stmt (location_t, tree);
extern tree c_finish_seh_try_stmt (void);
extern void c_begin_except_clause (tree);
extern void c_finish_except_clause (void);

Now let's consider the following sample code :

int _tmain(int argc, _TCHAR* argv[])
{
  DWORD* ptr = NULL;   // NULL pointer

      __try
      {
            puts("in try");
            *ptr = 0x4242;    // causes an access violation exception;
      }
      __except(puts("in filter"), EXCEPTION_EXECUTE_HANDLER)
      {
            puts("in except");
      }
      return 0;
}

What we need now is to parse the __except (easy) 






[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux