Lines Matching refs:opts
244 parse_command_line(int argc, char* argv[], options& opts) in parse_command_line() argument
253 if (opts.in_file_path.empty()) in parse_command_line()
254 opts.in_file_path = argv[i]; in parse_command_line()
260 opts.display_version = true; in parse_command_line()
263 opts.display_abixml_version = true; in parse_command_line()
272 opts.di_root_paths.push_back in parse_command_line()
282 opts.headers_dirs.push_back(argv[j]); in parse_command_line()
291 opts.header_files.push_back(argv[j]); in parse_command_line()
298 || !opts.out_file_path.empty()) in parse_command_line()
301 opts.out_file_path = argv[i + 1]; in parse_command_line()
310 opts.suppression_paths.push_back(argv[j]); in parse_command_line()
319 opts.kabi_whitelist_paths.push_back(argv[j]); in parse_command_line()
324 opts.corpus_group_for_linux = true; in parse_command_line()
330 opts.vmlinux = argv[j]; in parse_command_line()
334 opts.noout = true; in parse_command_line()
337 opts.use_ctf = true; in parse_command_line()
340 opts.write_architecture = false; in parse_command_line()
342 opts.write_corpus_path = false; in parse_command_line()
344 opts.show_locs = false; in parse_command_line()
346 opts.short_locs = true; in parse_command_line()
348 opts.write_comp_dir = false; in parse_command_line()
350 opts.write_elf_needed = false; in parse_command_line()
352 opts.default_sizes = false; in parse_command_line()
354 opts.write_parameter_names = false; in parse_command_line()
361 opts.type_id_style = SEQUENCE_TYPE_ID_STYLE; in parse_command_line()
363 opts.type_id_style = HASH_TYPE_ID_STYLE; in parse_command_line()
372 || !opts.in_file_path.empty()) in parse_command_line()
375 opts.show_base_name_alt_debug_info_path = true; in parse_command_line()
376 opts.check_alt_debug_info_path = true; in parse_command_line()
377 opts.in_file_path = argv[i + 1]; in parse_command_line()
381 opts.load_all_types = true; in parse_command_line()
383 opts.drop_private_types = true; in parse_command_line()
385 opts.drop_undefined_syms = true; in parse_command_line()
387 opts.exported_interfaces_only = true; in parse_command_line()
389 opts.exported_interfaces_only = false; in parse_command_line()
391 opts.linux_kernel_mode = false; in parse_command_line()
393 opts.abidiff = true; in parse_command_line()
397 opts.abidiff = true; in parse_command_line()
398 opts.debug_abidiff = true; in parse_command_line()
404 opts.debug_type_canonicalization = true; in parse_command_line()
407 opts.debug_die_canonicalization = true; in parse_command_line()
410 opts.assume_odr_for_cplusplus = false; in parse_command_line()
412 opts.leverage_dwarf_factorization = false; in parse_command_line()
414 opts.annotate = true; in parse_command_line()
416 opts.show_stats = true; in parse_command_line()
418 opts.do_log = true; in parse_command_line()
425 opts.wrong_option = argv[i]; in parse_command_line()
457 maybe_check_suppression_files(const options& opts) in maybe_check_suppression_files() argument
459 for (vector<string>::const_iterator i = opts.suppression_paths.begin(); in maybe_check_suppression_files()
460 i != opts.suppression_paths.end(); in maybe_check_suppression_files()
466 opts.kabi_whitelist_paths.begin(); in maybe_check_suppression_files()
467 i != opts.kabi_whitelist_paths.end(); in maybe_check_suppression_files()
482 maybe_check_header_files(const options& opts) in maybe_check_header_files() argument
484 for (vector<string>::const_iterator file = opts.header_files.begin(); in maybe_check_header_files()
485 file != opts.header_files.end(); in maybe_check_header_files()
506 set_suppressions(abigail::elf_based_reader& rdr, options& opts) in set_suppressions() argument
509 for (vector<string>::const_iterator i = opts.suppression_paths.begin(); in set_suppressions()
510 i != opts.suppression_paths.end(); in set_suppressions()
515 abigail::tools_utils::gen_suppr_spec_from_headers(opts.headers_dirs, in set_suppressions()
516 opts.header_files); in set_suppressions()
519 if (opts.drop_private_types) in set_suppressions()
526 gen_suppr_spec_from_kernel_abi_whitelists(opts.kabi_whitelist_paths); in set_suppressions()
528 opts.kabi_whitelist_supprs.insert(opts.kabi_whitelist_supprs.end(), in set_suppressions()
532 rdr.add_suppressions(opts.kabi_whitelist_supprs); in set_suppressions()
542 set_generic_options(abigail::elf_based_reader& rdr, options& opts) in set_generic_options() argument
544 rdr.options().drop_undefined_syms = opts.drop_undefined_syms; in set_generic_options()
545 rdr.options().show_stats = opts.show_stats; in set_generic_options()
546 rdr.options().do_log = opts.do_log; in set_generic_options()
548 opts.leverage_dwarf_factorization; in set_generic_options()
550 opts.assume_odr_for_cplusplus; in set_generic_options()
567 options& opts) in load_corpus_and_write_abixml() argument
573 if (opts.debug_abidiff) in load_corpus_and_write_abixml()
578 if (opts.debug_type_canonicalization) in load_corpus_and_write_abixml()
580 if (opts.debug_die_canonicalization) in load_corpus_and_write_abixml()
588 if (opts.use_ctf) in load_corpus_and_write_abixml()
595 create_best_elf_based_reader(opts.in_file_path, in load_corpus_and_write_abixml()
596 opts.prepared_di_root_paths, in load_corpus_and_write_abixml()
598 opts.load_all_types, in load_corpus_and_write_abixml()
599 opts.linux_kernel_mode); in load_corpus_and_write_abixml()
604 set_generic_options(*reader, opts); in load_corpus_and_write_abixml()
605 set_suppressions(*reader, opts); in load_corpus_and_write_abixml()
610 if (opts.check_alt_debug_info_path) in load_corpus_and_write_abixml()
616 if (opts.show_base_name_alt_debug_info_path) in load_corpus_and_write_abixml()
634 if (opts.exported_interfaces_only.has_value()) in load_corpus_and_write_abixml()
635 env.analyze_exported_interfaces_only(*opts.exported_interfaces_only); in load_corpus_and_write_abixml()
641 if (opts.do_log) in load_corpus_and_write_abixml()
650 if (opts.do_log) in load_corpus_and_write_abixml()
660 if (opts.di_root_paths.empty()) in load_corpus_and_write_abixml()
664 << opts.in_file_path << "\n"; in load_corpus_and_write_abixml()
675 << "Could not read debug info for '" << opts.in_file_path in load_corpus_and_write_abixml()
678 opts.di_root_paths.begin(); in load_corpus_and_write_abixml()
679 i != opts.di_root_paths.end(); in load_corpus_and_write_abixml()
682 if (i != opts.di_root_paths.begin()) in load_corpus_and_write_abixml()
691 << opts.in_file_path << "\n"; in load_corpus_and_write_abixml()
700 set_common_options(*write_ctxt, opts); in load_corpus_and_write_abixml()
703 if (opts.do_log) in load_corpus_and_write_abixml()
708 if (opts.abidiff) in load_corpus_and_write_abixml()
719 if (opts.debug_abidiff) in load_corpus_and_write_abixml()
721 opts.type_id_file_path = tmp_file->get_path() + string(".typeid"); in load_corpus_and_write_abixml()
722 write_canonical_type_ids(*write_ctxt, opts.type_id_file_path); in load_corpus_and_write_abixml()
728 if (opts.debug_abidiff in load_corpus_and_write_abixml()
729 && !opts.type_id_file_path.empty()) in load_corpus_and_write_abixml()
730 load_canonical_type_ids(*rdr, opts.type_id_file_path); in load_corpus_and_write_abixml()
736 if (opts.do_log) in load_corpus_and_write_abixml()
750 ctxt->show_locs(opts.show_locs); in load_corpus_and_write_abixml()
754 if (opts.do_log) in load_corpus_and_write_abixml()
764 if (opts.do_log) in load_corpus_and_write_abixml()
773 if (opts.debug_abidiff in load_corpus_and_write_abixml()
774 && !opts.type_id_file_path.empty()) in load_corpus_and_write_abixml()
775 remove(opts.type_id_file_path.c_str()); in load_corpus_and_write_abixml()
778 if (opts.noout) in load_corpus_and_write_abixml()
781 if (!opts.out_file_path.empty()) in load_corpus_and_write_abixml()
783 ofstream of(opts.out_file_path.c_str(), std::ios_base::trunc); in load_corpus_and_write_abixml()
788 << opts.out_file_path << "'\n"; in load_corpus_and_write_abixml()
795 if (opts.do_log) in load_corpus_and_write_abixml()
806 if (opts.do_log) in load_corpus_and_write_abixml()
829 options& opts) in load_kernel_corpus_group_and_write_abixml() argument
831 if (!(tools_utils::is_dir(opts.in_file_path) && opts.corpus_group_for_linux)) in load_kernel_corpus_group_and_write_abixml()
836 if (!opts.vmlinux.empty()) in load_kernel_corpus_group_and_write_abixml()
837 if (!abigail::tools_utils::check_file(opts.vmlinux, cerr, argv[0])) in load_kernel_corpus_group_and_write_abixml()
843 if (opts.exported_interfaces_only.has_value()) in load_kernel_corpus_group_and_write_abixml()
844 env.analyze_exported_interfaces_only(*opts.exported_interfaces_only); in load_kernel_corpus_group_and_write_abixml()
846 if (opts.do_log) in load_kernel_corpus_group_and_write_abixml()
854 opts.use_ctf ? corpus::CTF_ORIGIN : in load_kernel_corpus_group_and_write_abixml()
858 build_corpus_group_from_kernel_dist_under(opts.in_file_path, in load_kernel_corpus_group_and_write_abixml()
860 opts.vmlinux, in load_kernel_corpus_group_and_write_abixml()
861 opts.suppression_paths, in load_kernel_corpus_group_and_write_abixml()
862 opts.kabi_whitelist_paths, in load_kernel_corpus_group_and_write_abixml()
863 supprs, opts.do_log, env, in load_kernel_corpus_group_and_write_abixml()
867 if (opts.do_log) in load_kernel_corpus_group_and_write_abixml()
877 if (!opts.noout) in load_kernel_corpus_group_and_write_abixml()
881 set_common_options(*ctxt, opts); in load_kernel_corpus_group_and_write_abixml()
883 if (!opts.out_file_path.empty()) in load_kernel_corpus_group_and_write_abixml()
885 ofstream of(opts.out_file_path.c_str(), std::ios_base::trunc); in load_kernel_corpus_group_and_write_abixml()
890 << opts.out_file_path << "'\n"; in load_kernel_corpus_group_and_write_abixml()
894 if (opts.do_log) in load_kernel_corpus_group_and_write_abixml()
901 if (opts.do_log) in load_kernel_corpus_group_and_write_abixml()
907 if (opts.do_log) in load_kernel_corpus_group_and_write_abixml()
913 if (opts.do_log) in load_kernel_corpus_group_and_write_abixml()
920 if (opts.do_log) in load_kernel_corpus_group_and_write_abixml()
941 options opts; in main() local
943 if (!parse_command_line(argc, argv, opts) in main()
944 || (opts.in_file_path.empty() in main()
945 && !opts.display_version in main()
946 && !opts.display_abixml_version)) in main()
948 if (!opts.wrong_option.empty()) in main()
950 << "unrecognized option: " << opts.wrong_option << "\n"; in main()
955 if (opts.display_version) in main()
963 if (opts.display_abixml_version) in main()
971 ABG_ASSERT(!opts.in_file_path.empty()); in main()
972 if (opts.corpus_group_for_linux) in main()
974 if (!abigail::tools_utils::check_dir(opts.in_file_path, cerr, argv[0])) in main()
979 if (!abigail::tools_utils::check_file(opts.in_file_path, cerr, argv[0])) in main()
983 prepare_di_root_paths(opts); in main()
985 if (!maybe_check_suppression_files(opts)) in main()
988 if (!maybe_check_header_files(opts)) in main()
992 abigail::tools_utils::guess_file_type(opts.in_file_path); in main()
998 << "files of the kind of "<< opts.in_file_path << " are not handled\n"; in main()
1005 if (tools_utils::is_regular_file(opts.in_file_path)) in main()
1006 exit_code = load_corpus_and_write_abixml(argv, env, opts); in main()
1008 exit_code = load_kernel_corpus_group_and_write_abixml(argv, env, opts); in main()