Chapter 7. Advanced Usage

Table of Contents

Preparing example project
File locations
Building + Installing
Goals for Example Project
Verbosity
The Log File
Determining which EDoc++ data files need to be used
Resource types
Static Libraries
Dynamic Libraries
Plugins
Suppressions
Default suppressions
General Usage
Quick Start Guides
Helpers available
Interactive Suppressions
Suppression Functions
Generating suppressions
Accessing other suppression modules
Completing the example project
Generating doxygen documentation
Checking exception safety of library_user app

Preparing example project

Before we go into more details, you should first build and install Example Project that will be used throughout this section. We will build it so that it contains EDoc++ data files embedded into the installed binaries. This example project is an autotools based project that includes a static library, shared library, dlopened library (plugin) and a few applications.

File locations

The source code for this example project can be found on the sourceforge website:

http://sourceforge.net/project/showfiles.php?group_id=181536

Make sure you download the version that matches your EDoc++ project version. We are going to make the following assumptions:

  • Example project source exists under: $HOME/dev/example

  • Build directory for example project is: $HOME/build/example

  • Install directory for example project is: $HOME/build/install_example

Building + Installing

With the files in the locations mentioned above, the example project can be built and installed using the following commands:

edoc_start.sh
export EDOC_EMBED=yes
mkdir -p $HOME/build/example
cd $HOME/build/example
../../dev/edoc/example/configure --prefix=$HOME/build/install_example
make
make install

Doing the above will have compiled the "example" project with EDoc++ data embedded into the resulting binaries and installed it under $HOME/build/install_example

This should have installed the following files:

include/mystatic.h
include/myshared.h
include/riddled.h
lib/libriddled.a
lib/myplugin.so.0.0.0
lib/libmystatic.a
lib/myplugin.la
lib/libmyshared.la
lib/libriddled.la
lib/libriddled.so.0.0.0
lib/libmyshared.so.0.0.0
lib/myplugin.a
lib/libmyshared.a
lib/libmystatic.la
bin/lu_supp1.eds
bin/simple
bin/gen_supp.eds
bin/lu_supp3.eds
bin/function_pointer
bin/lu_supp.eds
bin/library_user
bin/lu_supp2.eds
bin/virtual_function

As you can see this project is made up of:

  • A library called libmystatic that is a static only libtool library

  • A library called libmyshared that is a shared/static libtool library

  • A library called libriddled that is a shared/static libtool library

  • A plugin called myplugin

  • Some header files for the above libraries

  • A few sample applications

    • library_user

      This is an application that makes use of the static library, shared library and the plugin and will be the application we will focus on in the following sections.

    • function_pointer

      This is a small example application used in a tutorial on restricting function pointer call-graphs with EDoc++ suppressions

    • virtual_function

      This is a small example application used in a tutorial on restricting virtual function call-graphs with EDoc++ suppressions

    • simple

      This is a small example application used earlier throughout the EDoc++ Manual in order to show various basic usages of EDoc++

Goals for Example Project

The goal we will work towards is to use EDoc++ to generate doxygen documentation for the libmystatic, libmyshared and libriddled libraries and run checks over the library_user application in order to ensure there are no bugs due to bad exception usage. The following sections will look into achieving that for our project.