1 /*
2  * Copyright (c) 2001, Oracle and/or its affiliates. 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20  * or visit www.oracle.com if you need additional information or have any
21  * questions.
22  *
23  */
24 
25 package sun.jvm.hotspot.debugger.win32.coff;
26 
27 import java.util.NoSuchElementException;
28 
29 /** <p> Provides iteration-style access to the types in the
30     sstGlobalTypes subsection of the VC++ 5.0 debug
31     information. Clients should walk down these platform-dependent
32     types and transform them into the platform-independent interfaces
33     described in the package sun.jvm.hotspot.debugger.csym. </p>
34 
35     <p> This iterator is a "two-dimensional" iterator; it iterates not
36     only over all of the types in the type table, but also iterates
37     over the leaf types in the current type string. This structure was
38     chosen to avoid constructing a new type iterator for each type in
39     the type table because of the expected large number of types. </p>
40 */
41 
42 public interface DebugVC50TypeIterator {
43   //
44   // Iteration through type table
45   //
46 
47   /** Indicates whether the iteration through the type table is
48       complete. */
done()49   public boolean done();
50 
51   /** Go to the next type in the type table. NOTE that the iterator is
52       pointing at the first type initially, so one should use a while
53       (!iter.done()) { ...  iter.next(); } construct.
54 
55       @throw NoSuchElementException if the iterator is already done
56       and next() is called. */
next()57   public void next() throws NoSuchElementException;
58 
59   /** Gets the length, in bytes, of the current type record. */
getLength()60   public short getLength();
61 
62   /** Gets the type index of the current type. This number is
63       compatible with type references in symbols and type records. */
getTypeIndex()64   public int getTypeIndex();
65 
66   /** Debugging support only */
getNumTypes()67   public int getNumTypes();
68 
69   //
70   // Iteration through type strings
71   //
72 
73   /** Indicates whether iteration through the current type string is
74       complete. */
typeStringDone()75   public boolean typeStringDone();
76 
77   /** Goes to the next element in the current type string. NOTE that
78       the iterator is pointing at the first type initially, so one
79       should use a while (!iter.typeStringDone()) { ...
80       iter.typeStringNext(); } construct.
81 
82       @throw NoSuchElementException if the iterator is already done
83       and typeStringNext() is called. */
typeStringNext()84   public void typeStringNext() throws NoSuchElementException;
85 
86   /** Return the leaf index (see {@link
87       sun.jvm.hotspot.debugger.win32.coff.DebugVC50TypeLeafIndices})
88       for the current element of the current type string. */
typeStringLeaf()89   public int typeStringLeaf();
90 
91   /** For debugging: returns the file offset of the current type
92       string leaf. */
typeStringOffset()93   public int typeStringOffset();
94 
95   //
96   // Leaf Indices Referenced from Symbols
97   //
98 
99   ///////////////////////////
100   // LF_MODIFIER accessors //
101   ///////////////////////////
102 
103   // This record is used to indicate the const,r volatile and
104   // unaligned properties for any particular type.
105 
106   /** Type index of the modified type. */
getModifierIndex()107   public int getModifierIndex();
108 
109   /** Attributes specified in MODIFIER_ enums in {@link
110       sun.jvm.hotspot.debugger.win32.coff.DebugVC50TypeEnums}. */
getModifierAttribute()111   public short getModifierAttribute();
112 
113   //////////////////////////
114   // LF_POINTER accessors //
115   //////////////////////////
116 
117   /** Type index of object pointed to. */
getPointerType()118   public int getPointerType();
119 
120   /** Pointer attributes. Consists of seven bit fields whose
121       enumerants are in {@link
122       sun.jvm.hotspot.debugger.win32.coff.DebugVC50TypeEnums}:
123       PTRTYPE, PTRMODE, ISFLAT32, VOLATILE, CONST, UNALIGNED, and
124       RESTRICT. */
getPointerAttributes()125   public int getPointerAttributes();
126 
127   /** Only valid if the pointer type is BASED_ON_TYPE; retrieves index
128       of type. */
getPointerBasedOnTypeIndex()129   public int getPointerBasedOnTypeIndex();
130 
131   /** Only valid if the pointer type is BASED_ON_TYPE; retrieves name
132       of type. */
getPointerBasedOnTypeName()133   public String getPointerBasedOnTypeName();
134 
135   /** Only valid if the pointer mode is either PTR_TO_DATA_MEMBER or
136       PTR_TO_METHOD; retrieves the type index of the containing
137       class. */
getPointerToMemberClass()138   public int getPointerToMemberClass();
139 
140   /** Only valid if the pointer mode is either PTR_TO_DATA_MEMBER or
141       PTR_TO_METHOD; retrieves the data format of the pointer in
142       memory. See the PTR_FORMAT enum in {@link
143       sun.jvm.hotspot.debugger.win32.coff.DebugVC50TypeEnums}. */
getPointerToMemberFormat()144   public short getPointerToMemberFormat();
145 
146   ////////////////////////
147   // LF_ARRAY accessors //
148   ////////////////////////
149 
150   /** Type index of each array element. */
getArrayElementType()151   public int getArrayElementType();
152 
153   /** Type index of indexing variable. */
getArrayIndexType()154   public int getArrayIndexType();
155 
156   /** Length of the array in bytes. */
getArrayLength()157   public int getArrayLength() throws DebugVC50WrongNumericTypeException;
158 
159   /** Length-prefixed name of array. */
getArrayName()160   public String getArrayName();
161 
162   /////////////////////////////////////////
163   // LF_CLASS and LF_STRUCTURE accessors //
164   /////////////////////////////////////////
165 
166   /** Number of elements in the class or structure. This count
167       includes direct, virtual, and indirect virtual bases, and
168       methods including overloads, data members, static data members,
169       friends, and so on. */
getClassCount()170   public short getClassCount();
171 
172   /** Property bit field; see PROPERTY_ enumeration in {@link
173       sun.jvm.hotspot.debugger.win32.coff.DebugVC50TypeEnums}. */
getClassProperty()174   public short getClassProperty();
175 
176   /** Type index of the field list for this class. */
getClassFieldList()177   public int getClassFieldList();
178 
179   /** Get new iterator pointing at the field list of this class. */
getClassFieldListIterator()180   public DebugVC50TypeIterator getClassFieldListIterator();
181 
182   /** Type index of the derivation list. This is output by the
183       compiler as 0x0000 and is filled in by the CVPACK utility to a
184       LF_DERIVED record containing the type indices of those classes
185       which immediately inherit the current class. A zero index
186       indicates that no derivation information is available. A LF_NULL
187       index indicates that the class is not inherited by other
188       classes. */
getClassDerivationList()189   public int getClassDerivationList();
190 
191   /** Type index of the virtual function table shape descriptor. */
getClassVShape()192   public int getClassVShape();
193 
194   /** Numeric leaf specifying size in bytes of the structure. */
getClassSize()195   public int getClassSize() throws DebugVC50WrongNumericTypeException;
196 
197   /** Length-prefixed name of this type. */
getClassName()198   public String getClassName();
199 
200   ////////////////////////
201   // LF_UNION accessors //
202   ////////////////////////
203 
204   /** Number of fields in the union. */
getUnionCount()205   public short getUnionCount();
206 
207   /** Property bit field. */
getUnionProperty()208   public short getUnionProperty();
209 
210   /** Type index of field list. */
getUnionFieldList()211   public int getUnionFieldList();
212 
213   /** Get new iterator pointing at the field list of this union. */
getUnionFieldListIterator()214   public DebugVC50TypeIterator getUnionFieldListIterator();
215 
216   /** Numeric leaf specifying size in bytes of the union. */
getUnionSize()217   public int getUnionSize() throws DebugVC50WrongNumericTypeException;
218 
219   /** Length-prefixed name of union. */
getUnionName()220   public String getUnionName();
221 
222   ///////////////////////
223   // LF_ENUM accessors //
224   ///////////////////////
225 
226   /** Number of enumerates. */
getEnumCount()227   public short getEnumCount();
228 
229   /** Property bit field. */
getEnumProperty()230   public short getEnumProperty();
231 
232   /** Index of underlying type of enum. */
getEnumType()233   public int getEnumType();
234 
235   /** Type index of field list. */
getEnumFieldList()236   public int getEnumFieldList();
237 
238   /** Get new iterator pointing at the field list of this enum. */
getEnumFieldListIterator()239   public DebugVC50TypeIterator getEnumFieldListIterator();
240 
241   /** Length-prefixed name of enum. */
getEnumName()242   public String getEnumName();
243 
244   ////////////////////////////
245   // LF_PROCEDURE accessors //
246   ////////////////////////////
247 
248   /** Type index of the value returned by the procedure. */
getProcedureReturnType()249   public int getProcedureReturnType();
250 
251   /** Calling convention of the procedure; see CALLCONV_ enumeration
252       in {@link
253       sun.jvm.hotspot.debugger.win32.coff.DebugVC50TypeEnums}. */
getProcedureCallingConvention()254   public byte getProcedureCallingConvention();
255 
256   /** Number of parameters. */
getProcedureNumberOfParameters()257   public short getProcedureNumberOfParameters();
258 
259   /** Type index of argument list type record. */
getProcedureArgumentList()260   public int getProcedureArgumentList();
261 
262   /** Get new iterator pointing at the argument list of this procedure. */
getProcedureArgumentListIterator()263   public DebugVC50TypeIterator getProcedureArgumentListIterator();
264 
265   ////////////////////////////
266   // LF_MFUNCTION accessors //
267   ////////////////////////////
268 
269   /** Type index of the value returned by the procedure. */
getMFunctionReturnType()270   public int getMFunctionReturnType();
271 
272   /** Type index of the containing class of the function. */
getMFunctionContainingClass()273   public int getMFunctionContainingClass();
274 
275   /** Type index of the <b>this</b> parameter of the member function.
276       A type of void indicates that the member function is static and
277       has no <b>this</b> parameter. */
getMFunctionThis()278   public int getMFunctionThis();
279 
280   /** Calling convention of the procedure; see CALLCONV_ enumeration
281       in {@link
282       sun.jvm.hotspot.debugger.win32.coff.DebugVC50TypeEnums}. */
getMFunctionCallingConvention()283   public byte getMFunctionCallingConvention();
284 
285   /** Number of parameters. This count does not include the
286       <b>this</b> parameter. */
getMFunctionNumberOfParameters()287   public short getMFunctionNumberOfParameters();
288 
289   /** List of parameter specifiers. This list does not include the
290       <b>this</b> parameter. */
getMFunctionArgumentList()291   public int getMFunctionArgumentList();
292 
293   /** Get new iterator pointing at the argument list of this member function. */
getMFunctionArgumentListIterator()294   public DebugVC50TypeIterator getMFunctionArgumentListIterator();
295 
296   /** Logical <b>this</b> adjustor for the method. Whenever a class
297       element is referenced via the <b>this</b> pointer, thisadjust
298       will be added to the resultant offset before referencing the
299       element. */
getMFunctionThisAdjust()300   public int getMFunctionThisAdjust();
301 
302   //////////////////////////
303   // LF_VTSHAPE accessors //
304   //////////////////////////
305 
306   // This record describes the format of a virtual function table.
307   // This record is accessed via the vfunctabptr in the member list of
308   // the class which introduces the virtual function. The vfunctabptr
309   // is defined either by the LF_VFUNCTAB or LF_VFUNCOFF member
310   // record. If LF_VFUNCTAB record is used, then vfunctabptr is at the
311   // address point of the class. If LF_VFUNCOFF record is used, then
312   // vfunctabptr is at the specified offset from the class address
313   // point. The underlying type of the pointer is a VTShape type
314   // record. This record describes how to interpret the memory at the
315   // location pointed to by the virtual function table pointer.
316 
317   /** Number of descriptors. */
getVTShapeCount()318   public short getVTShapeCount();
319 
320   /** Fetch the <i>i</i>th descriptor (0..getVTShapeCount() - 1). Each
321       descriptor is a 4-bit (half-byte) value described by the
322       VTENTRY_ enumeration in {@link
323       sun.jvm.hotspot.debugger.win32.coff.DebugVC50TypeEnums}. */
getVTShapeDescriptor(int i)324   public int getVTShapeDescriptor(int i);
325 
326   //
327   // NOTE: LF_COBOL0, LF_COBOL1 accessors elided (FIXME)
328   //
329 
330   /////////////////////////
331   // LF_BARRAY accessors //
332   /////////////////////////
333 
334   /** Type of each element of the array. */
getBasicArrayType()335   public int getBasicArrayType();
336 
337   ////////////////////////
338   // LF_LABEL accessors //
339   ////////////////////////
340 
341   /** Addressing mode of the label, described by LABEL_ADDR_MODE_ enum
342       in {@link
343       sun.jvm.hotspot.debugger.win32.coff.DebugVC50TypeEnums}. */
getLabelAddressMode()344   public short getLabelAddressMode();
345 
346   //
347   // LF_NULL, LF_NOTTRANS have no data
348   //
349 
350   ///////////////////////////
351   // LF_DIMARRAY accessors //
352   ///////////////////////////
353 
354   /** Underlying type of the array. */
getDimArrayType()355   public int getDimArrayType();
356 
357   /** Index of the type record containing the dimension information. */
getDimArrayDimInfo()358   public int getDimArrayDimInfo();
359 
360   /** Length-prefixed name of the array. */
getDimArrayName()361   public String getDimArrayName();
362 
363   //////////////////////////
364   // LF_VFTPATH accessors //
365   //////////////////////////
366 
367   /** Count of number of bases in the path to the virtual function
368       table. */
getVFTPathCount()369   public int getVFTPathCount();
370 
371   /** Type indices of the base classes in the path
372       (0..getVFTPathCount() - 1). */
getVFTPathBase(int i)373   public int getVFTPathBase(int i);
374 
375   //
376   // NOTE: LF_PRECOMP and LF_ENDPRECOMP accessors elided because the
377   // signature contained within is extremely compiler-specific and is
378   // left undefined in the specification, so is not useful. (FIXME)
379   //
380 
381   //
382   // NOTE: LF_OEM accessors elided because we will not need to parse
383   // vendor-specific debug information (yet). (FIXME)
384   //
385 
386   //
387   // NOTE: LF_TYPESERVER accessors elided because we will not be using
388   // this library in conjunction with a program database. (FIXME)
389   //
390 
391   //
392   // Type Records Referenced from Type Records
393   //
394 
395   ///////////////////////
396   // LF_SKIP accessors //
397   ///////////////////////
398 
399   /** In processing $$TYPES, the index counter is advanced to index
400       count, skipping all intermediate indices. This is the next valid
401       index. */
getSkipIndex()402   public int getSkipIndex();
403 
404   //////////////////////////
405   // LF_ARGLIST accessors //
406   //////////////////////////
407 
408   /** Count of number of indices in list. */
getArgListCount()409   public int getArgListCount();
410 
411   /** List of type indices (0..getArgListCount() - 1) for describing
412       the formal parameters to a function or method. */
getArgListType(int i)413   public int getArgListType(int i);
414 
415   /////////////////////////
416   // LF_DEFARG accessors //
417   /////////////////////////
418 
419   /** Type index of resulting expression. */
getDefaultArgType()420   public int getDefaultArgType();
421 
422   /** Length-prefixed string of supplied default expression. */
getDefaultArgExpression()423   public String getDefaultArgExpression();
424 
425   //
426   // Field list accessors (LF_FIELDLIST)
427   //
428   // No explicit accessors for the field list. The field list is
429   // structured similarly to most type strings; it is a series of
430   // leaves. LF_INDEX leaves are used to split the field list if it
431   // gets long enough that it will cross a 48K boundary; LF_PAD leaves
432   // are used to enforce proper alignment. Both of these leaves, and
433   // their lengths, are understood by this iterator, and LF_INDEX
434   // leaves have an accessor for reaching the target type record.
435   //
436 
437   //////////////////////////
438   // LF_DERIVED accessors //
439   //////////////////////////
440 
441   // This type record specifies all of the classes that are directly
442   // derived from the class that references this type record.
443 
444   /** Number of types in the list. */
getDerivedCount()445   public int getDerivedCount();
446 
447   /** Fetch <i>i</i>th derived type (0..getDerivedCount() - 1). */
getDerivedType(int i)448   public int getDerivedType(int i);
449 
450   ///////////////////////////
451   // LF_BITFIELD accessors //
452   ///////////////////////////
453 
454   // Bit fields are represented by an entry in the field list that
455   // indexes a bit field type definition.
456 
457   /** Type index of the field. */
getBitfieldFieldType()458   public int getBitfieldFieldType();
459 
460   /** The length in bits of the object. */
getBitfieldLength()461   public byte getBitfieldLength();
462 
463   /** Starting position (from bit 0) of the object in the word. */
getBitfieldPosition()464   public byte getBitfieldPosition();
465 
466   ////////////////////////
467   // LF_MLIST accessors //
468   ////////////////////////
469 
470   // This record is typically used to describe overloaded methods,
471   // though it can also be used (inefficiently) to describe a single
472   // method. It is referenced from the LF_METHOD record. The "count"
473   // is not really contained in this record; it is contained within
474   // the LF_METHOD record which points to this one. However, it seems
475   // it can be inferred from the length of this type string as the
476   // only repeated portion of the record is the type of each
477   // overloaded variant.
478   //
479   // Once a method has been found in this list, its symbol is found by
480   // qualifying the method name with its class (T::name) and then
481   // searching the symbol table for a symbol by that name with the
482   // correct type index. Note that the number of repeats is determined
483   // by the subleaf of the field list that references this LF_MLIST
484   // record.
485 
486   /** Attribute of the member function; see {@link
487       sun.jvm.hotspot.debugger.win32.coff.DebugVC50TypeEnums} and {@link
488       sun.jvm.hotspot.debugger.win32.coff.DebugVC50MemberAttributes}. */
getMListAttribute()489   public short getMListAttribute();
490 
491   /** Number of types corresponding to this overloaded method. FIXME:
492       must verify this can be inferred solely from this record's
493       length. */
getMListLength()494   public int getMListLength();
495 
496   /** Type index of the procedure record for the <i>i</i>th occurrence
497       of the function (0..getMListLength() - 1). */
getMListType(int i)498   public int getMListType(int i);
499 
500   /** Convenience routine indicating whether this member function is
501       introducing virtual. */
isMListIntroducingVirtual()502   public boolean isMListIntroducingVirtual();
503 
504   /** Present only when property attribute is introducing virtual
505       (optional). Offset in vtable of the class which contains the
506       pointer to the function. (FIXME: is this on a per-method or
507       per-method list basis? If the latter, will have to provide an
508       iterator for this record.) */
getMListVtabOffset()509   public int getMListVtabOffset();
510 
511   //
512   // NOTE: LF_DIMCONU, LF_DIMCONLU, LF_DIMVARU, and LF_DIMVARLU
513   // accessors elided as these are very likely Fortran-specific
514   // (FIXME?)
515   //
516 
517   /////////////////////////
518   // LF_REFSYM accessors //
519   /////////////////////////
520 
521   // This record is used to describe a symbol that is referenced by a
522   // type record. The record is defined because type records cannot
523   // reference symbols or locations in the $$SYMBOLS table because
524   // global symbol compaction will move symbols.
525 
526   /** Create a new SymbolIterator pointing at the copy of the symbol
527       this record contains. */
getRefSym()528   public DebugVC50SymbolIterator getRefSym();
529 
530   //
531   // Subfields of complex lists
532   //
533 
534   /////////////////////////
535   // LF_BCLASS accessors //
536   /////////////////////////
537 
538   // This leaf specifies a real base class. If a class inherits real
539   // base classes, the corresponding REAL Base Class records will
540   // precede all other member records in the field list of that
541   // class. Base class records are emitted in left to right
542   // declaration order for real bases.
543 
544   /** Member attribute bit field. */
getBClassAttribute()545   public short getBClassAttribute();
546 
547   /** Index to type record of the class. The class name can be
548       obtained from this record. */
getBClassType()549   public int getBClassType();
550 
551   /** Offset of subobject that represents the base class within the
552       structure. */
getBClassOffset()553   public int getBClassOffset() throws DebugVC50WrongNumericTypeException;
554 
555   //////////////////////////
556   // LF_VBCLASS accessors //
557   //////////////////////////
558 
559   // This leaf specifies a directly inherited virtual base class. If a
560   // class directly inherits virtual base classes, the corresponding
561   // Direct Virtual BaseClass records will follow all Real Base Class
562   // member records and precede all other member records in the field
563   // list of that class. Direct Virtual Base class records are emitted
564   // in bottommost left-to-right inheritance order for directly
565   // inherited virtual bases.
566 
567   /** Member attribute bit field. */
getVBClassAttribute()568   public short getVBClassAttribute();
569 
570   /** Index to type record of the direct or indirect virtual base
571       class. The class name can be obtained from this record. */
getVBClassBaseClassType()572   public int getVBClassBaseClassType();
573 
574   /** Type index of the virtual base pointer for this base. */
getVBClassVirtualBaseClassType()575   public int getVBClassVirtualBaseClassType();
576 
577   /** Numeric leaf specifying the offset of the virtual base pointer
578       from the address point of the class for this virtual base. */
getVBClassVBPOff()579   public int getVBClassVBPOff() throws DebugVC50WrongNumericTypeException;
580 
581   /** Numeric leaf specifying the index into the virtual base
582       displacement table of the entry that contains the displacement
583       of the virtual base. The displacement is relative to the address
584       point of the class plus vbpoff. */
getVBClassVBOff()585   public int getVBClassVBOff() throws DebugVC50WrongNumericTypeException;
586 
587   ///////////////////////////
588   // LF_IVBCLASS accessors //
589   ///////////////////////////
590 
591   // This leaf specifies indirectly inherited virtual base class. If a
592   // class indirectly inherits virtual base classes, the corresponding
593   // Indirect Virtual Base Class records will follow all Real Base
594   // Class and Direct Virtual Base Class member records and precede
595   // all other member records in the field list of that class. Direct
596   // Virtual Base class records are emitted in bottommost
597   // left-to-right inheritance order for virtual bases.
598 
599   /** Member attribute bit field. */
getIVBClassAttribute()600   public short getIVBClassAttribute();
601 
602   /** Index to type record of the direct or indirect virtual base
603       class. The class name can be obtained from this record. */
getIVBClassBType()604   public int getIVBClassBType();
605 
606   /** Type index of the virtual base pointer for this base. */
getIVBClassVBPType()607   public int getIVBClassVBPType();
608 
609   /** Numeric leaf specifying the offset of the virtual base pointer
610       from the address point of the class for this virtual base. */
getIVBClassVBPOff()611   public int getIVBClassVBPOff() throws DebugVC50WrongNumericTypeException;
612 
613   /** Numeric leaf specifying the index into the virtual base
614       displacement table of the entry that contains the displacement
615       of the virtual base. The displacement is relative to the address
616       point of the class plus vbpoff. */
getIVBClassVBOff()617   public int getIVBClassVBOff() throws DebugVC50WrongNumericTypeException;
618 
619   ////////////////////////////
620   // LF_ENUMERATE accessors //
621   ////////////////////////////
622 
623   /** Member attribute bit field. */
getEnumerateAttribute()624   public short getEnumerateAttribute();
625 
626   /** Numeric leaf specifying the value of enumerate. */
getEnumerateValue()627   public long getEnumerateValue() throws DebugVC50WrongNumericTypeException;
628 
629   /** Length-prefixed name of the member field. */
getEnumerateName()630   public String getEnumerateName();
631 
632   ////////////////////////////
633   // LF_FRIENDFCN accessors //
634   ////////////////////////////
635 
636   /** Index to type record of the friend function. */
getFriendFcnType()637   public int getFriendFcnType();
638 
639   /** Length prefixed name of friend function. */
getFriendFcnName()640   public String getFriendFcnName();
641 
642   ////////////////////////
643   // LF_INDEX accessors //
644   ////////////////////////
645 
646   /** Type index. This field is emitted by the compiler when a complex
647       list needs to be split during writing. */
getIndexValue()648   public int getIndexValue();
649 
650   /** Create a new type iterator starting at the above index. */
getIndexIterator()651   public DebugVC50TypeIterator getIndexIterator();
652 
653   /////////////////////////
654   // LF_MEMBER accessors //
655   /////////////////////////
656 
657   /** Member attribute bit field. */
getMemberAttribute()658   public short getMemberAttribute();
659 
660   /** Index to type record for field. */
getMemberType()661   public int getMemberType();
662 
663   /** Numeric leaf specifying the offset of field in the structure. */
getMemberOffset()664   public int getMemberOffset() throws DebugVC50WrongNumericTypeException;
665 
666   /** Length-prefixed name of the member field. */
getMemberName()667   public String getMemberName();
668 
669   ///////////////////////////
670   // LF_STMEMBER accessors //
671   ///////////////////////////
672 
673   // This leaf specifies a static data member of a class. Once a
674   // static data member has been found in this list, its symbol is
675   // found by qualifying the name with its class (T::name) and then
676   // searching the symbol table for a symbol by that name with the
677   // correct type index.
678 
679   /** Member attribute bit field. */
getStaticAttribute()680   public short getStaticAttribute();
681 
682   /** Index to type record for field. */
getStaticType()683   public int getStaticType();
684 
685   /** Length-prefixed name of the member field. */
getStaticName()686   public String getStaticName();
687 
688   /////////////////////////
689   // LF_METHOD accessors //
690   /////////////////////////
691 
692   // This leaf specifies the overloaded member functions of a class.
693   // This type record can also be used to specify a non-overloaded
694   // method but is inefficient. The LF_ONEMETHOD record should be used
695   // for non-overloaded methods.
696 
697   /** Number of occurrences of function within the class. If the
698       function is overloaded then there will be multiple entries in
699       the method list. */
getMethodCount()700   public short getMethodCount();
701 
702   /** Type index of method list. */
getMethodList()703   public int getMethodList();
704 
705   /** Length-prefixed name of method. */
getMethodName()706   public String getMethodName();
707 
708   /////////////////////////////
709   // LF_NESTEDTYPE accessors //
710   /////////////////////////////
711 
712   /** Type index of nested type. */
getNestedType()713   public int getNestedType();
714 
715   /** Length-prefixed name of type. */
getNestedName()716   public String getNestedName();
717 
718   ///////////////////////////
719   // LF_VFUNCTAB accessors //
720   ///////////////////////////
721 
722   // This leaf specifies virtual table pointers within the class. It
723   // is a requirement that this record be emitted in the field list
724   // before any virtual functions are emitted to the field list.
725 
726   /** Index to the pointer record describing the pointer. The pointer
727       will in turn have a LF_VTSHAPE type record as the underlying
728       type. Note that the offset of the virtual function table pointer
729       from the address point of the class is always zero. */
getVFuncTabType()730   public int getVFuncTabType();
731 
732   ////////////////////////////
733   // LF_FRIENDCLS accessors //
734   ////////////////////////////
735 
736   /** Index to type record of the friend class. The name of the class
737       can be obtained from the referenced record. */
getFriendClsType()738   public int getFriendClsType();
739 
740   ////////////////////////////
741   // LF_ONEMETHOD accessors //
742   ////////////////////////////
743 
744   /** Method attribute; see {@link
745       sun.jvm.hotspot.debugger.win32.coff.DebugVC50TypeEnums} and
746       {@link
747       sun.jvm.hotspot.debugger.win32.coff.DebugVC50MemberAttributes}. */
getOneMethodAttribute()748   public short getOneMethodAttribute();
749 
750   /** Type index of method. */
getOneMethodType()751   public int getOneMethodType();
752 
753   /** Convenience routine indicating whether this method is
754       introducing virtual. */
isOneMethodIntroducingVirtual()755   public boolean isOneMethodIntroducingVirtual();
756 
757   /** Offset in virtual function table if introducing virtual method.
758       If the method is not an introducing virtual, then this field is
759       not present. */
getOneMethodVBaseOff()760   public int getOneMethodVBaseOff();
761 
762   /** Length prefixed name of method. */
getOneMethodName()763   public String getOneMethodName();
764 
765   ///////////////////////////
766   // LF_VFUNCOFF accessors //
767   ///////////////////////////
768 
769   // This record is used to specify a virtual function table pointer
770   // at a non-zero offset relative to the address point of a class.
771 
772   /** Type index of virtual function table pointer. */
getVFuncOffType()773   public int getVFuncOffType();
774 
775   /** Offset of virtual function table pointer relative to address
776       point of class. */
getVFuncOffOffset()777   public int getVFuncOffOffset();
778 
779   ///////////////////////////////
780   // LF_NESTEDTYPEEX accessors //
781   ///////////////////////////////
782 
783   // This leaf specifies nested type definition with classes,
784   // structures, unions, or enums and includes the protection
785   // attributes that are missing in LF_NESTEDTYPE.
786 
787   /** Nested type attribute (protection fields are valid). */
getNestedExAttribute()788   public short getNestedExAttribute();
789 
790   /** Type index of nested type. */
getNestedExType()791   public int getNestedExType();
792 
793   /** Length-prefixed name of type. */
getNestedExName()794   public String getNestedExName();
795 
796   ///////////////////////////////
797   // LF_MEMBERMODIFY accessors //
798   ///////////////////////////////
799 
800   /** New protection attributes. */
getMemberModifyAttribute()801   public short getMemberModifyAttribute();
802 
803   /** Type index of base class that introduced the member. */
getMemberModifyType()804   public int getMemberModifyType();
805 
806   /** Length-prefixed name of member. */
getMemberModifyName()807   public String getMemberModifyName();
808 
809   ////////////////////////////
810   // Numeric Leaf accessors //
811   ////////////////////////////
812 
813   /** Fetch the two-byte type (or data, for short integer numeric
814       leaves) of the numeric leaf at the given offset, in bytes, from
815       the start of the current leaf. */
getNumericTypeAt(int byteOffset)816   public short getNumericTypeAt(int byteOffset);
817 
818   /** The size in bytes of the numeric leaf at the given offset, in
819       bytes, from the start of the current leaf.
820 
821       @throw DebugVC50WrongNumericTypeException if there is no numeric
822       leaf at the specified byte offset. */
getNumericLengthAt(int byteOffset)823   public int getNumericLengthAt(int byteOffset)
824     throws DebugVC50WrongNumericTypeException;
825 
826   /** Fetch the value of the integer numeric leaf at the given offset,
827       in bytes, from the start of the current leaf.
828 
829       @throw DebugVC50WrongNumericTypeException if the specified
830       numeric leaf is not of integer type. */
getNumericIntAt(int byteOffset)831   public int getNumericIntAt(int byteOffset)
832     throws DebugVC50WrongNumericTypeException;
833 
834   /** Fetch the value of the long or integer numeric leaf at the given
835       offset, in bytes, from the start of the current leaf.
836 
837       @throw DebugVC50WrongNumericTypeException if the specified
838       numeric leaf is not of long or integer type. */
getNumericLongAt(int byteOffset)839   public long getNumericLongAt(int byteOffset)
840     throws DebugVC50WrongNumericTypeException;
841 
842   /** Fetch the value of the single-precision floating-point numeric
843       leaf at the given offset, in bytes, from the start of the
844       current leaf.
845 
846       @throw DebugVC50WrongNumericTypeException if the specified
847       numeric leaf is not of 32-bit float type. */
getNumericFloatAt(int byteOffset)848   public float getNumericFloatAt(int byteOffset)
849     throws DebugVC50WrongNumericTypeException;
850 
851   /** Fetch the value of the double-precision floating-point numeric
852       leaf at the given offset, in bytes, from the start of the
853       current leaf.
854 
855       @throw DebugVC50WrongNumericTypeException if the specified
856       numeric leaf is not of 64-bit float type. */
getNumericDoubleAt(int byteOffset)857   public double getNumericDoubleAt(int byteOffset)
858     throws DebugVC50WrongNumericTypeException;
859 
860   /** Fetch the raw bytes, including LF_ prefix (if any), of the
861       numeric leaf at the given offset, in bytes, from the start of
862       the current leaf.
863 
864       @throw DebugVC50WrongNumericTypeException if there is no numeric
865       leaf at the specified byte offset. */
getNumericDataAt(int byteOffset)866   public byte[] getNumericDataAt(int byteOffset)
867     throws DebugVC50WrongNumericTypeException;
868 }
869