Mail Archives: djgpp/1998/04/14/06:50:30
Sivakumar Radhakrishnan wrote:
>
> Hello Netters,
> I have been using the RHIDE debugger v 1.4 for sometime
> and have noticed an annoying problem. The Trace function (F7 or F8)
> does NOT work correctly. The lines seem to be out of place when
> execution proceeds to one of the many C files in my directory.
> I had used the -g option when compiling all the files.
>
> Could some RHIDE guru point out how this problem can
> be worked around.
Not a guru, but...
There are two reasons I can think of causing this behavior.
Either you have compiled with the optimizer turned on. This makes
gcc rearrange code, omitting useless lines, and such.
The other problem (hmm, I wouldn't consider optimizing a problem)
shows up when you run inlined code in C++, i.e. something like
=== foo.h ===
class foo{
...
void bar( params ){ do_something;}
...
};
=== foo.c ===
...
foo Foo;
Foo->bar(params);
...
=====
Somehow the debug formats mixes line number information and file
name, so you jump to funny places.
The cure for this is to use the stabs or stabs+ format. Go to SET's
homepage to find a 2.7.2 version that supprots stab, or
(of this I am not sure !) use 2.8. I did the first thing, and those
problems are gone.
--
Ciao
Tom
*************************************************************
* Thomas Demmer *
* Lehrstuhl fuer Stroemungsmechanik *
* Ruhr-Uni-Bochum *
* Universitaetsstr. 150 *
* D-44780 Bochum *
* Tel: +49 234 700 6434 *
* Fax: +49 234 709 4162 *
* http://www.lstm.ruhr-uni-bochum.de/~demmer *
*************************************************************
- Raw text -