]> sourceware.org Git - libabigail.git/commitdiff
Show linkage names in abipkgdiff output
authorDodji Seketeli <dodji@redhat.com>
Tue, 21 Jul 2015 13:49:25 +0000 (15:49 +0200)
committerDodji Seketeli <dodji@redhat.com>
Tue, 21 Jul 2015 14:09:53 +0000 (16:09 +0200)
With this patch abipkgdiff now shows the linkage names of
added/removed functions and variables.  In addition, there now is a
--no-linkage-name option to avoid seeing linkage names.

* doc/manuals/abipkgdiff.rst: Document the new --no-linkage-name
options.
* tools/abipkgdiff.cc (options::show_linkage_names): New data
member.
(options::options): Initialize it.
(display_usage): Display a usage string for --no-linkage-name.
(parse_command_line): Parse the --no-linkage-name option.
(set_diff_context_from_opts): Set the diff context accordingly.
* tests/data/test-diff-pkg/test-rpm-report-0.txt: Adjust.

Signed-off-by: Dodji Seketeli <dodji@redhat.com>
doc/manuals/abipkgdiff.rst
tests/data/test-diff-pkg/test-rpm-report-0.txt
tools/abipkgdiff.cc

index f9beeac29d7cead2d36f7de07b9f9438b60b5d98..9c4ac567feffb041724d6902af50bbea71dec862 100644 (file)
@@ -59,6 +59,11 @@ Options
     change is a change that has been displayed elsewhere in a given
     report.
 
+  * ``--no-linkage-name``
+
+    In the resulting report, do not display the linkage names of
+    the added, removed, or changed functions or variables.
+
   * ``--no-added-binaries``
 
     Do not show the list of binaries that got added to the second
index bd3ae443a6fc200477ca6cc5eb629dcd39af1186..95475ccba14ace82d3fff78d21849be4644e7569 100644 (file)
@@ -6,8 +6,8 @@
 
   2 Removed functions:
 
-    'function BaseInfo* base_info_ref(BaseInfo*)'
-    'function void base_info_unref(BaseInfo*)'
+    'function BaseInfo* base_info_ref(BaseInfo*)'    {base_info_ref}
+    'function void base_info_unref(BaseInfo*)'    {base_info_unref}
 
 
   1 Added function symbol not referenced by debug info:
index 1be3f0cee5dcac404354b3bd213b2b86e40e0e46..9ce426abacfca89930ae303f90b686829dad6ca1 100644 (file)
@@ -95,6 +95,7 @@ struct options
   string       debug_package1;
   string       debug_package2;
   bool         compare_dso_only;
+  bool         show_linkage_names;
   bool         show_redundant_changes;
   bool         show_added_binaries;
   vector<string> suppression_paths;
@@ -103,6 +104,7 @@ struct options
     : display_usage(),
       missing_operand(),
       compare_dso_only(),
+      show_linkage_names(true),
       show_redundant_changes(),
       show_added_binaries(true)
   {}
@@ -242,6 +244,8 @@ display_usage(const string& prog_name, ostream& out)
       << " --debug-info-pkg2|--d2 <path>  path of debug-info package of package2\n"
       << " --suppressions|--suppr <path>  specify supression specification path\n"
       << " --dso-only                     pompare shared libraries only\n"
+      << " --no-linkage-name  do not display linkage names of "
+             "added/removed/changed\n"
       << " --redundant                    display redundant changes\n"
       << " --no-added-binaries            do not display added binaries\n"
       << " --verbose                      emit verbose progress messages\n"
@@ -360,6 +364,7 @@ set_diff_context_from_opts(diff_context_sptr ctxt,
   ctxt->default_output_stream(&cout);
   ctxt->error_output_stream(&cerr);
   ctxt->show_redundant_changes(opts.show_redundant_changes);
+  ctxt->show_linkage_names(opts.show_linkage_names);
 
   ctxt->switch_categories_off
     (abigail::comparison::ACCESS_CHANGE_CATEGORY
@@ -774,6 +779,8 @@ parse_command_line(int argc, char* argv[], options& opts)
         }
       else if (!strcmp(argv[i], "--dso-only"))
        opts.compare_dso_only = true;
+      else if (!strcmp(argv[i], "--no-linkage-name"))
+       opts.show_linkage_names = false;
       else if (!strcmp(argv[i], "--redundant"))
        opts.show_redundant_changes = true;
       else if (!strcmp(argv[i], "--no-added-binaries"))
This page took 0.042306 seconds and 5 git commands to generate.