OSDN Git Service

dwarf2 EH support
[pf3gnuchains/gcc-fork.git] / gcc / frame.h
1 /* Copyright (C) 1997 Free Software Foundation, Inc.
2    This file is part of GNU CC.  */
3
4 typedef struct frame_state
5 {
6   void *cfa;
7   void *eh_ptr;
8   long cfa_offset;
9   long args_size;
10   long reg_or_offset[FIRST_PSEUDO_REGISTER+1];
11   unsigned short cfa_reg;
12   unsigned short retaddr_column;
13   char saved[FIRST_PSEUDO_REGISTER+1];
14 } frame_state;
15
16 /* Values for 'saved' above.  */
17 #define REG_UNSAVED 0
18 #define REG_SAVED_OFFSET 1
19 #define REG_SAVED_REG 2
20
21 /* Called either from crtbegin.o or a static constructor to register the
22    unwind info for an object or translation unit, respectively.  */
23
24 extern void __register_frame (void *);
25
26 /* Called from crtend.o to deregister the unwind info for an object.  */
27
28 extern void __deregister_frame (void *);
29
30 /* Called from __throw to find the registers to restore for a given
31    PC_TARGET.  The caller should allocate a local variable of `struct
32    frame_state' (declared in frame.h) and pass its address to STATE_IN.
33    Returns NULL on failure, otherwise returns STATE_IN.  */
34
35 extern struct frame_state *__frame_state_for (void *, struct frame_state *);