Add several shortcuts to options for abicompat

This patch adds the following convenience command line options
shortcuts:

  --suppr, --appd, --libd1, --libd2

for the following command line options:

  --suppressions, --app-debug-info-dir, --lib-debug-info-dir1,
    --lib-debug-info-dir2

The patch also updates the documentation accordingly.

	* doc/manuals/abicompat.rst: Update documentation.
	* tools/abicompat.cc (display_usage): Update help strings.
	(parse_command_line): Add shortcuts --suppr, --appd, --libd1 and
	--libd2.

Signed-off-by: Dodji Seketeli <dodji@redhat.com>
This commit is contained in:
Dodji Seketeli 2016-05-08 12:24:23 +02:00
parent a3420853ac
commit d1c2199e08
2 changed files with 22 additions and 11 deletions

View File

@ -44,27 +44,34 @@ Options
scripts that wants to compare names of the application and
libraries independently of what their directory names are.
* ``--app-debug-info-dir`` <path-to-app-debug-info-directory>
* ``--app-debug-info-dir | --appd`` <path-to-app-debug-info-directory>
Set the path to the directory under which the debug information of
the application is supposed to be laid out. This is useful for
application binaries for which the debug info is in a separate set
of files.
* ``--lib-debug-info-dir1`` <path-to-lib1-debug-info>
* ``--lib-debug-info-dir1 | --libd1`` <path-to-lib1-debug-info>
Set the path to the directory under which the debug information of
the first version of the shared library is supposed to be laid
out. This is useful for shared library binaries for which the
debug info is in a separate set of files.
* ``--lib-debug-info-dir2`` <path-to-lib1-debug-info>
* ``--lib-debug-info-dir2 | --libd2`` <path-to-lib1-debug-info>
Set the path to the directory under which the debug information of
the second version of the shared library is supposed to be laid
out. This is useful for shared library binaries for which the
debug info is in a separate set of files.
* ``--suppressions | --suppr`` <*path-to-suppressions*>
Use a :ref:`suppression specification <suppr_spec_label>` file
located at *path-to-suppressions*. Note that this option can
appear multiple times on the command line; all the suppression
specification files are then taken into account.
* ``--no-show-locs``
Do not show information about where in the *second shared library*

View File

@ -113,13 +113,13 @@ display_usage(const string& prog_name, ostream& out)
"undefined symbols of the application\n"
<< " --show-base-names|b in the report, only show the base names "
" of the files; not the full paths\n"
<< " --app-debug-info-dir <path-to-app-debug-info> set the path "
<< " --app-debug-info-dir|--appd <path-to-app-debug-info> set the path "
"to the debug information directory for the application\n"
<< " --lib-debug-info-dir1 <path-to-lib-debug-info1> set the path "
<< " --lib-debug-info-dir1|--libd1 <path-to-lib-debug-info1> set the path "
"to the debug information directory for the first library\n"
<< " --lib-debug-info-dir2 <path-to-lib-debug-info2> set the path "
<< " --lib-debug-info-dir2|--libd2 <path-to-lib-debug-info2> set the path "
"to the debug information directory for the second library\n"
<< "--suppressions <path> specify a suppression file\n"
<< "--suppressions|--suppr <path> specify a suppression file\n"
<< "--no-redundant do not display redundant changes\n"
<< "--no-show-locs do now show location information\n"
<< "--redundant display redundant changes (this is the default)\n"
@ -159,7 +159,8 @@ parse_command_line(int argc, char* argv[], options& opts)
else if (!strcmp(argv[i], "--show-base-names")
|| !strcmp(argv[i], "-b"))
opts.show_base_names = true;
else if (!strcmp(argv[i], "--app-debug-info-dir"))
else if (!strcmp(argv[i], "--app-debug-info-dir")
|| !strcmp(argv[i], "--appd"))
{
if (argc <= i + 1
|| argv[i + 1][0] == '-')
@ -170,7 +171,8 @@ parse_command_line(int argc, char* argv[], options& opts)
abigail::tools_utils::make_path_absolute(argv[i + 1]);
++i;
}
else if (!strcmp(argv[i], "--lib-debug-info-dir1"))
else if (!strcmp(argv[i], "--lib-debug-info-dir1")
|| !strcmp(argv[i], "--libd1"))
{
if (argc <= i + 1
|| argv[i + 1][0] == '-')
@ -181,7 +183,8 @@ parse_command_line(int argc, char* argv[], options& opts)
abigail::tools_utils::make_path_absolute(argv[i + 1]);
++i;
}
else if (!strcmp(argv[i], "--lib-debug-info-dir2"))
else if (!strcmp(argv[i], "--lib-debug-info-dir2")
|| !strcmp(argv[i], "--libd2"))
{
if (argc <= i + 1
|| argv[i + 1][0] == '-')
@ -192,7 +195,8 @@ parse_command_line(int argc, char* argv[], options& opts)
abigail::tools_utils::make_path_absolute(argv[i + 1]);
++i;
}
else if (!strcmp(argv[i], "--suppressions"))
else if (!strcmp(argv[i], "--suppressions")
|| !strcmp(argv[i], "--suppr"))
{
int j = i + 1;
if (j >= argc)