Beesoft Tracer
Autor: Piotr Pszczolkowski (piotr@beesoft.org.)
Status: Stable release.
Version: 0.04
Licencw: GNU GPL.
Donation: donation info
Download: Beesoft Tracer download page.
Registered on:
freshmeat.net
Beesoft Tracer is a suite of tools for a remote real time debugging of running program.
All elements are wrote in pure C++ with using STL library.
The communication between elements is via sockets: so called unix domain socket and TCP/IP.
Elements of Beesoft Tracer system.
In whole process are participate three applications.
- the debugged program, which sends informations about own states to the server,
- the trace server, named 'tracesrv', is a program collecting all information coming from the debugged program.
The information can be send to one client program, if this is connected.
- the trace client, named 'tracecli', receives information from the trace server, and displays them in text mode.
GUI client is available ('trview').
Advantages of system:
- the debugged program is executed only a bit slower,
almost goes normal and simultaneously sends all debugging information,
which need a programmer for debugging.
Information are sent to the server via unix domain socket.
- the client program, which displays received information, can be in other computer - in remote host (or at the same).
Information are receiving via TCP/IP protocol.

How can you use it?
To debugging the remote program it is needed:
- download source code of Beesoft Tracer to disk,
- build a library 'libbstrace' and the programs 'tracesrv' and 'tracecli' (use 'make' ),
- add a appropriate macros into the source code of the program which should be
debugged
(macros are defined in the header file 'Tracer.h') and in compile time
link static library 'libbstrace.a'.
After that you are ready for debugging! ;-)
To run the debugging enviroment:
- start (followed programs must be run on the same machine):
a) first 'tracesrv',
b) next debugged program ( for tests in packet is accesible program 'example'),
- on remote (or on the same) machine start client 'tracecli'.
In the package file you can find the source code of the 'example' program.
There you can see the right using of necessary macros!
Sorce code of debugged program preparing:
You should write in your own source code:
- TRC_SCOPE_DEF
at beginning every file (in global scope) the user must declare the
necessary information (the class name and the function name)
about all functions, which will send messages.
This can the user do with macro TRC_SCOPE_DEF( class_name, function_name ).
WARNING: in this macro can't use a character '~'.
This macro is necessary for all other macros.
- TRC_SCOPE
At beginning of every function, which will send any debbugging information
and is declared with TRC_SCOPE_DEF, the user should uses macro TRC_SCOPE( class_name, method_name ).
This macro is necessary for macros, that sends messages.
- DBG_MSG, DBG_WARNING, DBG_ERROR
These macros sending the correspondly information to the server.
They works exactly like STL streams.
Example: DBG_MSG << "text: " << 54.32 << '\n'.
WARNING: Every calls of these macros must be ends with a '\n'.
This is a marker of end of information record, which should be send.
And what, when we don't debug and all macros are already inside a source code?
When macros are already in source code and you don't debug,
you should comment a line with #define BEESOFT_TRACER in file Tracer.h .
Or you can write after that a new line: #undef BEESOFT_TRACER.