1 /* 2 * Copyright 2000 Sun Microsystems, Inc. All Rights Reserved. 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 * 5 * This code is free software; you can redistribute it and/or modify it 6 * under the terms of the GNU General Public License version 2 only, as 7 * published by the Free Software Foundation. 8 * 9 * This code is distributed in the hope that it will be useful, but WITHOUT 10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 12 * version 2 for more details (a copy is included in the LICENSE file that 13 * accompanied this code). 14 * 15 * You should have received a copy of the GNU General Public License version 16 * 2 along with this work; if not, write to the Free Software Foundation, 17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 18 * 19 * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, 20 * CA 95054 USA or visit www.sun.com if you need additional information or 21 * have any questions. 22 * 23 */ 24 25 package sun.jvm.hotspot.debugger.win32.coff; 26 27 /** Constants providing information about the section number, type 28 representation, and storage class of symbols. (Some of the 29 descriptions are taken directly from Microsoft's documentation and 30 are copyrighted by Microsoft.) */ 31 32 public interface COFFSymbolConstants { 33 // 34 // Section Number Values 35 // 36 37 /** Symbol record is not yet assigned a section. If the value is 0 38 this indicates a references to an external symbol defined 39 elsewhere. If the value is non-zero this is a common symbol with 40 a size specified by the value. */ 41 public static final short IMAGE_SYM_UNDEFINED = (short) 0; 42 /** The symbol has an absolute (non-relocatable) value and is not an 43 address. */ 44 public static final short IMAGE_SYM_ABSOLUTE = (short) -1; 45 /** The symbol provides general type or debugging information but 46 does not correspond to a section. Microsoft tools use this 47 setting along with .file records (storage class FILE). */ 48 public static final short IMAGE_SYM_DEBUG = (short) -2; 49 50 // 51 // Type Representation 52 // 53 54 /** No type information or unknown base type. Microsoft tools use 55 this setting. */ 56 public static final short IMAGE_SYM_TYPE_NULL = (short) 0; 57 /** No valid type; used with void pointers and functions. */ 58 public static final short IMAGE_SYM_TYPE_VOID = (short) 1; 59 /** Character (signed byte). */ 60 public static final short IMAGE_SYM_TYPE_CHAR = (short) 2; 61 /** Two-byte signed integer. */ 62 public static final short IMAGE_SYM_TYPE_SHORT = (short) 3; 63 /** Natural integer type (normally four bytes in Windows NT). */ 64 public static final short IMAGE_SYM_TYPE_INT = (short) 4; 65 /** Four-byte signed integer. */ 66 public static final short IMAGE_SYM_TYPE_LONG = (short) 5; 67 /** Four-byte floating-point number. */ 68 public static final short IMAGE_SYM_TYPE_FLOAT = (short) 6; 69 /** Eight-byte floating-point number. */ 70 public static final short IMAGE_SYM_TYPE_DOUBLE = (short) 7; 71 /** Structure. */ 72 public static final short IMAGE_SYM_TYPE_STRUCT = (short) 8; 73 /** Union. */ 74 public static final short IMAGE_SYM_TYPE_UNION = (short) 9; 75 /** Enumerated type. */ 76 public static final short IMAGE_SYM_TYPE_ENUM = (short) 10; 77 /** Member of enumeration (a specific value). */ 78 public static final short IMAGE_SYM_TYPE_MOE = (short) 11; 79 /** Byte; unsigned one-byte integer. */ 80 public static final short IMAGE_SYM_TYPE_BYTE = (short) 12; 81 /** Word; unsigned two-byte integer. */ 82 public static final short IMAGE_SYM_TYPE_WORD = (short) 13; 83 /** Unsigned integer of natural size (normally, four bytes). */ 84 public static final short IMAGE_SYM_TYPE_UINT = (short) 14; 85 /** Unsigned four-byte integer. */ 86 public static final short IMAGE_SYM_TYPE_DWORD = (short) 15; 87 88 /** No derived type; the symbol is a simple scalar variable. */ 89 public static final short IMAGE_SYM_DTYPE_NULL = (short) 0; 90 /** Pointer to base type. */ 91 public static final short IMAGE_SYM_DTYPE_POINTER = (short) 1; 92 /** Function returning base type. */ 93 public static final short IMAGE_SYM_DTYPE_FUNCTION = (short) 2; 94 /** Array of base type. */ 95 public static final short IMAGE_SYM_DTYPE_ARRAY = (short) 3; 96 97 // 98 // Storage Class 99 // 100 101 /** (0xFF) Special symbol representing end of function, for 102 debugging purposes. */ 103 public static final byte IMAGE_SYM_CLASS_END_OF_FUNCTION = (byte) -1; 104 /** No storage class assigned. */ 105 public static final byte IMAGE_SYM_CLASS_NULL = (byte) 0; 106 /** Automatic (stack) variable. The Value field specifies stack 107 frame offset. */ 108 public static final byte IMAGE_SYM_CLASS_AUTOMATIC = (byte) 1; 109 /** Used by Microsoft tools for external symbols. The Value field 110 indicates the size if the section number is IMAGE_SYM_UNDEFINED 111 (0). If the section number is not 0, then the Value field 112 specifies the offset within the section. */ 113 public static final byte IMAGE_SYM_CLASS_EXTERNAL = 2; 114 /** The Value field specifies the offset of the symbol within the 115 section. If the Value is 0, then the symbol represents a section 116 name. */ 117 public static final byte IMAGE_SYM_CLASS_STATIC = (byte) 3; 118 /** Register variable. The Value field specifies register number. */ 119 public static final byte IMAGE_SYM_CLASS_REGISTER = (byte) 4; 120 /** Symbol is defined externally. */ 121 public static final byte IMAGE_SYM_CLASS_EXTERNAL_DEF = (byte) 5; 122 /** Code label defined within the module. The Value field specifies 123 the offset of the symbol within the section. */ 124 public static final byte IMAGE_SYM_CLASS_LABEL = (byte) 6; 125 /** Reference to a code label not defined. */ 126 public static final byte IMAGE_SYM_CLASS_UNDEFINED_LABEL = (byte) 7; 127 /** Structure member. The Value field specifies nth member. */ 128 public static final byte IMAGE_SYM_CLASS_MEMBER_OF_STRUCT = (byte) 8; 129 /** Formal argument (parameter) of a function. The Value field 130 specifies nth argument. */ 131 public static final byte IMAGE_SYM_CLASS_ARGUMENT = (byte) 9; 132 /** Structure tag-name entry. */ 133 public static final byte IMAGE_SYM_CLASS_STRUCT_TAG = (byte) 10; 134 /** Union member. The Value field specifies nth member. */ 135 public static final byte IMAGE_SYM_CLASS_MEMBER_OF_UNION = (byte) 11; 136 /** Union tag-name entry. */ 137 public static final byte IMAGE_SYM_CLASS_UNION_TAG = (byte) 12; 138 /** Typedef entry. */ 139 public static final byte IMAGE_SYM_CLASS_TYPE_DEFINITION = (byte) 13; 140 /** Static data declaration. */ 141 public static final byte IMAGE_SYM_CLASS_UNDEFINED_STATIC = (byte) 14; 142 /** Enumerated type tagname entry. */ 143 public static final byte IMAGE_SYM_CLASS_ENUM_TAG = (byte) 15; 144 /** Member of enumeration. Value specifies nth member. */ 145 public static final byte IMAGE_SYM_CLASS_MEMBER_OF_ENUM = (byte) 16; 146 /** Register parameter. */ 147 public static final byte IMAGE_SYM_CLASS_REGISTER_PARAM = (byte) 17; 148 /** Bit-field reference. Value specifies nth bit in the bit field. */ 149 public static final byte IMAGE_SYM_CLASS_BIT_FIELD = (byte) 18; 150 /** A .bb (beginning of block) or .eb (end of block) record. Value 151 is the relocatable address of the code location. */ 152 public static final byte IMAGE_SYM_CLASS_BLOCK = (byte) 100; 153 /** Used by Microsoft tools for symbol records that define the 154 extent of a function: begin function (named .bf), end function 155 (.ef), and lines in function (.lf). For .lf records, Value gives 156 the number of source lines in the function. For .ef records, 157 Value gives the size of function code. */ 158 public static final byte IMAGE_SYM_CLASS_FUNCTION = (byte) 101; 159 /** End of structure entry. */ 160 public static final byte IMAGE_SYM_CLASS_END_OF_STRUCT = (byte) 102; 161 /** Used by Microsoft tools, as well as traditional COFF format, for 162 the source-file symbol record. The symbol is followed by 163 auxiliary records that name the file. */ 164 public static final byte IMAGE_SYM_CLASS_FILE = (byte) 103; 165 /** Definition of a section (Microsoft tools use STATIC storage 166 class instead). */ 167 public static final byte IMAGE_SYM_CLASS_SECTION = (byte) 104; 168 /** Weak external. */ 169 public static final byte IMAGE_SYM_CLASS_WEAK_EXTERNAL = (byte) 105; 170 }