PR c++/25369
[official-gcc.git] / gcc / unwind-dw2.h
blobe894dd913dce52739e21042f0a82d6281c42eb17
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 } how;
58 } reg[DWARF_FRAME_REGISTERS+1];
60 /* Used to implement DW_CFA_remember_state. */
61 struct frame_state_reg_info *prev;
62 } regs;
64 /* The CFA can be described in terms of a reg+offset or a
65 location expression. */
66 _Unwind_Sword cfa_offset;
67 _Unwind_Word cfa_reg;
68 const unsigned char *cfa_exp;
69 enum {
70 CFA_UNSET,
71 CFA_REG_OFFSET,
72 CFA_EXP
73 } cfa_how;
75 /* The PC described by the current frame state. */
76 void *pc;
78 /* The information we care about from the CIE/FDE. */
79 _Unwind_Personality_Fn personality;
80 _Unwind_Sword data_align;
81 _Unwind_Word code_align;
82 _Unwind_Word retaddr_column;
83 unsigned char fde_encoding;
84 unsigned char lsda_encoding;
85 unsigned char saw_z;
86 void *eh_ptr;
87 } _Unwind_FrameState;