There are several options available to aid developers in debugging SellaNMS.
These options can be used in any combination, the developer chooses.

   0. Trace-options

      Trace-options can be used to provide additional information from a
      running module to aid in troubleshooting configuration problems or
      internal issues.

      See the Troubleshooting section of the manual for detailed information:

        http://www.digitalgenesis.com/software/sella_nms/manual


   1. Debug Mode

      Debug mode enables debugging features within SellaNMS and supporting
      libraries. This mode will enable debugging symbols and disable
      optimization (-O0) for gcc. Additionally, assert() calls will trigger
      and any '#ifdef DEBUG' will be compiled in.

      This mode can be enabled with:

         ./configure --enable-debug


   2. Arena Memory

      The STL's arena/pool/cache memory system can be disabled, which aids in
      tracking down memory leaks. This cuts down on false positives when using
      a memory debugging tool such as Valgrind (http://valgrind.org/).

      Disabling arena memory may noticable impact the performance of SellaNMS.

      If compiled with GCC 3.3 set the GLIBCPP_FORCE_NEW before running
      SellaNMS (or supporting daemon) with Valgrind like so:

        export GLIBCPP_FORCE_NEW=1
        valgrind --tool=memcheck mon.snmptrapd -f

      If compiled with GCC 3.4+ set the GLIBCXX_FORCE_NEW before running
      SellaNMS (or supporting daemon) with Valgrind like so:

        export GLIBCXX_FORCE_NEW=1
        valgrind --tool=memcheck mon.snmptrapd -f

      If you are using STLPort rather than the built-in STL, you can disable
      STLPort's arena memory system by configuring SellaNMS with like so:

         ./configure --disable-arena-memory


   3. Valgrind

      Valgrind (http://valgrind.org/) is able to check a wide variety of issues
      within C and C++ programs such as SellaNMS. Make sure to disable the STL's
      arena memory system before running with Valgrind to avoid false positives.

      Valgrind can be run with SellaNMS (or its supporting daemons) like so:

        valgrind --tool=memcheck mon.snmptrapd -f

      See the Valgrind documentation for an explaination of the various tools
      and options available.


   4. STLport's 'Safe STL' Mode

      Safe STL mode is available if you are compiling with STLPort. It enables
      checks for iterators, bounds checking and memory corruption. This may
      cause a noticable slowdown in the running speed of SellaNMS.

      This mode can be enabled with:

         ./configure --with-stlp=<path_to_stlport> --enable-safe-stl

      NOTE: STL Port 4.6.2 with gcc 2.95.3 works well. We've had limited success
            using STL Port working with gcc 3.x.


Fini
