Re: Valgrind - used gdb

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

 



Srivatsan Ramanujam wrote:

<snip>

what does the -fno-inline flag do? should i include
this along with that db-attach flags?

'-fno-inline' is a compiler flag, not a Valgrind flag. It tells the compiler not to inline anything, which should hopefully give you a deeper, but more informative stack trace in your debugger.

You'll need to add it to your build setup somehow - set CFLAGS in your environment, for example, or edit your Makefile.

Sounds like your function is TOO huge. Strive to make routines do "one
unit of work". If the cyclometric complexity of the routine is greater
than, oh, 7 or so, it's likely doing too much.

yeah that is the whole problem....the function is too huge...but it is NOT
MINE :-), someone else had written it (who isn't much familiar with
programming as he is more of an algo expert....), rewriting this program
into smaller chunks wud take more time...so it is not an option as of
now.....

An algorithm expert should be *exactly* the person to break an algorithm into tractable subcomponents.

And "too much" translates into "hard to understand,
hard to maintain, hard to debug".

HTH,
--Eljay

any further directions wud be really helpful.

thanks
vatsan.

If you can't compile with '-fno-inline', you're going to have to go with one of the divide-and-conquer approaches John described. There's nothing else you can do in a situation like this.

Neil.

[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux