CINT debug capabilities

Damir Buskulic (buskulic@lapp.in2p3.fr)
Thu, 18 Feb 1999 12:47:37 +0100


Hi everybody,

One of my coleagues is trying to enter the ROOT world. She tried to
debug a class in the interpreter environment and came to a bunch of
problems. We succeeded to solve them but there are still some concerns
for the use of CINT in the debugging phase of a project (interpreted
code).

1) Because there were bugs in her code, she was forced to leave ROOT
many times without explanation (seg faults, floating point errors,
etc...). Can somebody explain why is it impossible for the interpreter
to say

"there is a seg violation in the line xxx of file yyy.C"

instead of just " ***** Break segmentation violation ****" ?

i.e. behave like a debugger, at least for the interpreted part.

Is there a way to set a "debug level" in CINT or a "security level" that
would check the variables before using them ?
Does removing the bytecode (.O0) give more security ?

2) Furthermore, it looks like the interpreter environment is messed up
by such events. In that case, nothing helps. One has sometimes to kill
the root.exe process. Not very handy ! For a simple class, we had to do
it quite a few (maybe 10) times.

3) Is there a way to have something similar to the core file produced by
gdb in case of a fatal error, that one would be able to look at to see
where was the error ?

4) When using the step mode, there are a few features from the ROOT
readline missing (last command with up-arrow for example)

5) I was advertising ROOT as "use the interpreter, build there your code
and compile it if it's not fast enough". This remains true but every
user has to balance the various options, interpreting or compiling, in
particular from the ease of debugging point of view.

We concluded that, for the time being, the best thing would be to
compile the
code, use gdb, and use the interpreter only for real scripting, that is
being
able to change script very easily, etc... without trying to make
complicated C++ code . This is why a scripting language is used for,
after all...

What are your advices ? Is there a path to improve cint, or perhaps the
root-cint interface, in the future ?

Cheers

Damir

-- 
=====================================================================
| Damir Buskulic                  | Universite de Savoie/LAPP       |
|                                 | Chemin de Bellevue, B.P. 110    |
| Tel : +33 (0)450091600          | F-74941 Annecy-le-Vieux Cedex   |
| e-mail: buskulic@lapp.in2p3.fr  | FRANCE                          |
=====================================================================
mailto:buskulic@lapp.in2p3.fr