Lines Matching defs:opts

144 parse_command_line(int argc, char* argv[], options& opts)
153 if (opts.app_path.empty())
154 opts.app_path = argv[i];
155 else if (opts.lib1_path.empty())
156 opts.lib1_path = argv[i];
157 else if (opts.lib2_path.empty())
158 opts.lib2_path = argv[i];
165 opts.display_version = true;
170 opts.list_undefined_symbols_only = true;
173 opts.show_base_names = true;
182 opts.app_di_root_path =
194 opts.lib1_di_root_path =
206 opts.lib2_di_root_path =
216 opts.suppression_paths.push_back(argv[j]);
221 opts.show_redundant = true;
222 opts.redundant_opt_set = true;
226 opts.show_redundant = false;
227 opts.no_redundant_opt_set = true;
230 opts.show_locs = false;
232 opts.ignore_soname=true;
234 opts.fail_no_debug_info = true;
238 opts.display_help = true;
242 opts.weak_mode = true;
245 opts.use_ctf = true;
249 opts.unknow_option = argv[i];
254 if (!opts.list_undefined_symbols_only)
256 if (opts.app_path.empty()
257 || opts.lib1_path.empty())
259 if (!opts.weak_mode && opts.lib2_path.empty())
260 opts.weak_mode = true;
295 /// @param opts the options of the program.
299 create_diff_context(const options& opts)
306 ctxt->show_redundant_changes(opts.show_redundant);
307 ctxt->show_locs(opts.show_locs);
309 ctxt->show_soname_change(!opts.ignore_soname);
321 for (vector<string>::const_iterator i = opts.suppression_paths.begin();
322 i != opts.suppression_paths.end();
324 if (check_file(*i, cerr, opts.prog_name))
337 /// @param opts the options the tool got invoked with.
354 perform_compat_check_in_normal_mode(options& opts,
400 string app_path = opts.app_path,
401 lib1_path = opts.lib1_path,
402 lib2_path = opts.lib2_path;
404 if (opts.show_base_names)
406 base_name(opts.app_path, app_path);
407 base_name(opts.lib1_path, lib1_path);
408 base_name(opts.lib2_path, lib2_path);
480 /// @param opts the options the tool got invoked with.
488 perform_compat_check_in_weak_mode(options& opts,
569 string lib1_path = opts.lib1_path, app_path = opts.app_path;
570 if (opts.show_base_names)
572 base_name(opts.lib1_path, lib1_path);
573 base_name(opts.app_path, app_path);
645 /// @param opts the options passed from the user to the program.
656 read_corpus(options opts,
670 emit_prefix(opts.prog_name, cerr)
676 if (opts.use_ctf)
686 /*load_all_types=*/opts.weak_mode,
714 options opts(argv[0]);
716 if (!parse_command_line(argc, argv, opts))
718 if (!opts.unknow_option.empty())
721 << "unrecognized option: " << opts.unknow_option << "\n"
734 if (opts.display_help)
741 if (opts.display_version)
749 if (opts.weak_mode && !opts.lib2_path.empty())
753 << opts.lib2_path << " will be ignored automatically\n";
756 if (opts.redundant_opt_set && opts.no_redundant_opt_set)
764 ABG_ASSERT(!opts.app_path.empty());
765 if (!abigail::tools_utils::check_file(opts.app_path, cerr, opts.prog_name))
769 diff_context_sptr ctxt = create_diff_context(opts);
774 bool files_suppressed = (file_is_suppressed(opts.app_path, supprs)
775 || file_is_suppressed(opts.lib1_path, supprs)
776 || file_is_suppressed(opts.lib2_path, supprs));
785 char * app_di_root = opts.app_di_root_path.get();
791 corpus_sptr app_corpus = read_corpus(opts, status,
793 opts.app_path);
796 emit_prefix(argv[0], cerr) << opts.app_path
801 if (opts.fail_no_debug_info
805 emit_prefix(argv[0], cerr) << opts.app_path
812 << "could not read symbols from " << opts.app_path << "\n";
818 << "could not read file " << opts.app_path << "\n";
822 if (opts.list_undefined_symbols_only)
841 ABG_ASSERT(!opts.lib1_path.empty());
842 if (!abigail::tools_utils::check_file(opts.lib1_path, cerr, opts.prog_name))
845 char * lib1_di_root = opts.lib1_di_root_path.get();
848 corpus_sptr lib1_corpus = read_corpus(opts, status,
850 env, opts.lib1_path);
853 emit_prefix(argv[0], cerr) << opts.lib1_path
857 if (opts.fail_no_debug_info
861 << "could not read debug info for " << opts.lib1_path << "\n";
865 << opts.lib1_path << "\n";
871 << "could not read file " << opts.lib1_path << "\n";
877 if (!opts.weak_mode)
879 ABG_ASSERT(!opts.lib2_path.empty());
880 char * lib2_di_root = opts.lib2_di_root_path.get();
883 lib2_corpus = read_corpus(opts, status,
885 opts.lib2_path);
888 emit_prefix(argv[0], cerr) << opts.lib2_path
893 if (opts.fail_no_debug_info
898 << "could not read debug info for " << opts.lib2_path << "\n";
904 << "could not read symbols from " << opts.lib2_path << "\n";
910 << "could not read file " << opts.lib2_path << "\n";
917 if (opts.weak_mode)
918 s = perform_compat_check_in_weak_mode(opts, ctxt,
922 s = perform_compat_check_in_normal_mode(opts, ctxt,