> -----Original Message----- > From: > [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] > org] On Behalf Of Tristan Gingold > Sent: Monday, September 08, 2008 9:16 AM > To: Paulo Marques > Cc: avr-gcc-list@nongnu.org > Subject: Re: [avr-gcc-list] Stack usage under heavy inlining > > > On Sep 8, 2008, at 1:43 PM, Paulo Marques wrote: > > > > > Hi all, > > > > Yesterday I was tracking down a problem in a personal project of > > mine whose symptoms looked like a stack overflow. > > > > As it turned out, it was the same problem with gcc that I had > > already read about on LKML: when gcc inlines a function it > > increases the stack usage of the caller by almost all the stack > > usage of the callee. > > At AdaCore we have a tool (gnatstack) that compute the stack > usage of > a program. We have submitted (a long > time ago) patches to gcc for this tool. IIRC they were never > commented nor approved - lack of interests.
That's a pity. But was this tool geared towards Ada only? There is also "stacktool" written by Dr. John Regehr (CCed) that is for AVR programs, but mainly geared towards TinyOS/AVR based applications. When this first came out, I initially had problems getting it to work on a significantly-sized real-world program. In the end, I never got the tool to work. John and I have had a number of conversations since then about the general problem of doing static analysis on stack usage, and it is a difficult problem to solve. Eric Weddington _______________________________________________ AVR-GCC-list mailing list AVR-GCC-list@nongnu.org http://lists.nongnu.org/mailman/listinfo/avr-gcc-list