annotate libgcc/unwind-dw2.h @ 145:1830386684a0

gcc-9.2.0
author anatofuz
date Thu, 13 Feb 2020 11:34:05 +0900
parents 84e7813d76e9
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
111
kono
parents:
diff changeset
1 /* DWARF2 frame unwind data structure.
145
1830386684a0 gcc-9.2.0
anatofuz
parents: 131
diff changeset
2 Copyright (C) 1997-2020 Free Software Foundation, Inc.
111
kono
parents:
diff changeset
3
kono
parents:
diff changeset
4 This file is part of GCC.
kono
parents:
diff changeset
5
kono
parents:
diff changeset
6 GCC is free software; you can redistribute it and/or modify it
kono
parents:
diff changeset
7 under the terms of the GNU General Public License as published by
kono
parents:
diff changeset
8 the Free Software Foundation; either version 3, or (at your option)
kono
parents:
diff changeset
9 any later version.
kono
parents:
diff changeset
10
kono
parents:
diff changeset
11 GCC is distributed in the hope that it will be useful, but WITHOUT
kono
parents:
diff changeset
12 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
kono
parents:
diff changeset
13 or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
kono
parents:
diff changeset
14 License for more details.
kono
parents:
diff changeset
15
kono
parents:
diff changeset
16 Under Section 7 of GPL version 3, you are granted additional
kono
parents:
diff changeset
17 permissions described in the GCC Runtime Library Exception, version
kono
parents:
diff changeset
18 3.1, as published by the Free Software Foundation.
kono
parents:
diff changeset
19
kono
parents:
diff changeset
20 You should have received a copy of the GNU General Public License and
kono
parents:
diff changeset
21 a copy of the GCC Runtime Library Exception along with this program;
kono
parents:
diff changeset
22 see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
kono
parents:
diff changeset
23 <http://www.gnu.org/licenses/>. */
kono
parents:
diff changeset
24
kono
parents:
diff changeset
25 /* The result of interpreting the frame unwind info for a frame.
kono
parents:
diff changeset
26 This is all symbolic at this point, as none of the values can
kono
parents:
diff changeset
27 be resolved until the target pc is located. */
kono
parents:
diff changeset
28 typedef struct
kono
parents:
diff changeset
29 {
kono
parents:
diff changeset
30 /* Each register save state can be described in terms of a CFA slot,
kono
parents:
diff changeset
31 another register, or a location expression. */
kono
parents:
diff changeset
32 struct frame_state_reg_info
kono
parents:
diff changeset
33 {
kono
parents:
diff changeset
34 struct {
kono
parents:
diff changeset
35 union {
kono
parents:
diff changeset
36 _Unwind_Word reg;
kono
parents:
diff changeset
37 _Unwind_Sword offset;
kono
parents:
diff changeset
38 const unsigned char *exp;
kono
parents:
diff changeset
39 } loc;
kono
parents:
diff changeset
40 enum {
kono
parents:
diff changeset
41 REG_UNSAVED,
kono
parents:
diff changeset
42 REG_SAVED_OFFSET,
kono
parents:
diff changeset
43 REG_SAVED_REG,
kono
parents:
diff changeset
44 REG_SAVED_EXP,
kono
parents:
diff changeset
45 REG_SAVED_VAL_OFFSET,
kono
parents:
diff changeset
46 REG_SAVED_VAL_EXP,
kono
parents:
diff changeset
47 REG_UNDEFINED
kono
parents:
diff changeset
48 } how;
kono
parents:
diff changeset
49 } reg[__LIBGCC_DWARF_FRAME_REGISTERS__+1];
kono
parents:
diff changeset
50
kono
parents:
diff changeset
51 /* Used to implement DW_CFA_remember_state. */
kono
parents:
diff changeset
52 struct frame_state_reg_info *prev;
kono
parents:
diff changeset
53
kono
parents:
diff changeset
54 /* The CFA can be described in terms of a reg+offset or a
kono
parents:
diff changeset
55 location expression. */
kono
parents:
diff changeset
56 _Unwind_Sword cfa_offset;
kono
parents:
diff changeset
57 _Unwind_Word cfa_reg;
kono
parents:
diff changeset
58 const unsigned char *cfa_exp;
kono
parents:
diff changeset
59 enum {
kono
parents:
diff changeset
60 CFA_UNSET,
kono
parents:
diff changeset
61 CFA_REG_OFFSET,
kono
parents:
diff changeset
62 CFA_EXP
kono
parents:
diff changeset
63 } cfa_how;
kono
parents:
diff changeset
64 } regs;
kono
parents:
diff changeset
65
kono
parents:
diff changeset
66 /* The PC described by the current frame state. */
kono
parents:
diff changeset
67 void *pc;
kono
parents:
diff changeset
68
kono
parents:
diff changeset
69 /* The information we care about from the CIE/FDE. */
kono
parents:
diff changeset
70 _Unwind_Personality_Fn personality;
kono
parents:
diff changeset
71 _Unwind_Sword data_align;
kono
parents:
diff changeset
72 _Unwind_Word code_align;
kono
parents:
diff changeset
73 _Unwind_Word retaddr_column;
kono
parents:
diff changeset
74 unsigned char fde_encoding;
kono
parents:
diff changeset
75 unsigned char lsda_encoding;
kono
parents:
diff changeset
76 unsigned char saw_z;
kono
parents:
diff changeset
77 unsigned char signal_frame;
kono
parents:
diff changeset
78 void *eh_ptr;
kono
parents:
diff changeset
79 } _Unwind_FrameState;
kono
parents:
diff changeset
80