1169689Skan/* DWARF2 frame unwind data structure. 2169689Skan Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003 3169689Skan Free Software Foundation, Inc. 4169689Skan 5169689Skan This file is part of GCC. 6169689Skan 7169689Skan GCC is free software; you can redistribute it and/or modify it 8169689Skan under the terms of the GNU General Public License as published by 9169689Skan the Free Software Foundation; either version 2, or (at your option) 10169689Skan any later version. 11169689Skan 12169689Skan In addition to the permissions in the GNU General Public License, the 13169689Skan Free Software Foundation gives you unlimited permission to link the 14169689Skan compiled version of this file into combinations with other programs, 15169689Skan and to distribute those combinations without any restriction coming 16169689Skan from the use of this file. (The General Public License restrictions 17169689Skan do apply in other respects; for example, they cover modification of 18169689Skan the file, and distribution when not linked into a combined 19169689Skan executable.) 20169689Skan 21169689Skan GCC is distributed in the hope that it will be useful, but WITHOUT 22169689Skan ANY WARRANTY; without even the implied warranty of MERCHANTABILITY 23169689Skan or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public 24169689Skan License for more details. 25169689Skan 26169689Skan You should have received a copy of the GNU General Public License 27169689Skan along with GCC; see the file COPYING. If not, write to the Free 28169689Skan Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 29169689Skan 02110-1301, USA. */ 30169689Skan 31169689Skan/* A target can override (perhaps for backward compatibility) how 32169689Skan many dwarf2 columns are unwound. */ 33169689Skan#ifndef DWARF_FRAME_REGISTERS 34169689Skan#define DWARF_FRAME_REGISTERS FIRST_PSEUDO_REGISTER 35169689Skan#endif 36169689Skan 37169689Skan/* The result of interpreting the frame unwind info for a frame. 38169689Skan This is all symbolic at this point, as none of the values can 39169689Skan be resolved until the target pc is located. */ 40169689Skantypedef struct 41169689Skan{ 42169689Skan /* Each register save state can be described in terms of a CFA slot, 43169689Skan another register, or a location expression. */ 44169689Skan struct frame_state_reg_info 45169689Skan { 46169689Skan struct { 47169689Skan union { 48169689Skan _Unwind_Word reg; 49169689Skan _Unwind_Sword offset; 50169689Skan const unsigned char *exp; 51169689Skan } loc; 52169689Skan enum { 53169689Skan REG_UNSAVED, 54169689Skan REG_SAVED_OFFSET, 55169689Skan REG_SAVED_REG, 56169689Skan REG_SAVED_EXP, 57169689Skan REG_SAVED_VAL_OFFSET, 58169689Skan REG_SAVED_VAL_EXP 59169689Skan } how; 60169689Skan } reg[DWARF_FRAME_REGISTERS+1]; 61169689Skan 62169689Skan /* Used to implement DW_CFA_remember_state. */ 63169689Skan struct frame_state_reg_info *prev; 64169689Skan } regs; 65169689Skan 66169689Skan /* The CFA can be described in terms of a reg+offset or a 67169689Skan location expression. */ 68169689Skan _Unwind_Sword cfa_offset; 69169689Skan _Unwind_Word cfa_reg; 70169689Skan const unsigned char *cfa_exp; 71169689Skan enum { 72169689Skan CFA_UNSET, 73169689Skan CFA_REG_OFFSET, 74169689Skan CFA_EXP 75169689Skan } cfa_how; 76169689Skan 77169689Skan /* The PC described by the current frame state. */ 78169689Skan void *pc; 79169689Skan 80169689Skan /* The information we care about from the CIE/FDE. */ 81169689Skan _Unwind_Personality_Fn personality; 82169689Skan _Unwind_Sword data_align; 83169689Skan _Unwind_Word code_align; 84169689Skan _Unwind_Word retaddr_column; 85169689Skan unsigned char fde_encoding; 86169689Skan unsigned char lsda_encoding; 87169689Skan unsigned char saw_z; 88169689Skan unsigned char signal_frame; 89169689Skan void *eh_ptr; 90169689Skan} _Unwind_FrameState; 91169689Skan 92