Some collected information to enable or use debugging in Vish.
Debugging using gdb:
Start vish like any other binary using GDB, e.g:
gdb --eval-command=run --args vish myscript.vis
or use the shortcut as defined in
db vish myscript.vis
. See gdb-user-manual. Note that vish has to be compiled in debug mode. The variable
MAKE_CFG has to be set to
Debug for that purpose. This can be done globally as an environment variable or locally in a
make command. Globally:
export MAKE_CFG=Debug make
Remember that setting an environment variable in a shell is only valid for that shell, not another. To make it “permanent” include this setting in yourA� .bashrc or .profile.
For a local build:
Valid entries for
Several constants can be set to increase the output on
stdout with different levels of verbosity:
F5_VERBOSITYfor getting more F5 library related information. Value range is from 0 to 200.
VERBOSE_REQUESTfor getting more module update request related information. Value range is from 0 to 10.
To be set by, e.g:
The environment variable
MEMCORE_VERBOSITY is used for runtime messages printed by various Vish code. The higher the value the more detailed messages will be printed:
The variable can also be set just for a single invocation of Vish
MEMCORE_VERBOSITY is set to a negative value, then each message will be preceded by the source code location where it is printed from.
Enabling VERBOSE messages:
Many code sections of vish include debugging messages, code like that makes use of the Verbose stream which is similar to the C++ iostream classes, but more lightweight. Its introductory stream identifier specifies the verbosity of this message as defined at runtime via the
MEMCORE_VERBOSITY environment variable.
#include <memcore/Verbose.hpp> Verbose(12) << "some debugging info";
Some code section also require code-modification and setting the
#define VERBOSEA� compilation defintion.
Request Cache Info File:
Vish can be requested to write out a cache information file of the currently managed memory. A USR1 signal has to be send to the Vish process and a text file ‘MemCoreDump.txt’ is written into Vish’s execution directory.
> ps -a|grep vish > 2868 pts/1A�A�A� 00:00:03 vish > kill -USR1 2868