PR testsuite/32076
[official-gcc.git] / gcc / unwind-dw2.h
blobdb3a1ab222ca14c47b102b627e120f009f14b151
1 /* DWARF2 frame unwind data structure.
2 Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003
3 Free Software Foundation, Inc.
5 This file is part of GCC.
7 GCC is free software; you can redistribute it and/or modify it
8 under the terms of the GNU General Public License as published by
9 the Free Software Foundation; either version 2, or (at your option)
10 any later version.
12 In addition to the permissions in the GNU General Public License, the
13 Free Software Foundation gives you unlimited permission to link the
14 compiled version of this file into combinations with other programs,
15 and to distribute those combinations without any restriction coming
16 from the use of this file. (The General Public License restrictions
17 do apply in other respects; for example, they cover modification of
18 the file, and distribution when not linked into a combined
19 executable.)
21 GCC is distributed in the hope that it will be useful, but WITHOUT
22 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
23 or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
24 License for more details.
26 You should have received a copy of the GNU General Public License
27 along with GCC; see the file COPYING. If not, write to the Free
28 Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA
29 02110-1301, USA. */
31 /* A target can override (perhaps for backward compatibility) how
32 many dwarf2 columns are unwound. */
33 #ifndef DWARF_FRAME_REGISTERS
34 #define DWARF_FRAME_REGISTERS FIRST_PSEUDO_REGISTER
35 #endif
37 /* The result of interpreting the frame unwind info for a frame.
38 This is all symbolic at this point, as none of the values can
39 be resolved until the target pc is located. */
40 typedef struct
42 /* Each register save state can be described in terms of a CFA slot,
43 another register, or a location expression. */
44 struct frame_state_reg_info
46 struct {
47 union {
48 _Unwind_Word reg;
49 _Unwind_Sword offset;
50 const unsigned char *exp;
51 } loc;
52 enum {
53 REG_UNSAVED,
54 REG_SAVED_OFFSET,
55 REG_SAVED_REG,
56 REG_SAVED_EXP,
57 REG_SAVED_VAL_OFFSET,
58 REG_SAVED_VAL_EXP
59 } how;
60 } reg[DWARF_FRAME_REGISTERS+1];
62 /* Used to implement DW_CFA_remember_state. */
63 struct frame_state_reg_info *prev;
65 /* The CFA can be described in terms of a reg+offset or a
66 location expression. */
67 _Unwind_Sword cfa_offset;
68 _Unwind_Word cfa_reg;
69 const unsigned char *cfa_exp;
70 enum {
71 CFA_UNSET,
72 CFA_REG_OFFSET,
73 CFA_EXP
74 } cfa_how;
75 } regs;
77 /* The PC described by the current frame state. */
78 void *pc;
80 /* The information we care about from the CIE/FDE. */
81 _Unwind_Personality_Fn personality;
82 _Unwind_Sword data_align;
83 _Unwind_Word code_align;
84 _Unwind_Word retaddr_column;
85 unsigned char fde_encoding;
86 unsigned char lsda_encoding;
87 unsigned char saw_z;
88 unsigned char signal_frame;
89 void *eh_ptr;
90 } _Unwind_FrameState;