Skip to content

Commit f521acc

Browse files
committed
Doc: update descriptions of instrumentation defaults (Ada/C/C++)
Change-Id: Iff65789e6aa1b6fde8bd5262347f96ef3857a2bf TN: V913-006
1 parent 915bc57 commit f521acc

File tree

1 file changed

+20
-10
lines changed

1 file changed

+20
-10
lines changed

doc/gnatcov/src_traces.rst

+20-10
Original file line numberDiff line numberDiff line change
@@ -489,16 +489,26 @@ The section :ref:`examples_src_traces` illustrates such a use case.
489489
Instrumentation of a multi-languages project
490490
============================================
491491

492-
The |gcp| instrumentation mode supports Ada, and C. As C support is still at its
493-
beta stage, it is disabled by default. To activate it, add the
494-
:cmd-option:`--restricted-to-languages=C,Ada` switch to your command line.
495-
496-
Note that, as of now, the C instrumented code still uses the Ada coverage
497-
runtime, described in the section :ref:`instr-rts`. To interface with this
498-
runtime, the instrumenter thus generates Ada files that must be compiled with
499-
your project. For that reason, "Ada" needs to be included in the Languages
500-
attribute of your gpr project file (|gcv| will emit a warning at instrumentation
501-
time if this is not the case).
492+
The |gcp| instrumentation mode supports Ada, C and C++ (beta). Ada and C units
493+
are instrumented by default, however since C++ support is still under
494+
development, it is disabled by default.
495+
496+
To change the set of languages to be instrumented, pass the
497+
:cmd-option:`--restricted-to-languages` option to |gcvins|. For instance, to
498+
instrument only Ada units:
499+
500+
.. code-block:: sh
501+
502+
gnatcov instrument --restricted-to-languages=Ada # ...
503+
504+
And to instrument Ada, C and C++ units:
505+
506+
.. code-block:: sh
507+
508+
gnatcov instrument --restricted-to-languages=Ada,C,C++ # ...
509+
510+
Instrumentation and coverage of C/C++ code
511+
==========================================
502512

503513
Instrumentation operates on the preprocessed code, which means that coverage
504514
obligations that come from a macro expansion (and further obligations on the

0 commit comments

Comments
 (0)