src/share/vm/prims/jvmtiClassFileReconstituter.cpp

Print this page

        

*** 266,283 **** // Write SourceDebugExtension attribute // JSR45| SourceDebugExtension_attribute { // JSR45| u2 attribute_name_index; // JSR45| u4 attribute_length; ! // JSR45| u2 sourcefile_index; // JSR45| } void JvmtiClassFileReconstituter::write_source_debug_extension_attribute() { assert(ikh()->source_debug_extension() != NULL, "caller must check"); write_attribute_name_index("SourceDebugExtension"); ! write_u4(2); // always length 2 ! write_u2(symbol_to_cpool_index(ikh()->source_debug_extension())); } // Write (generic) Signature attribute // JVMSpec| Signature_attribute { // JVMSpec| u2 attribute_name_index; --- 266,287 ---- // Write SourceDebugExtension attribute // JSR45| SourceDebugExtension_attribute { // JSR45| u2 attribute_name_index; // JSR45| u4 attribute_length; ! // JSR45| u1 debug_extension[attribute_length]; // JSR45| } void JvmtiClassFileReconstituter::write_source_debug_extension_attribute() { assert(ikh()->source_debug_extension() != NULL, "caller must check"); write_attribute_name_index("SourceDebugExtension"); ! int len = (int)strlen(ikh()->source_debug_extension()); ! write_u4(len); ! u1* ext = (u1*)ikh()->source_debug_extension(); ! for (int i=0; i<len; i++) { ! write_u1(ext[i]); ! } } // Write (generic) Signature attribute // JVMSpec| Signature_attribute { // JVMSpec| u2 attribute_name_index;