mirror of
git://sourceware.org/git/libabigail.git
synced 2025-02-02 14:51:49 +00:00
9fe85b370c
Sometimes public header files are in the same directory as private header files. In such cases --headers-dir cannot be used. Add --header-file to add individual public header files. * include/abg-tools-utils.h (gen_suppr_spec_from_headers): Add hdr_files string vector argument. * src/abg-tools-utils.cc (handle_file_entry): New function that adds one specific file to the type_suppression. Implementation lifted from... (handle_fts_entry): ...here. Call handle_file_entry for each file. (gen_suppr_spec_from_headers): Also takes a header_files string vector as argument. Call handle_file_entry for each file entry. * tools/abidiff.cc (options): Add header_files1 and header_files2 string vectors. (display_usage): Print --header-file1 and --header-file2 usage. (parse_command_line): Handle --header-file1, --hf1 and --header-file2, --hf2. (set_diff_context_from_opts): Call gen_suppr_spec_from_headers with header_files1 and header_files2. (set_suppressions): Likewise. * tools/abidw.cc (options): Add header_files string vector. (display_usage): Print --header-file usage. (parse_command_line): Handle --header-file1, --hf1. (maybe_check_header_files): New function. (set_suppressions): Call gen_suppr_spec_from_headers with header_files. (main): Call maybe_check_header_files. * tools/abilint.cc (options): Add header_files string vector. (display_usage): Print --header-file usage. (parse_command_line): Handle --header-file1, --hf1. (set_suppressions): Call gen_suppr_spec_from_headers with header_files. * doc/manuals/abidiff.rst: Document --header-file1, --hf1 and --header-file2, --hf2. Add new options to documentation of --drop-private-types. * doc/manuals/abidw.rst: Document --header-file, --hf. * doc/manuals/abilint.rst: Likewise. Signed-off-by: Mark Wielaard <mark@klomp.org> Signed-off-by: Dodji Seketeli <dodji@redhat.com>
95 lines
3.1 KiB
ReStructuredText
95 lines
3.1 KiB
ReStructuredText
=======
|
|
abilint
|
|
=======
|
|
|
|
abilint parses the native XML representation of an ABI as emitted by
|
|
:doc:`abidw`. Once it has parsed the XML representation of the ABI,
|
|
``abilint`` builds and in-memory model from it. It then tries to save
|
|
it back to an XML form, to standard output. If that read-write
|
|
operation succeeds chances are the input XML ABI representation is
|
|
meaningful.
|
|
|
|
Note that the main intent of this tool to help debugging issues in the
|
|
underlying Libabigail library.
|
|
|
|
Note also that ``abilint`` can also read an `ELF`_ input file, build the
|
|
in-memory model for its ABI, and serialize that model back into XML to
|
|
standard output. In that case, the `ELF`_ input file must be
|
|
accompanied with its debug information in the `DWARF`_ format.
|
|
|
|
Invocation
|
|
==========
|
|
|
|
::
|
|
|
|
abilint [options] [<abi-file1>]
|
|
|
|
Options
|
|
=======
|
|
|
|
* ``--help``
|
|
|
|
Display a short help message and exits.
|
|
|
|
* `--version | -v`
|
|
|
|
Display the version of the program and exit.
|
|
|
|
* ``--debug-info-dir`` <*path*>
|
|
|
|
When reading an `ELF`_ input file which debug information is split
|
|
out into a separate file, this options tells ``abilint`` where to
|
|
find that separate debug information file.
|
|
|
|
Note that *path* must point to the root directory under which the
|
|
debug information is arranged in a tree-like manner. Under Red
|
|
Hat based systems, that directory is usually
|
|
``<root>/usr/lib/debug``.
|
|
|
|
Note also that this option is not mandatory for split debug
|
|
information installed by your system's package manager because
|
|
then ``abidiff`` knows where to find it.
|
|
|
|
* ``--diff``
|
|
|
|
For XML inputs, perform a text diff between the input and the
|
|
memory model saved back to disk. This can help to spot issues in
|
|
the handling of the XML format by the underlying Libabigail library.
|
|
|
|
* ``--noout``
|
|
|
|
Do not display anything on standard output. The return code of
|
|
the command is the only way to know if the command succeeded.
|
|
|
|
* ``--suppressions | suppr`` <*path-to-suppression-specifications-file*>
|
|
|
|
Use a :ref:`suppression specification <suppr_spec_label>` file
|
|
located at *path-to-suppression-specifications-file*. Note that
|
|
this option can appear multiple times on the command line. In
|
|
that case, all of the provided suppression specification files are
|
|
taken into account. ABI artifacts matched by the suppression
|
|
specifications are suppressed from the output of this tool.
|
|
|
|
* ``--headers-dir | --hd`` <headers-directory-path-1>
|
|
|
|
Specifies where to find the public headers of the first shared
|
|
library that the tool has to consider. The tool will thus filter
|
|
out types that are not defined in public headers.
|
|
|
|
* ``--header-file | --hf`` <header-file-path>
|
|
|
|
Specifies where to find one of the public headers of the abi file
|
|
that the tool has to consider. The tool will thus filter out
|
|
types that are not defined in public headers.
|
|
|
|
* ``--stdin | --``
|
|
|
|
Read the input content from standard input.
|
|
|
|
* ``--tu``
|
|
|
|
Expect the input XML to represent a single translation unit.
|
|
|
|
.. _ELF: http://en.wikipedia.org/wiki/Executable_and_Linkable_Format
|
|
.. _DWARF: http://www.dwarfstd.org
|