8322 nl: misleading-indentation
[unleashed/tickless.git] / usr / src / tools / ctf / dwarf / common / pro_frame.h
blobdf60d369ed2ab61f2038ca7571928389d2f22790
1 /*
3 Copyright (C) 2000,2004 Silicon Graphics, Inc. All Rights Reserved.
5 This program is free software; you can redistribute it and/or modify it
6 under the terms of version 2.1 of the GNU Lesser General Public License
7 as published by the Free Software Foundation.
9 This program is distributed in the hope that it would be useful, but
10 WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
13 Further, this software is distributed without any warranty that it is
14 free of the rightful claim of any third person regarding infringement
15 or the like. Any license provided herein, whether implied or
16 otherwise, applies only to this software file. Patent licenses, if
17 any, provided herein do not apply to combinations of this program with
18 other software, or any other product whatsoever.
20 You should have received a copy of the GNU Lesser General Public
21 License along with this program; if not, write the Free Software
22 Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston MA 02110-1301,
23 USA.
25 Contact information: Silicon Graphics, Inc., 1500 Crittenden Lane,
26 Mountain View, CA 94043, or:
28 http://www.sgi.com
30 For further information regarding this notice, see:
32 http://oss.sgi.com/projects/GenInfo/NoticeExplan
39 Largest register value that can be coded into
40 the opcode since there are only 6 bits in the
41 register field.
43 #define MAX_6_BIT_VALUE 0x3f
46 This struct holds debug_frame instructions
48 typedef struct Dwarf_P_Frame_Pgm_s *Dwarf_P_Frame_Pgm;
50 struct Dwarf_P_Frame_Pgm_s {
51 Dwarf_Ubyte dfp_opcode; /* opcode - includes reg # */
52 char *dfp_args; /* operands */
53 int dfp_nbytes; /* number of bytes in args */
54 #if 0
55 Dwarf_Unsigned dfp_sym_index; /* 0 unless reloc needed */
56 #endif
57 Dwarf_P_Frame_Pgm dfp_next;
62 This struct has cie related information. Used to gather data
63 from user program, and later to transform to disk form
65 struct Dwarf_P_Cie_s {
66 Dwarf_Ubyte cie_version;
67 char *cie_aug; /* augmentation */
68 Dwarf_Ubyte cie_code_align; /* alignment of code */
69 Dwarf_Sbyte cie_data_align;
70 Dwarf_Ubyte cie_ret_reg; /* return register # */
71 char *cie_inst; /* initial instruction */
72 long cie_inst_bytes;
73 /* no of init_inst */
74 Dwarf_P_Cie cie_next;
78 /* producer fields */
79 struct Dwarf_P_Fde_s {
80 Dwarf_Unsigned fde_unused1;
82 /* function/subr die for this fde */
83 Dwarf_P_Die fde_die;
85 /* index to asso. cie */
86 Dwarf_Word fde_cie;
88 /* Address of first location of the code this frame applies to If
89 fde_end_symbol non-zero, this represents the offset from the
90 symbol indicated by fde_r_symidx */
91 Dwarf_Addr fde_initloc;
93 /* Relocation symbol for address of the code this frame applies to.
95 Dwarf_Unsigned fde_r_symidx;
97 /* Bytes of instr for this fde, if known */
98 Dwarf_Unsigned fde_addr_range;
100 /* linked list of instructions we will put in fde. */
101 Dwarf_P_Frame_Pgm fde_inst;
103 /* number of instructions in fde */
104 long fde_n_inst;
106 /* number of bytes of inst in fde */
107 long fde_n_bytes;
109 /* offset into exception table for this function. */
110 Dwarf_Signed fde_offset_into_exception_tables;
112 /* The symbol for the exception table elf section. */
113 Dwarf_Unsigned fde_exception_table_symbol;
115 /* pointer to last inst */
116 Dwarf_P_Frame_Pgm fde_last_inst;
118 Dwarf_P_Fde fde_next;
120 /* The symbol and offset of the end symbol. When fde_end_symbol is
121 non-zero we must represent the */
122 Dwarf_Addr fde_end_symbol_offset;
123 Dwarf_Unsigned fde_end_symbol;
125 int fde_uwordb_size;
126 Dwarf_P_Debug fde_dbg;
128 /* If fde_block is non-null, then it is the set of instructions.
129 so we should use it rather than fde_inst. */
130 Dwarf_Unsigned fde_inst_block_size;
131 void *fde_block;