annotate agent/src/share/classes/sun/jvm/hotspot/debugger/win32/coff/SectionHeader.java @ 1913:3b2dea75431e

6984311: JSR 292 needs optional bootstrap method parameters Summary: Allow CONSTANT_InvokeDynamic nodes to have any number of extra operands. Reviewed-by: twisti
author jrose
date Sat, 30 Oct 2010 13:08:23 -0700
parents c18cbe5936b8
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
a61af66fc99e Initial load
duke
parents:
diff changeset
1 /*
1552
c18cbe5936b8 6941466: Oracle rebranding changes for Hotspot repositories
trims
parents: 0
diff changeset
2 * Copyright (c) 2000, Oracle and/or its affiliates. All rights reserved.
0
a61af66fc99e Initial load
duke
parents:
diff changeset
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
a61af66fc99e Initial load
duke
parents:
diff changeset
4 *
a61af66fc99e Initial load
duke
parents:
diff changeset
5 * This code is free software; you can redistribute it and/or modify it
a61af66fc99e Initial load
duke
parents:
diff changeset
6 * under the terms of the GNU General Public License version 2 only, as
a61af66fc99e Initial load
duke
parents:
diff changeset
7 * published by the Free Software Foundation.
a61af66fc99e Initial load
duke
parents:
diff changeset
8 *
a61af66fc99e Initial load
duke
parents:
diff changeset
9 * This code is distributed in the hope that it will be useful, but WITHOUT
a61af66fc99e Initial load
duke
parents:
diff changeset
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
a61af66fc99e Initial load
duke
parents:
diff changeset
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
a61af66fc99e Initial load
duke
parents:
diff changeset
12 * version 2 for more details (a copy is included in the LICENSE file that
a61af66fc99e Initial load
duke
parents:
diff changeset
13 * accompanied this code).
a61af66fc99e Initial load
duke
parents:
diff changeset
14 *
a61af66fc99e Initial load
duke
parents:
diff changeset
15 * You should have received a copy of the GNU General Public License version
a61af66fc99e Initial load
duke
parents:
diff changeset
16 * 2 along with this work; if not, write to the Free Software Foundation,
a61af66fc99e Initial load
duke
parents:
diff changeset
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
a61af66fc99e Initial load
duke
parents:
diff changeset
18 *
1552
c18cbe5936b8 6941466: Oracle rebranding changes for Hotspot repositories
trims
parents: 0
diff changeset
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
c18cbe5936b8 6941466: Oracle rebranding changes for Hotspot repositories
trims
parents: 0
diff changeset
20 * or visit www.oracle.com if you need additional information or have any
c18cbe5936b8 6941466: Oracle rebranding changes for Hotspot repositories
trims
parents: 0
diff changeset
21 * questions.
0
a61af66fc99e Initial load
duke
parents:
diff changeset
22 *
a61af66fc99e Initial load
duke
parents:
diff changeset
23 */
a61af66fc99e Initial load
duke
parents:
diff changeset
24
a61af66fc99e Initial load
duke
parents:
diff changeset
25 package sun.jvm.hotspot.debugger.win32.coff;
a61af66fc99e Initial load
duke
parents:
diff changeset
26
a61af66fc99e Initial load
duke
parents:
diff changeset
27 /** Describes the header of a section in a COFF file. The section
a61af66fc99e Initial load
duke
parents:
diff changeset
28 headers are grouped together into the Section Table. (Some of the
a61af66fc99e Initial load
duke
parents:
diff changeset
29 descriptions are taken directly from Microsoft's documentation and
a61af66fc99e Initial load
duke
parents:
diff changeset
30 are copyrighted by Microsoft.) */
a61af66fc99e Initial load
duke
parents:
diff changeset
31
a61af66fc99e Initial load
duke
parents:
diff changeset
32 public interface SectionHeader {
a61af66fc99e Initial load
duke
parents:
diff changeset
33 public String getName();
a61af66fc99e Initial load
duke
parents:
diff changeset
34
a61af66fc99e Initial load
duke
parents:
diff changeset
35 /** Total size of the section when loaded into memory. If this value
a61af66fc99e Initial load
duke
parents:
diff changeset
36 is greater than Size of Raw Data, the section is zero-padded.
a61af66fc99e Initial load
duke
parents:
diff changeset
37 This field is valid only for executable images and should be set
a61af66fc99e Initial load
duke
parents:
diff changeset
38 to 0 for object files. */
a61af66fc99e Initial load
duke
parents:
diff changeset
39 public int getSize();
a61af66fc99e Initial load
duke
parents:
diff changeset
40
a61af66fc99e Initial load
duke
parents:
diff changeset
41 /** For executable images this is the address of the first byte of
a61af66fc99e Initial load
duke
parents:
diff changeset
42 the section, when loaded into memory, relative to the image
a61af66fc99e Initial load
duke
parents:
diff changeset
43 base. For object files, this field is the address of the first
a61af66fc99e Initial load
duke
parents:
diff changeset
44 byte before relocation is applied; for simplicity, compilers
a61af66fc99e Initial load
duke
parents:
diff changeset
45 should set this to zero. Otherwise, it is an arbitrary value
a61af66fc99e Initial load
duke
parents:
diff changeset
46 that is subtracted from offsets during relocation. */
a61af66fc99e Initial load
duke
parents:
diff changeset
47 public int getVirtualAddress();
a61af66fc99e Initial load
duke
parents:
diff changeset
48
a61af66fc99e Initial load
duke
parents:
diff changeset
49 /** Size of the section (object file) or size of the initialized
a61af66fc99e Initial load
duke
parents:
diff changeset
50 data on disk (image files). For executable image, this must be a
a61af66fc99e Initial load
duke
parents:
diff changeset
51 multiple of FileAlignment from the optional header. If this is
a61af66fc99e Initial load
duke
parents:
diff changeset
52 less than VirtualSize the remainder of the section is zero
a61af66fc99e Initial load
duke
parents:
diff changeset
53 filled. Because this field is rounded while the VirtualSize
a61af66fc99e Initial load
duke
parents:
diff changeset
54 field is not it is possible for this to be greater than
a61af66fc99e Initial load
duke
parents:
diff changeset
55 VirtualSize as well. When a section contains only uninitialized
a61af66fc99e Initial load
duke
parents:
diff changeset
56 data, this field should be 0. */
a61af66fc99e Initial load
duke
parents:
diff changeset
57 public int getSizeOfRawData();
a61af66fc99e Initial load
duke
parents:
diff changeset
58
a61af66fc99e Initial load
duke
parents:
diff changeset
59 /** File pointer to section's first page within the COFF file. For
a61af66fc99e Initial load
duke
parents:
diff changeset
60 executable images, this must be a multiple of FileAlignment from
a61af66fc99e Initial load
duke
parents:
diff changeset
61 the optional header. For object files, the value should be
a61af66fc99e Initial load
duke
parents:
diff changeset
62 aligned on a four-byte boundary for best performance. When a
a61af66fc99e Initial load
duke
parents:
diff changeset
63 section contains only uninitialized data, this field should be
a61af66fc99e Initial load
duke
parents:
diff changeset
64 0. */
a61af66fc99e Initial load
duke
parents:
diff changeset
65 public int getPointerToRawData();
a61af66fc99e Initial load
duke
parents:
diff changeset
66
a61af66fc99e Initial load
duke
parents:
diff changeset
67 /** File pointer to beginning of relocation entries for the section.
a61af66fc99e Initial load
duke
parents:
diff changeset
68 Set to 0 for executable images or if there are no
a61af66fc99e Initial load
duke
parents:
diff changeset
69 relocations. */
a61af66fc99e Initial load
duke
parents:
diff changeset
70 public int getPointerToRelocations();
a61af66fc99e Initial load
duke
parents:
diff changeset
71
a61af66fc99e Initial load
duke
parents:
diff changeset
72 /** File pointer to beginning of line-number entries for the
a61af66fc99e Initial load
duke
parents:
diff changeset
73 section. Set to 0 if there are no COFF line numbers. */
a61af66fc99e Initial load
duke
parents:
diff changeset
74 public int getPointerToLineNumbers();
a61af66fc99e Initial load
duke
parents:
diff changeset
75
a61af66fc99e Initial load
duke
parents:
diff changeset
76 /** Number of relocation entries for the section. Set to 0 for
a61af66fc99e Initial load
duke
parents:
diff changeset
77 executable images. */
a61af66fc99e Initial load
duke
parents:
diff changeset
78 public short getNumberOfRelocations();
a61af66fc99e Initial load
duke
parents:
diff changeset
79
a61af66fc99e Initial load
duke
parents:
diff changeset
80 /** Number of line-number entries for the section. */
a61af66fc99e Initial load
duke
parents:
diff changeset
81 public short getNumberOfLineNumbers();
a61af66fc99e Initial load
duke
parents:
diff changeset
82
a61af66fc99e Initial load
duke
parents:
diff changeset
83 /** Flags describing section's characteristics; see {@link
a61af66fc99e Initial load
duke
parents:
diff changeset
84 sun.jvm.hotspot.debugger.win32.coff.SectionFlags}. */
a61af66fc99e Initial load
duke
parents:
diff changeset
85 public int getSectionFlags();
a61af66fc99e Initial load
duke
parents:
diff changeset
86
a61af66fc99e Initial load
duke
parents:
diff changeset
87 /** Returns true if the appropriate flag (from {@link
a61af66fc99e Initial load
duke
parents:
diff changeset
88 sun.jvm.hotspot.debugger.win32.coff.SectionFlags}) is set. */
a61af66fc99e Initial load
duke
parents:
diff changeset
89 public boolean hasSectionFlag(int flag);
a61af66fc99e Initial load
duke
parents:
diff changeset
90
a61af66fc99e Initial load
duke
parents:
diff changeset
91 /** This is only present for object files. Retrieves the COFF
a61af66fc99e Initial load
duke
parents:
diff changeset
92 relocation at the given index; valid indices are numbered
a61af66fc99e Initial load
duke
parents:
diff changeset
93 0...getNumberOfRelocations() - 1. */
a61af66fc99e Initial load
duke
parents:
diff changeset
94 public COFFRelocation getCOFFRelocation(int index);
a61af66fc99e Initial load
duke
parents:
diff changeset
95
a61af66fc99e Initial load
duke
parents:
diff changeset
96 /** Retrieves the COFF line number at the given index; valid indices
a61af66fc99e Initial load
duke
parents:
diff changeset
97 are numbered 0...getNumberOfLineNumbers() - 1. */
a61af66fc99e Initial load
duke
parents:
diff changeset
98 public COFFLineNumber getCOFFLineNumber(int index);
a61af66fc99e Initial load
duke
parents:
diff changeset
99 }