diff options
author | Eugene Tarassov | 2017-07-27 02:35:06 +0000 |
---|---|---|
committer | Eugene Tarassov | 2017-07-27 02:35:06 +0000 |
commit | fd9473805e8d6ea67317be3bcd1fff3a25b10ce6 (patch) | |
tree | 97dfd4012200f4e71f99db000e5bca5f48b84364 | |
parent | 6928bc53e1742199353d4c3966a4209c3d5dd82a (diff) | |
download | org.eclipse.tcf-fd9473805e8d6ea67317be3bcd1fff3a25b10ce6.tar.gz org.eclipse.tcf-fd9473805e8d6ea67317be3bcd1fff3a25b10ce6.tar.xz org.eclipse.tcf-fd9473805e8d6ea67317be3bcd1fff3a25b10ce6.zip |
TCF Tests: added tests for GDB Remote Serial Protocol
6 files changed, 828 insertions, 0 deletions
diff --git a/tests/plugins/org.eclipse.tcf.debug.gdb.test/.classpath b/tests/plugins/org.eclipse.tcf.debug.gdb.test/.classpath new file mode 100644 index 000000000..6175434ba --- /dev/null +++ b/tests/plugins/org.eclipse.tcf.debug.gdb.test/.classpath @@ -0,0 +1,7 @@ +<?xml version="1.0" encoding="UTF-8"?> +<classpath> + <classpathentry kind="src" path="src"/> + <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/> + <classpathentry kind="src" path="/org.eclipse.tcf.core"/> + <classpathentry kind="output" path="bin"/> +</classpath> diff --git a/tests/plugins/org.eclipse.tcf.debug.gdb.test/.project b/tests/plugins/org.eclipse.tcf.debug.gdb.test/.project new file mode 100644 index 000000000..7962adc77 --- /dev/null +++ b/tests/plugins/org.eclipse.tcf.debug.gdb.test/.project @@ -0,0 +1,17 @@ +<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.tcf.debug.gdb.test</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ </natures>
+</projectDescription>
diff --git a/tests/plugins/org.eclipse.tcf.debug.gdb.test/.settings/org.eclipse.jdt.core.prefs b/tests/plugins/org.eclipse.tcf.debug.gdb.test/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 000000000..e57ad1475 --- /dev/null +++ b/tests/plugins/org.eclipse.tcf.debug.gdb.test/.settings/org.eclipse.jdt.core.prefs @@ -0,0 +1,314 @@ +eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.debug.lineNumber=generate
+org.eclipse.jdt.core.compiler.debug.localVariable=generate
+org.eclipse.jdt.core.compiler.debug.sourceFile=generate
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.8
+org.eclipse.jdt.core.formatter.align_fields_grouping_blank_lines=2147483647
+org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation=0
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_assignment=0
+org.eclipse.jdt.core.formatter.alignment_for_binary_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_compact_if=16
+org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80
+org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0
+org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16
+org.eclipse.jdt.core.formatter.alignment_for_expressions_in_for_loop_header=0
+org.eclipse.jdt.core.formatter.alignment_for_method_declaration=0
+org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16
+org.eclipse.jdt.core.formatter.alignment_for_parameterized_type_references=0
+org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_resources_in_try=80
+org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=16
+org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_type_arguments=0
+org.eclipse.jdt.core.formatter.alignment_for_type_parameters=0
+org.eclipse.jdt.core.formatter.alignment_for_union_type_in_multicatch=16
+org.eclipse.jdt.core.formatter.blank_lines_after_imports=1
+org.eclipse.jdt.core.formatter.blank_lines_after_package=1
+org.eclipse.jdt.core.formatter.blank_lines_before_field=1
+org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=0
+org.eclipse.jdt.core.formatter.blank_lines_before_imports=1
+org.eclipse.jdt.core.formatter.blank_lines_before_member_type=1
+org.eclipse.jdt.core.formatter.blank_lines_before_method=1
+org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1
+org.eclipse.jdt.core.formatter.blank_lines_before_package=0
+org.eclipse.jdt.core.formatter.blank_lines_between_import_groups=1
+org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=1
+org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_block=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_lambda_body=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_switch=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=false
+org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=false
+org.eclipse.jdt.core.formatter.comment.format_block_comments=true
+org.eclipse.jdt.core.formatter.comment.format_header=false
+org.eclipse.jdt.core.formatter.comment.format_html=true
+org.eclipse.jdt.core.formatter.comment.format_javadoc_comments=true
+org.eclipse.jdt.core.formatter.comment.format_line_comments=true
+org.eclipse.jdt.core.formatter.comment.format_source_code=true
+org.eclipse.jdt.core.formatter.comment.indent_parameter_description=true
+org.eclipse.jdt.core.formatter.comment.indent_root_tags=true
+org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert
+org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=insert
+org.eclipse.jdt.core.formatter.comment.line_length=80
+org.eclipse.jdt.core.formatter.comment.new_lines_at_block_boundaries=true
+org.eclipse.jdt.core.formatter.comment.new_lines_at_javadoc_boundaries=true
+org.eclipse.jdt.core.formatter.comment.preserve_white_space_between_code_and_line_comments=false
+org.eclipse.jdt.core.formatter.compact_else_if=true
+org.eclipse.jdt.core.formatter.continuation_indentation=2
+org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=2
+org.eclipse.jdt.core.formatter.disabling_tag=@formatter\:off
+org.eclipse.jdt.core.formatter.enabling_tag=@formatter\:on
+org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false
+org.eclipse.jdt.core.formatter.format_line_comment_starting_on_first_column=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true
+org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true
+org.eclipse.jdt.core.formatter.indent_empty_lines=false
+org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true
+org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true
+org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true
+org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=false
+org.eclipse.jdt.core.formatter.indentation.size=8
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_enum_constant=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_field=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_local_variable=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_method=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_package=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_parameter=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_type=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_label=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_type_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert
+org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert
+org.eclipse.jdt.core.formatter.insert_space_after_lambda_arrow=insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_try=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_try_resources=insert
+org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert
+org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_try=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_lambda_arrow=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_try=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=insert
+org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert
+org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw=insert
+org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_try_resources=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.join_lines_in_comments=true
+org.eclipse.jdt.core.formatter.join_wrapped_lines=true
+org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false
+org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false
+org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=true
+org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false
+org.eclipse.jdt.core.formatter.lineSplit=80
+org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false
+org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false
+org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0
+org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=1
+org.eclipse.jdt.core.formatter.parentheses_positions_in_annotation=common_lines
+org.eclipse.jdt.core.formatter.parentheses_positions_in_catch_clause=common_lines
+org.eclipse.jdt.core.formatter.parentheses_positions_in_enum_constant_declaration=common_lines
+org.eclipse.jdt.core.formatter.parentheses_positions_in_for_statment=common_lines
+org.eclipse.jdt.core.formatter.parentheses_positions_in_if_while_statement=common_lines
+org.eclipse.jdt.core.formatter.parentheses_positions_in_lambda_declaration=common_lines
+org.eclipse.jdt.core.formatter.parentheses_positions_in_method_delcaration=common_lines
+org.eclipse.jdt.core.formatter.parentheses_positions_in_method_invocation=common_lines
+org.eclipse.jdt.core.formatter.parentheses_positions_in_switch_statement=common_lines
+org.eclipse.jdt.core.formatter.parentheses_positions_in_try_clause=common_lines
+org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=true
+org.eclipse.jdt.core.formatter.tabulation.char=space
+org.eclipse.jdt.core.formatter.tabulation.size=4
+org.eclipse.jdt.core.formatter.use_on_off_tags=false
+org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false
+org.eclipse.jdt.core.formatter.wrap_before_assignment_operator=false
+org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true
+org.eclipse.jdt.core.formatter.wrap_before_conditional_operator=true
+org.eclipse.jdt.core.formatter.wrap_before_or_operator_multicatch=true
+org.eclipse.jdt.core.formatter.wrap_outer_expressions_when_nested=true
+org.eclipse.jdt.core.javaFormatter=org.eclipse.jdt.core.defaultJavaFormatter
diff --git a/tests/plugins/org.eclipse.tcf.debug.gdb.test/.settings/org.eclipse.jdt.ui.prefs b/tests/plugins/org.eclipse.tcf.debug.gdb.test/.settings/org.eclipse.jdt.ui.prefs new file mode 100644 index 000000000..d304c3a29 --- /dev/null +++ b/tests/plugins/org.eclipse.tcf.debug.gdb.test/.settings/org.eclipse.jdt.ui.prefs @@ -0,0 +1,3 @@ +eclipse.preferences.version=1
+formatter_profile=_Java STD
+formatter_settings_version=12
diff --git a/tests/plugins/org.eclipse.tcf.debug.gdb.test/src/org/eclipse/tcf/debug/gdb/test/Main.java b/tests/plugins/org.eclipse.tcf.debug.gdb.test/src/org/eclipse/tcf/debug/gdb/test/Main.java new file mode 100644 index 000000000..3fd7a6fe2 --- /dev/null +++ b/tests/plugins/org.eclipse.tcf.debug.gdb.test/src/org/eclipse/tcf/debug/gdb/test/Main.java @@ -0,0 +1,262 @@ +/******************************************************************************* + * Copyright (c) 2017 Xilinx, Inc. and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Xilinx - initial API and implementation + *******************************************************************************/ +package org.eclipse.tcf.debug.gdb.test; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.LinkedList; +import java.util.Map; +import java.util.Random; + +import org.eclipse.tcf.core.TransientPeer; +import org.eclipse.tcf.protocol.IChannel; +import org.eclipse.tcf.protocol.IEventQueue; +import org.eclipse.tcf.protocol.IPeer; +import org.eclipse.tcf.protocol.IToken; +import org.eclipse.tcf.protocol.Protocol; +import org.eclipse.tcf.services.IDiagnostics; +import org.eclipse.tcf.services.IRunControl; + +public class Main { + + private static String gdb; + + private static class EventQueue extends Thread implements IEventQueue { + + private final LinkedList<Runnable> queue = new LinkedList<Runnable>(); + + EventQueue() { + setName("TCF Event Dispatcher"); + start(); + } + + public void run() { + try { + while (true) { + Runnable r = null; + synchronized (this) { + while (queue.size() == 0) wait(); + r = queue.removeFirst(); + } + r.run(); + } + } + catch (Throwable x) { + x.printStackTrace(); + System.exit(1); + } + } + + public synchronized int getCongestion() { + int n = queue.size() - 100; + if (n > 100) n = 100; + return n; + } + + public synchronized void invokeLater(Runnable runnable) { + queue.add(runnable); + notify(); + } + + public boolean isDispatchThread() { + return Thread.currentThread() == this; + } + } + + private static class RemotePeer extends TransientPeer { + + private final ArrayList<Map<String,String>> attrs; + + public RemotePeer(ArrayList<Map<String,String>> attrs) { + super(attrs.get(0)); + this.attrs = attrs; + } + + public IChannel openChannel() { + assert Protocol.isDispatchThread(); + IChannel c = super.openChannel(); + for (int i = 1; i < attrs.size(); i++) c.redirect(attrs.get(i)); + return c; + } + } + + private static class Test implements Runnable { + + final Random rnd = new Random(); + + final IRunControl srv_rc; + final IDiagnostics srv_diag; + final Map<String,IRunControl.RunControlContext> map_ctx = new HashMap<String,IRunControl.RunControlContext>(); + + String test_id; + String test_ctx_id; + Thread test_thread; + + Test(IChannel channel) { + srv_rc = channel.getRemoteService(IRunControl.class); + srv_diag = channel.getRemoteService(IDiagnostics.class); + srv_rc.addListener(new IRunControl.RunControlListener() { + @Override + public void contextSuspended(String context, String pc, String reason, Map<String, Object> params) { + } + @Override + public void contextResumed(String context) { + } + @Override + public void contextRemoved(String[] context_ids) { + for (String id : context_ids) { + map_ctx.remove(id); + } + } + @Override + public void contextException(String context, String msg) { + } + @Override + public void contextChanged(IRunControl.RunControlContext[] contexts) { + for (IRunControl.RunControlContext ctx : contexts) { + map_ctx.put(ctx.getID(), ctx); + } + } + @Override + public void contextAdded(IRunControl.RunControlContext[] contexts) { + for (IRunControl.RunControlContext ctx : contexts) { + map_ctx.put(ctx.getID(), ctx); + } + } + @Override + public void containerSuspended(String context, String pc, String reason, Map<String, Object> params, String[] suspended_ids) { + } + @Override + public void containerResumed(String[] context_ids) { + } + }); + } + + @Override + public void run() { + if (test_id == null) { + srv_diag.getTestList(new IDiagnostics.DoneGetTestList() { + public void doneGetTestList(IToken token, Throwable error, String[] list) { + if (error != null) { + exit(error); + } + else { + if (list.length == 0) { + exit(new Exception("Target does not support RCBP tests")); + } + test_id = list[rnd.nextInt(list.length)]; + run(); + } + } + }); + return; + } + if (test_ctx_id == null) { + srv_diag.runTest(test_id, new IDiagnostics.DoneRunTest() { + public void doneRunTest(IToken token, Throwable error, String id) { + if (error != null) { + exit(error); + } + else if (id == null) { + exit(new Exception("Test context ID must not be null")); + } + else if (map_ctx.get(id) == null) { + exit(new Exception("Missing context added event")); + } + else { + test_ctx_id = id; + run(); + } + } + }); + return; + } + if (test_thread == null) { + new TestThread(gdb).start(); + return; + } + exit(new Exception("Internal error")); + } + + void exit(Throwable error) { + if (error != null) { + error.printStackTrace(); + System.exit(6); + } + System.exit(0); + } + } + + private static IPeer getPeer(String[] arr) { + ArrayList<Map<String,String>> l = new ArrayList<Map<String,String>>(); + for (String s : arr) { + Map<String,String> map = new HashMap<String,String>(); + int len = s.length(); + int i = 0; + while (i < len) { + int i0 = i; + while (i < len && s.charAt(i) != '=' && s.charAt(i) != 0) i++; + int i1 = i; + if (i < len && s.charAt(i) == '=') i++; + int i2 = i; + while (i < len && s.charAt(i) != ':') i++; + int i3 = i; + if (i < len && s.charAt(i) == ':') i++; + String key = s.substring(i0, i1); + String val = s.substring(i2, i3); + map.put(key, val); + } + l.add(map); + } + return new RemotePeer(l); + } + + private static void runTestSuite(IPeer peer) { + final IChannel channel = peer.openChannel(); + channel.addChannelListener(new IChannel.IChannelListener() { + public void congestionLevel(int level) { + } + public void onChannelClosed(final Throwable error) { + if (error != null) { + error.printStackTrace(); + System.exit(6); + } + } + public void onChannelOpened() { + Protocol.invokeLater(new Test(channel)); + } + }); + } + + public static void main(String[] args) { + if (args.length < 1) { + System.err.println("Missing command line argument - peer identification string"); + System.exit(4); + } + gdb = System.getenv().get("TCF_TEST_GDB"); + if (gdb == null) gdb = "gdb"; + Protocol.setEventQueue(new EventQueue()); + Protocol.invokeLater(new Runnable() { + public void run() { + runTestSuite(getPeer(args)); + } + }); + String to_env = System.getenv().get("TCF_TEST_TIMEOUT"); + if (to_env == null) to_env = "10"; + final long to_min = Long.parseLong(to_env); + Protocol.invokeLater(to_min * 60 * 1000, new Runnable() { + public void run() { + System.err.println("Error: timeout - test has not finished in " + to_min + " min"); + System.exit(5); + } + }); + } +} diff --git a/tests/plugins/org.eclipse.tcf.debug.gdb.test/src/org/eclipse/tcf/debug/gdb/test/TestThread.java b/tests/plugins/org.eclipse.tcf.debug.gdb.test/src/org/eclipse/tcf/debug/gdb/test/TestThread.java new file mode 100644 index 000000000..e36c8af0b --- /dev/null +++ b/tests/plugins/org.eclipse.tcf.debug.gdb.test/src/org/eclipse/tcf/debug/gdb/test/TestThread.java @@ -0,0 +1,225 @@ +/******************************************************************************* + * Copyright (c) 2017 Xilinx, Inc. and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Xilinx - initial API and implementation + *******************************************************************************/ +package org.eclipse.tcf.debug.gdb.test; + +import java.io.BufferedWriter; +import java.io.InputStream; +import java.io.OutputStreamWriter; +import java.io.Writer; +import java.math.BigInteger; +import java.util.LinkedList; + +class TestThread extends Thread { + + final String gdb; + final Object sync = new Object(); + final String prompt = "(gdb) "; + + TestThread(String gdb) { + this.gdb = gdb; + } + + class OutputReader extends Thread { + final InputStream inp; + final StringBuffer buf = new StringBuffer(); + final LinkedList<String> lst = new LinkedList<String>(); + + OutputReader(InputStream inp) { + this.inp = inp; + } + + @Override + public void run() { + try { + for (;;) { + int ch = inp.read(); + if (ch < 0) break; + if (ch == '\r') continue; + synchronized (sync) { + if (ch == '\n') { + lst.add(buf.toString()); + buf.setLength(0); + } + else { + buf.append((char) ch); + } + sync.notify(); + } + } + } + catch (Exception e) { + e.printStackTrace(); + System.exit(7); + } + } + } + + Process prs; + OutputReader std_out; + OutputReader std_err; + Writer std_inp; + + void checkOutput() throws Exception { + long time = System.currentTimeMillis(); + do { + synchronized (sync) { + while (!std_err.lst.isEmpty()) { + System.err.println(std_err.lst.removeFirst()); + System.err.flush(); + } + while (!std_out.lst.isEmpty()) { + System.out.println(std_out.lst.removeFirst()); + System.out.flush(); + } + if (std_out.buf.length() > 0 && std_out.buf.toString().equals(prompt)) break; + sync.wait(500); + } + } + while (System.currentTimeMillis() < time + 10000); + synchronized (sync) { + if (std_out.buf.length() > 0) { + System.out.print(std_out.buf.toString()); + std_out.buf.setLength(0); + } + } + } + + void cmd(String c) throws Exception { + checkOutput(); + std_inp.write(c); + std_inp.write("\n"); + std_inp.flush(); + System.out.println(c); + System.out.flush(); + if (c.startsWith("mon ")) { + sleep(2000); // Need to sleep because command output goes to stderr + } + synchronized (sync) { + for (;;) { + if (std_out.buf.length() > 0 && std_out.buf.toString().equals(prompt)) break; + if (!prs.isAlive()) break; + sync.wait(500); + } + } + } + + @Override + public void run() { + try { + BigInteger prev_pc = null; + prs = Runtime.getRuntime().exec(new String[] { + gdb, "-q", + "--eval-command=set remotetimeout 1000", + "--eval-command=target extended-remote 127.0.0.1:3000" + }, null); + std_inp = new BufferedWriter(new OutputStreamWriter(prs.getOutputStream())); + std_out = new OutputReader(prs.getInputStream()); + std_err = new OutputReader(prs.getErrorStream()); + std_out.start(); + std_err.start(); + + cmd("mon ps"); + if (std_err.lst.size() < 1) + throw new Exception("Invalid 'mon ps' reply: cnt < 1"); + if (!std_err.lst.get(0).startsWith("1: ")) + throw new Exception("Invalid 'mon ps' reply: list"); + + for (int pass = 0; pass < 10; pass++) { + + cmd("info thread"); + if (std_out.lst.size() < 2) + throw new Exception("Invalid 'info thread' reply: cnt < 2"); + if (!std_out.lst.get(0).startsWith(" Id Target Id")) + throw new Exception("Invalid 'info thread' reply: header"); + if (!std_out.lst.get(1).startsWith("* 1 Thread 1.1 (")) + throw new Exception("Invalid 'info thread' reply: list"); + + cmd("info infer"); + if (std_out.lst.size() < 2) + throw new Exception("Invalid 'info infer' reply: cnt < 2"); + if (!std_out.lst.get(0).startsWith(" Num Description")) + throw new Exception("Invalid 'info infer' reply: header"); + if (!std_out.lst.get(1).startsWith("* 1 process ")) + throw new Exception("Invalid 'info infer' reply: list"); + + cmd("info reg"); + + cmd("bt"); + if (std_out.lst.size() < 1) + throw new Exception("Invalid 'bt' reply: cnt < 1"); + if (!std_out.lst.get(0).startsWith("#0 0x")) + throw new Exception("Invalid 'bt' reply"); + String x = std_out.lst.get(0).substring(6); + BigInteger pc = new BigInteger(x.substring(0, x.indexOf(' ')), 16); + if (prev_pc != null && pc.equals(prev_pc)) + throw new Exception("Prev PC = PC: 0x" + pc.toString(16)); + + cmd("disass /r 0x" + pc.toString(16) + ",+64"); + if (std_out.lst.size() < 2) + throw new Exception("Invalid 'disass' reply: cnt < 2"); + if (!std_out.lst.get(0).startsWith("Dump of assembler code from 0x")) + throw new Exception("Invalid 'disass' reply: header"); + if (!std_out.lst.get(1).startsWith("=> 0x")) + throw new Exception("Invalid 'disass' reply: list"); + + cmd("b *0x" + pc.toString(16)); + if (std_out.lst.size() < 1) + throw new Exception("Invalid 'break' reply: cnt < 1"); + if (!std_out.lst.get(0).startsWith("Breakpoint ")) + throw new Exception("Invalid 'break' reply"); + String y = std_out.lst.get(0).substring(11); + int b = Integer.parseInt(y.substring(0, y.indexOf(' '))); + + cmd("d " + b); + + + if (pass == 0) { + cmd("cont"); + } + else { + cmd("stepi"); + } + prev_pc = pc; + + } + + /* Run until exit */ + cmd("cont"); + if (std_out.lst.size() < 2) + throw new Exception("Invalid 'cont' reply: cnt < 2"); + if (!std_out.lst.get(0).startsWith("Continuing.")) + throw new Exception("Invalid 'cont' reply: start"); + if (!std_out.lst.get(1).startsWith("[Inferior 1 ")) + throw new Exception("Invalid 'cont' reply: end"); + + cmd("info thread"); + if (std_out.lst.size() != 1) + throw new Exception("Invalid 'infor thread' reply: cnt != 1"); + if (!std_out.lst.get(0).startsWith("No threads.")) + throw new Exception("Invalid 'info threads' reply"); + + cmd("quit"); + prs.waitFor(); + std_out.join(); + std_err.join(); + System.exit(0); + } + catch (Exception e) { + try { + checkOutput(); + } + catch (Exception x) { + } + e.printStackTrace(); + System.exit(7); + } + } +} |