Lines Matching refs:opts
298 parse_command_line(int argc, char* argv[], options& opts) in parse_command_line() argument
307 if (opts.file1.empty()) in parse_command_line()
308 opts.file1 = argv[i]; in parse_command_line()
309 else if (opts.file2.empty()) in parse_command_line()
310 opts.file2 = argv[i]; in parse_command_line()
317 opts.display_version = true; in parse_command_line()
326 opts.missing_operand = true; in parse_command_line()
327 opts.wrong_option = argv[i]; in parse_command_line()
332 opts.di_root_paths1.push_back in parse_command_line()
342 opts.missing_operand = true; in parse_command_line()
343 opts.wrong_option = argv[i]; in parse_command_line()
348 opts.di_root_paths2.push_back in parse_command_line()
358 opts.missing_operand = true; in parse_command_line()
359 opts.wrong_option = argv[i]; in parse_command_line()
364 opts.headers_dirs1.push_back(argv[j]); in parse_command_line()
373 opts.missing_operand = true; in parse_command_line()
374 opts.wrong_option = argv[i]; in parse_command_line()
377 opts.header_files1.push_back(argv[j]); in parse_command_line()
386 opts.missing_operand = true; in parse_command_line()
387 opts.wrong_option = argv[i]; in parse_command_line()
392 opts.headers_dirs2.push_back(argv[j]); in parse_command_line()
401 opts.missing_operand = true; in parse_command_line()
402 opts.wrong_option = argv[i]; in parse_command_line()
405 opts.header_files2.push_back(argv[j]); in parse_command_line()
414 opts.missing_operand = true; in parse_command_line()
415 opts.wrong_option = argv[i]; in parse_command_line()
418 opts.kernel_abi_whitelist_paths.push_back(argv[j]); in parse_command_line()
422 opts.show_stats_only = true; in parse_command_line()
424 opts.show_symtabs = true; in parse_command_line()
428 opts.display_usage = true; in parse_command_line()
432 opts.drop_private_types = true; in parse_command_line()
434 opts.exported_interfaces_only = true; in parse_command_line()
436 opts.exported_interfaces_only = false; in parse_command_line()
438 opts.no_default_supprs = true; in parse_command_line()
440 opts.no_arch = true; in parse_command_line()
442 opts.no_corpus = true; in parse_command_line()
444 opts.ignore_soname = true; in parse_command_line()
446 opts.fail_no_debug_info = true; in parse_command_line()
449 opts.leaf_changes_only = true; in parse_command_line()
452 opts.show_deleted_fns = true; in parse_command_line()
453 opts.show_all_fns = false; in parse_command_line()
454 opts.show_all_vars = false; in parse_command_line()
458 opts.show_changed_fns = true; in parse_command_line()
459 opts.show_all_fns = false; in parse_command_line()
460 opts.show_all_vars = false; in parse_command_line()
464 opts.show_added_fns = true; in parse_command_line()
465 opts.show_all_fns = false; in parse_command_line()
466 opts.show_all_vars = false; in parse_command_line()
470 opts.show_deleted_vars = true; in parse_command_line()
471 opts.show_all_fns = false; in parse_command_line()
472 opts.show_all_vars = false; in parse_command_line()
476 opts.show_changed_vars = true; in parse_command_line()
477 opts.show_all_fns = false; in parse_command_line()
478 opts.show_all_vars = false; in parse_command_line()
482 opts.show_added_vars = true; in parse_command_line()
483 opts.show_all_fns = false; in parse_command_line()
484 opts.show_all_vars = false; in parse_command_line()
488 opts.show_all_types = true; in parse_command_line()
491 opts.show_added_syms = false; in parse_command_line()
492 opts.show_added_vars = false; in parse_command_line()
493 opts.show_added_fns = false; in parse_command_line()
500 if (!(opts.show_changed_fns in parse_command_line()
501 || opts.show_changed_vars in parse_command_line()
502 || opts.show_deleted_fns in parse_command_line()
503 || opts.show_deleted_vars)) in parse_command_line()
505 opts.show_changed_fns = true; in parse_command_line()
506 opts.show_changed_vars = true; in parse_command_line()
508 opts.show_deleted_vars = true; in parse_command_line()
509 opts.show_deleted_fns = true; in parse_command_line()
512 opts.show_all_fns = false; in parse_command_line()
513 opts.show_all_vars = false; in parse_command_line()
516 opts.show_linkage_names = false; in parse_command_line()
518 opts.show_symbols_not_referenced_by_debug_info = false; in parse_command_line()
520 opts.show_locs = false; in parse_command_line()
522 opts.show_offsets_sizes_in_bits = false; in parse_command_line()
524 opts.show_offsets_sizes_in_bits = true; in parse_command_line()
526 opts.show_hexadecimal_values = true; in parse_command_line()
528 opts.show_hexadecimal_values = false; in parse_command_line()
530 opts.show_relative_offset_changes = false; in parse_command_line()
537 opts.missing_operand = true; in parse_command_line()
538 opts.wrong_option = argv[i]; in parse_command_line()
541 opts.suppression_paths.push_back(argv[j]); in parse_command_line()
549 opts.missing_operand = true; in parse_command_line()
550 opts.wrong_option = argv[i]; in parse_command_line()
553 opts.drop_fn_regex_patterns.push_back(argv[j]); in parse_command_line()
554 opts.drop_var_regex_patterns.push_back(argv[j]); in parse_command_line()
562 opts.missing_operand = true; in parse_command_line()
563 opts.wrong_option = argv[i]; in parse_command_line()
566 opts.drop_fn_regex_patterns.push_back(argv[j]); in parse_command_line()
574 opts.missing_operand = true; in parse_command_line()
575 opts.wrong_option = argv[i]; in parse_command_line()
578 opts.drop_var_regex_patterns.push_back(argv[j]); in parse_command_line()
586 opts.missing_operand = true; in parse_command_line()
587 opts.wrong_option = argv[i]; in parse_command_line()
590 opts.keep_fn_regex_patterns.push_back(argv[j]); in parse_command_line()
591 opts.keep_var_regex_patterns.push_back(argv[j]); in parse_command_line()
599 opts.missing_operand = true; in parse_command_line()
600 opts.wrong_option = argv[i]; in parse_command_line()
603 opts.keep_fn_regex_patterns.push_back(argv[j]); in parse_command_line()
610 opts.missing_operand = true; in parse_command_line()
611 opts.wrong_option = argv[i]; in parse_command_line()
614 opts.keep_var_regex_patterns.push_back(argv[j]); in parse_command_line()
617 opts.show_harmless_changes = true; in parse_command_line()
619 opts.show_harmful_changes = false; in parse_command_line()
621 opts.show_redundant_changes = true; in parse_command_line()
623 opts.show_redundant_changes = false; in parse_command_line()
625 opts.show_impacted_interfaces = true; in parse_command_line()
627 opts.leverage_dwarf_factorization = false; in parse_command_line()
629 opts.leverage_dwarf_factorization = false; in parse_command_line()
631 opts.dump_diff_tree = true; in parse_command_line()
633 opts.show_stats = true; in parse_command_line()
635 opts.do_log = true; in parse_command_line()
638 opts.use_ctf = true; in parse_command_line()
642 opts.do_debug_self_comparison = true; in parse_command_line()
646 opts.do_debug_type_canonicalization = true; in parse_command_line()
651 opts.wrong_option = argv[i]; in parse_command_line()
706 maybe_check_suppression_files(const options& opts) in maybe_check_suppression_files() argument
708 for (vector<string>::const_iterator i = opts.suppression_paths.begin(); in maybe_check_suppression_files()
709 i != opts.suppression_paths.end(); in maybe_check_suppression_files()
715 opts.kernel_abi_whitelist_paths.begin(); in maybe_check_suppression_files()
716 i != opts.kernel_abi_whitelist_paths.end(); in maybe_check_suppression_files()
731 options& opts) in set_diff_context_from_opts() argument
735 ctxt->show_leaf_changes_only(opts.leaf_changes_only); in set_diff_context_from_opts()
736 ctxt->show_hex_values(opts.show_hexadecimal_values); in set_diff_context_from_opts()
737 ctxt->show_offsets_sizes_in_bits(opts.show_offsets_sizes_in_bits); in set_diff_context_from_opts()
738 ctxt->show_relative_offset_changes(opts.show_relative_offset_changes); in set_diff_context_from_opts()
739 ctxt->show_stats_only(opts.show_stats_only); in set_diff_context_from_opts()
740 ctxt->show_deleted_fns(opts.show_all_fns || opts.show_deleted_fns); in set_diff_context_from_opts()
741 ctxt->show_changed_fns(opts.show_all_fns || opts.show_changed_fns); in set_diff_context_from_opts()
742 ctxt->show_added_fns(opts.show_all_fns || opts.show_added_fns); in set_diff_context_from_opts()
743 ctxt->show_deleted_vars(opts.show_all_vars || opts.show_deleted_vars); in set_diff_context_from_opts()
744 ctxt->show_changed_vars(opts.show_all_vars || opts.show_changed_vars); in set_diff_context_from_opts()
745 ctxt->show_added_vars(opts.show_all_vars || opts.show_added_vars); in set_diff_context_from_opts()
746 ctxt->show_linkage_names(opts.show_linkage_names); in set_diff_context_from_opts()
747 ctxt->show_locs(opts.show_locs); in set_diff_context_from_opts()
749 ctxt->show_soname_change(!opts.ignore_soname); in set_diff_context_from_opts()
761 ctxt->show_redundant_changes(opts.show_redundant_changes in set_diff_context_from_opts()
762 || opts.leaf_changes_only); in set_diff_context_from_opts()
764 (opts.show_symbols_not_referenced_by_debug_info); in set_diff_context_from_opts()
766 (opts.show_symbols_not_referenced_by_debug_info && opts.show_added_syms); in set_diff_context_from_opts()
767 ctxt->show_unreachable_types(opts.show_all_types); in set_diff_context_from_opts()
768 ctxt->show_impacted_interfaces(opts.show_impacted_interfaces); in set_diff_context_from_opts()
770 if (!opts.show_harmless_changes) in set_diff_context_from_opts()
773 if (!opts.show_harmful_changes) in set_diff_context_from_opts()
777 for (vector<string>::const_iterator i = opts.suppression_paths.begin(); in set_diff_context_from_opts()
778 i != opts.suppression_paths.end(); in set_diff_context_from_opts()
783 if (!opts.no_default_supprs && opts.suppression_paths.empty()) in set_diff_context_from_opts()
792 if (!opts.headers_dirs1.empty() || !opts.header_files1.empty()) in set_diff_context_from_opts()
797 gen_suppr_spec_from_headers(opts.headers_dirs1, opts.header_files1); in set_diff_context_from_opts()
802 if (!opts.headers_dirs2.empty() || !opts.header_files2.empty()) in set_diff_context_from_opts()
807 gen_suppr_spec_from_headers(opts.headers_dirs2, opts.header_files2); in set_diff_context_from_opts()
812 ctxt->dump_diff_tree(opts.dump_diff_tree); in set_diff_context_from_opts()
822 set_generic_options(abigail::elf_based_reader& rdr, options& opts) in set_generic_options() argument
824 rdr.options().show_stats = opts.show_stats; in set_generic_options()
825 rdr.options().do_log = opts.do_log; in set_generic_options()
827 opts.leverage_dwarf_factorization; in set_generic_options()
829 opts.assume_odr_for_cplusplus; in set_generic_options()
849 set_suppressions(abigail::fe_iface& reader, const options& opts) in set_suppressions() argument
852 for (vector<string>::const_iterator i = opts.suppression_paths.begin(); in set_suppressions()
853 i != opts.suppression_paths.end(); in set_suppressions()
857 if (reader.corpus_path() == opts.file1 in set_suppressions()
858 && (!opts.headers_dirs1.empty() || !opts.header_files1.empty())) in set_suppressions()
868 gen_suppr_spec_from_headers(opts.headers_dirs1, opts.header_files1); in set_suppressions()
871 if (opts.drop_private_types) in set_suppressions()
877 if (reader.corpus_path() == opts.file2 in set_suppressions()
878 && (!opts.headers_dirs2.empty() || !opts.header_files2.empty())) in set_suppressions()
888 gen_suppr_spec_from_headers(opts.headers_dirs2, opts.header_files2); in set_suppressions()
891 if (opts.drop_private_types) in set_suppressions()
899 opts.kernel_abi_whitelist_paths); in set_suppressions()
914 const options& opts) in set_native_xml_reader_options() argument
917 opts.show_all_types); in set_native_xml_reader_options()
927 set_corpus_keep_drop_regex_patterns(options& opts, corpus_sptr c) in set_corpus_keep_drop_regex_patterns() argument
929 if (!opts.drop_fn_regex_patterns.empty()) in set_corpus_keep_drop_regex_patterns()
931 vector<string>& v = opts.drop_fn_regex_patterns; in set_corpus_keep_drop_regex_patterns()
936 if (!opts.keep_fn_regex_patterns.empty()) in set_corpus_keep_drop_regex_patterns()
938 vector<string>& v = opts.keep_fn_regex_patterns; in set_corpus_keep_drop_regex_patterns()
943 if (!opts.drop_var_regex_patterns.empty()) in set_corpus_keep_drop_regex_patterns()
945 vector<string>& v = opts.drop_var_regex_patterns; in set_corpus_keep_drop_regex_patterns()
950 if (!opts.keep_var_regex_patterns.empty()) in set_corpus_keep_drop_regex_patterns()
952 vector<string>& v = opts.keep_var_regex_patterns; in set_corpus_keep_drop_regex_patterns()
1016 const options& opts) in handle_error() argument
1021 << "failed to read input file " << opts.file1 << "\n"; in handle_error()
1028 if (opts.prepared_di_root_paths1.empty() == 0) in handle_error()
1039 = opts.prepared_di_root_paths1.begin(); in handle_error()
1040 i != opts.prepared_di_root_paths1.end(); in handle_error()
1043 if (i != opts.prepared_di_root_paths1.end()) in handle_error()
1052 if (opts.prepared_di_root_paths2.empty()) in handle_error()
1063 = opts.prepared_di_root_paths2.begin(); in handle_error()
1064 i != opts.prepared_di_root_paths2.end(); in handle_error()
1067 if (i != opts.prepared_di_root_paths2.end()) in handle_error()
1090 << opts.file1 in handle_error()
1128 options opts; in main() local
1129 if (!parse_command_line(argc, argv, opts)) in main()
1133 << opts.wrong_option << "\n" in main()
1139 if (opts.missing_operand) in main()
1142 << "missing operand to option: " << opts.wrong_option <<"\n" in main()
1148 if (opts.display_usage) in main()
1155 if (opts.display_version) in main()
1163 prepare_di_root_paths(opts); in main()
1165 if (!maybe_check_suppression_files(opts)) in main()
1170 if (!opts.file1.empty() && !opts.file2.empty()) in main()
1172 if (!check_file(opts.file1, cerr)) in main()
1175 if (!check_file(opts.file2, cerr)) in main()
1180 t1_type = guess_file_type(opts.file1); in main()
1181 t2_type = guess_file_type(opts.file2); in main()
1184 if (opts.exported_interfaces_only.has_value()) in main()
1185 env.analyze_exported_interfaces_only(*opts.exported_interfaces_only); in main()
1188 if (opts.do_debug_self_comparison) in main()
1192 if (opts.do_debug_type_canonicalization) in main()
1204 set_diff_context_from_opts(ctxt, opts); in main()
1206 files_suppressed = (file_is_suppressed(opts.file1, supprs) in main()
1207 || file_is_suppressed(opts.file2, supprs)); in main()
1219 << "Unknown content type for file " << opts.file1 << "\n"; in main()
1223 t1 = abixml::read_translation_unit_from_file(opts.file1, in main()
1231 if (opts.use_ctf) in main()
1235 create_best_elf_based_reader(opts.file1, in main()
1236 opts.prepared_di_root_paths1, in main()
1238 opts.show_all_types); in main()
1240 set_generic_options(*rdr, opts); in main()
1241 set_suppressions(*rdr, opts); in main()
1245 || (opts.fail_no_debug_info in main()
1249 argv[0], opts); in main()
1256 abixml::create_reader(opts.file1, env); in main()
1258 set_suppressions(*rdr, opts); in main()
1259 set_native_xml_reader_options(*rdr, opts); in main()
1262 return handle_error(c1_status, /*ctxt=*/0, argv[0], opts); in main()
1268 abixml::create_reader(opts.file1, in main()
1271 set_suppressions(*rdr, opts); in main()
1272 set_native_xml_reader_options(*rdr, opts); in main()
1276 argv[0], opts); in main()
1291 << "Unknown content type for file " << opts.file2 << "\n"; in main()
1295 t2 = abixml::read_translation_unit_from_file(opts.file2, in main()
1303 if (opts.use_ctf) in main()
1307 create_best_elf_based_reader(opts.file2, in main()
1308 opts.prepared_di_root_paths2, in main()
1310 opts.show_all_types); in main()
1313 set_generic_options(*rdr, opts); in main()
1314 set_suppressions(*rdr, opts); in main()
1319 || (opts.fail_no_debug_info in main()
1322 return handle_error(c2_status, rdr.get(), argv[0], opts); in main()
1327 abigail::fe_iface_sptr rdr = abixml::create_reader(opts.file2, env); in main()
1329 set_suppressions(*rdr, opts); in main()
1330 set_native_xml_reader_options(*rdr, opts); in main()
1333 return handle_error(c2_status, /*ctxt=*/0, argv[0], opts); in main()
1339 abigail::fe_iface_sptr rdr = abixml::create_reader(opts.file2, env); in main()
1341 set_suppressions(*rdr, opts); in main()
1342 set_native_xml_reader_options(*rdr, opts); in main()
1345 return handle_error(c2_status, /*ctxt=*/0, argv[0], opts); in main()
1365 if (opts.no_arch) in main()
1372 if (opts.no_corpus) in main()
1388 if (opts.show_symtabs) in main()
1398 emit_incompatible_format_version_error_message(opts.file1, in main()
1400 opts.file2, in main()
1406 set_corpus_keep_drop_regex_patterns(opts, c1); in main()
1407 set_corpus_keep_drop_regex_patterns(opts, c2); in main()
1422 if (opts.show_symtabs) in main()
1432 emit_incompatible_format_version_error_message(opts.file1, in main()
1434 opts.file2, in main()