[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[linrad] Re: xlinrad 02.05. Problem solved(?)



Hi Bob,

> You will probably need to turn on the debug symbol generation and turn 
> off optimizations and then you will be able to follow the progress.  You 
> do not care that it is slow here,  you are attempting to find logic and 
> other errors. 
OK. The problem is to know all the details....

> gcc -g -O0  will turn off optimizations, insert debug symbols and you 
> can then debug with gdb or valgrind. 
Hmmm, so far gdb is black magic to me, but valgrind gives 
info I can understand:-)

I tried several times (various things) until I discovered I have to 
put -g in the compiler stage and not the linker stage;-)
Another thing was that I had to remove -s from the linker options....

Now it works! 

Is there a way to get an error message when an uninited variable
is used ? Things like this:
(B not initialised)
A=B;
.
.
.
.
if(A==0)whatever();

I get an error message from the last line but not from the first one
which may be very far away in the code an have inherited its non-init
status through a long chain through several intermediate variables.


73

Leif

#############################################################
This message is sent to you because you are subscribed to
  the mailing list <linrad@xxxxxxxxxxxxxxxxxxxxx>.
To unsubscribe, E-mail to: <linrad-off@xxxxxxxxxxxxxxxxxxxxx>
To switch to the DIGEST mode, E-mail to <linrad-digest@xxxxxxxxxxxxxxxxxxxxx>
To switch to the INDEX mode, E-mail to <linrad-index@xxxxxxxxxxxxxxxxxxxxx>
Send administrative queries to  <linrad-request@xxxxxxxxxxxxxxxxxxxxx>

LINRADDARNIL