This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Valgrind - used gdb


Hi Srivatsan,

> however the vector stuff like you said is perhaps
> inline code.....but still why should it not atleast
> tell me what were the lines in parseString() before
> the inlined vector code??

Because the lines in parseString() before the inlined vector code isn't
where the problem was triggered.  Those lines are before where the problem
was triggered.  The backtrace reports where things are at, not at where
things are where you want them to be -- the psychic gdb isn't available yet.

#define JOKE
I heard that Richard Stallman had the psychic gdb working under MULTICS, but
it's not quite functional under Unix yet.
#undef JOKE

That doesn't mean that where the problem was triggered is where the problem
resides.  It is quite possible that a problem is located far, far away from
where the problem triggers, in both time and space (code).  Nothing worse
than trying to figure out why a program crashes where the actual bug sets up
things 10 minutes earlier, and in entirely unrelated translation units.  I
ran into that issue once-upon-a-time because of interleaved throw/catch and
setjmp/longjmp code.

Those kinds of bugs are much harder to find.

HTH,
--Eljay




Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]