From mint-bounce@lists.fishpool.fi Fri Feb 22 15:26:12 2008 Message-ID: <47BF2DE4.7030304@freesbee.fr> Date: Fri, 22 Feb 2008 21:17:40 +0100 From: =?ISO-8859-15?Q?Vincent_Rivi=E8re?= User-Agent: Thunderbird 2.0.0.9 (Windows/20071031) MIME-Version: 1.0 To: mint@fishpool.com Subject: Re: [MiNT] Automatic -fomit-frame-pointer usage References: <47BECA07.8020506@freesbee.fr> <20080222143940.21379127.mandin.patrice@wanadoo.fr> In-Reply-To: <20080222143940.21379127.mandin.patrice@wanadoo.fr> Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 8bit X-OriginalArrivalTime: 22 Feb 2008 20:17:20.0559 (UTC) FILETIME=[ED8293F0:01C8758F] X-ecartis-version: Ecartis v1.0.0 Sender: mint-bounce@lists.fishpool.fi Errors-to: mint-bounce@lists.fishpool.fi X-original-sender: vincent.riviere@freesbee.fr Precedence: bulk List-help: List-unsubscribe: List-Id: X-List-ID: List-subscribe: List-owner: List-post: Patrice Mandin wrote: > Be careful with the frame pointer. On X86, for example, it is used to > process exceptions in C++ programs. I don't know how it behaves in this > case on m68k. Also, yesterday I add a problem with gcc 2.95 on m68k, and > a program dealing with 64 bits integer. long long values where stored in > the stack frame, link/unlk instructions where used, even if I add > -fomit-frame-pointer. When the frame pointer is required in a function, it is always used, regardless to the -fomit-frame-pointer option. A very simple trick for forcing the usage of the frame pointer in a function is to call the function alloca. For example, "alloca(1);" at the top. So the -fomit-frame-pointer option is harmless (except when there is as compiler bug !). > The best thing you can do, is try to run gdb on a program compiled > without the frame pointer. Last time I did that, it was for that damn Quake bug, which appeared only when -fomit-frame-pointer was used ! Debugging is really horrible without the frame pointer. Ok, that CAN_DEBUG_WITHOUT_FP feature is not a good thing, I will not enable it again in my next GCC patch. Thanks for your advices. -- Vincent Rivière