0
|
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 /** Models the information stored in the Windows-specific fields
|
|
28 portion of the optional header of a Portable Executable file.
|
|
29 (Some of the descriptions are taken directly from Microsoft's
|
|
30 documentation and are copyrighted by Microsoft.) */
|
|
31
|
|
32 public interface OptionalHeaderWindowsSpecificFields {
|
|
33 /** Preferred address of first byte of image when loaded into
|
|
34 memory; must be a multiple of 64K. The default for DLLs is
|
|
35 0x10000000. The default for Windows CE EXEs is 0x00010000. The
|
|
36 default for Windows NT, Windows 95, and Windows 98 is
|
|
37 0x00400000. */
|
|
38 public long getImageBase();
|
|
39
|
|
40 /** Alignment (in bytes) of sections when loaded into memory. Must
|
|
41 be greater or equal to File Alignment. Default is the page size
|
|
42 for the architecture. */
|
|
43 public int getSectionAlignment();
|
|
44
|
|
45 /** Alignment factor (in bytes) used to align the raw data of
|
|
46 sections in the image file. The value should be a power of 2
|
|
47 between 512 and 64K inclusive. The default is 512. If the
|
|
48 SectionAlignment is less than the architecture's page size than
|
|
49 this must match the SectionAlignment. */
|
|
50 public int getFileAlignment();
|
|
51
|
|
52 /** Major version number of required OS. */
|
|
53 public short getMajorOperatingSystemVersion();
|
|
54
|
|
55 /** Minor version number of required OS. */
|
|
56 public short getMinorOperatingSystemVersion();
|
|
57
|
|
58 /** Major version number of image. */
|
|
59 public short getMajorImageVersion();
|
|
60
|
|
61 /** Minor version number of image. */
|
|
62 public short getMinorImageVersion();
|
|
63
|
|
64 /** Major version number of subsystem. */
|
|
65 public short getMajorSubsystemVersion();
|
|
66
|
|
67 /** Minor version number of subsystem. */
|
|
68 public short getMinorSubsystemVersion();
|
|
69
|
|
70 /** Size, in bytes, of image, including all headers; must be a
|
|
71 multiple of Section Alignment. */
|
|
72 public int getSizeOfImage();
|
|
73
|
|
74 /** Combined size of MS-DOS stub, PE Header, and section headers
|
|
75 rounded up to a multiple of FileAlignment. */
|
|
76 public int getSizeOfHeaders();
|
|
77
|
|
78 /** Image file checksum. The algorithm for computing is incorporated
|
|
79 into IMAGHELP.DLL. The following are checked for validation at
|
|
80 load time: all drivers, any DLL loaded at boot time, and any DLL
|
|
81 that ends up in the server. */
|
|
82 public int getCheckSum();
|
|
83
|
|
84 /** Subsystem required to run this image; returns one of the
|
|
85 constants defined in {@link
|
|
86 sun.jvm.hotspot.debugger.win32.coff.WindowsNTSubsystem}. */
|
|
87 public short getSubsystem();
|
|
88
|
|
89 /** Indicates characteristics of a DLL; see {@link
|
|
90 sun.jvm.hotspot.debugger.win32.coff.DLLCharacteristics}. */
|
|
91 public short getDLLCharacteristics();
|
|
92
|
|
93 /** Size of stack to reserve. Only the Stack Commit Size is
|
|
94 committed; the rest is made available one page at a time, until
|
|
95 reserve size is reached. */
|
|
96 public long getSizeOfStackReserve();
|
|
97
|
|
98 /** Size of stack to commit. */
|
|
99 public long getSizeOfStackCommit();
|
|
100
|
|
101 /** Size of local heap space to reserve. Only the Heap Commit Size
|
|
102 is committed; the rest is made available one page at a time,
|
|
103 until reserve size is reached. */
|
|
104 public long getSizeOfHeapReserve();
|
|
105
|
|
106 /** Size of local heap space to commit. */
|
|
107 public long getSizeOfHeapCommit();
|
|
108
|
|
109 /** Obsolete. */
|
|
110 public int getLoaderFlags();
|
|
111
|
|
112 /** Number of data-dictionary entries in the remainder of the
|
|
113 Optional Header. Each describes a location and size. */
|
|
114 public int getNumberOfRvaAndSizes();
|
|
115 }
|