SourceDebugExtension
The remainder of this document describes these additions in detail:
SourceDebugExtension
AttributeSourceDebugExtension
attribute is an optional attribute in the attributes
table of the ClassFile
structure. There can be no more than one
SourceDebugExtension
attribute in the attributes
table of a given ClassFile
structure.
The SourceDebugExtension
attribute has the following format:
The items of the
SourceDebugExtension_attribute {
u2 attribute_name_index;
u4 attribute_length;
u1 debug_extension[attribute_length];
}
SourceDebugExtension_attribute
structure are as follows:
attribute_name_index
attribute_name_index
item must be a valid index into the constant_pool
table. The constant_pool
entry at that index must be a CONSTANT_Utf8_info
structure representing the string <
code>"SourceDebugExtension".
attribute_length
attribute_length
item indicates the length of
the attribute, excluding the initial six bytes. The value of the
attribute_length
item is thus the number of bytes in
the debug_extension[]
item.
debug_extension[]
debug_extension
array holds a string, which must be
in UTF-8 format. There is no terminating zero byte.
The string in the debug_extension
item will be interpreted as
extended debugging information. The content of this string has no semantic
effect on the Java Virtual Machine.
For the class indicated byjvmdiError GetSourceDebugExtension(jclass clazz, char **sourceDebugExtensionPtr)
clazz
, return the debug extension via sourceDebugExtensionPtr
. The returned UTF-8 string
contains exactly the debug extension information present in the
class file of clazz
.
Parameters:
- clazz
- the class to query
- sourceDebugExtensionPtr
- on return, refers to a pointer to the class's debug extension name (UTF-8). The returned debug extension string should be freed with
Deallocate
This function returns either a universal error or one of the following errors:
JVMDI_ERROR_NULL_POINTER
- Invalid pointer.
JVMDI_ERROR_INVALID_CLASS
- Invalid
clazz
.JVMDI_ERROR_ABSENT_INFORMATION
- Class information does not include a debug extension.
ReferenceType
command set):
referenceTypeID | refType | The reference type ID. |
string | sourceDebugExtension | The debug extension string. |
ReferenceType
:
public String sourceDebugExtension() throws AbsentInformationException
AbsentInformationException
- if the debug extension string is not
specifiedObjectCollectedException
- if this reference type has been
unloaded.Copyright © 2001 Sun
Microsystems, Inc. All Rights Reserved.
Please send comments to: java-debugger@sun.com |
![]() |