From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,XPRIO autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,518f36002da82af9,start X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news2.google.com!proxad.net!213.200.89.82.MISMATCH!tiscali!newsfeed1.ip.tiscali.net!newsfeed00.sul.t-online.de!newsmm00.sul.t-online.de!t-online.de!news.t-online.com!not-for-mail From: "Vincent Smeets" Newsgroups: comp.lang.ada Subject: Tool to calculate the stack size Date: Wed, 7 Jul 2004 21:21:07 +0200 Organization: T-Online Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Trace: news.t-online.com 1089228087 03 21552 mXwrXMtLCb2VSlK 040707 19:21:27 X-Complaints-To: usenet-abuse@t-online.de X-ID: XjryIwZUoeGLeWkE+LLEsUpfwdHboyFBUK6w0HMFrXU5RMisfJpjk- X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1409 X-MIMEOLE: Produced By Microsoft MimeOLE V6.00.2800.1409 Xref: g2news1.google.com comp.lang.ada:2103 Date: 2004-07-07T21:21:07+02:00 List-Id: Hallo, Is there a tool to calculate the maximum stack size for an Ada program and it's tasks? I am developing a real time Ada program. One of the requirements on the code is that for every task, the storage_size has to be defined. (for T'Storage_Size use ;) Because recursion isn't allowed, it is given that the tasks will always have enough space. The first phase of the development is done on a Sun Solaris with a GNAT 3.14 host compiler. After the program has been tested, it will be compiled by a GNAT 3.14 cross compiler for VxWorks/PowerPC where it will be tested again. Is there a tool to calculate the maximum stack size? I have looked at the compiler and seen some options but no one gave the ideal output. I can use the option "-save-temps" and search the assembler files for the sparc-statement "save %sp,...,%sp" where the stack pointer is decremented to allocate space for the local variables. After that, I have to find the call tree and add all these values to get the maximum stack size. I have seen that the MIPS-version has an option "-mstats". The documentation says that it will output the needed stack space for every compiled function. The problem is that I don't compile for MIPS and so I don't have this option available. I would like to have the call tree for every task and automatically calculate and summarize the stack size for every function called. Vincent Smeets