From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 30809 invoked by alias); 23 Oct 2003 14:30:49 -0000 Mailing-List: contact ecos-discuss-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: ecos-discuss-owner@sources.redhat.com Received: (qmail 30801 invoked from network); 23 Oct 2003 14:30:46 -0000 Received: from unknown (HELO anchor-post-31.mail.demon.net) (194.217.242.89) by sources.redhat.com with SMTP; 23 Oct 2003 14:30:46 -0000 Received: from calivar.demon.co.uk ([212.228.213.211] helo=miso.calivar.com) by anchor-post-31.mail.demon.net with esmtp (Exim 3.35 #1) id 1ACgU8-000DsG-0V; Thu, 23 Oct 2003 15:30:45 +0100 Received: from miso.calivar.com (miso.calivar.com [127.0.0.2]) by miso.calivar.com (Postfix) with ESMTP id E0BFE28DF46; Thu, 23 Oct 2003 15:30:42 +0100 (BST) To: Ottawa Guy Cc: ecos-discuss@sources.redhat.com References: <20031023035520.57734.qmail@web13004.mail.yahoo.com> From: Nick Garnett Date: Thu, 23 Oct 2003 14:30:00 -0000 In-Reply-To: <20031023035520.57734.qmail@web13004.mail.yahoo.com> Message-ID: User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Subject: Re: [ECOS] static class initilization order X-SW-Source: 2003-10/txt/msg00415.txt.bz2 Ottawa Guy writes: > Hi, > I am trying to use malloc function from malloc.cxx > file. Inside that file cyg_memalloc_mallocpool class > gets initilized and there is an initialization > condition on this class. > > Is there any gcc any flag I need to set to keep the > proper initilization order. > > > Right now when ever I use malloc in my code, my > simulator just crashes, even though I am not making > the actual "malloc" call. I figured this is something > to do with my constructor. If you are using a simulator then you can presumably just break in and see what the program is doing. You should also be able to put a breakpoint on the constructor and step through it to see where it is failing. What platform are you configuring for, and what simulator? Bear in mind that the GDB simulator for most architectures is really there for compiler development only, it cannot fully emulate the hardware of a real board. -- Nick Garnett eCos Kernel Architect http://www.ecoscentric.com The eCos and RedBoot experts -- Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos and search the list archive: http://sources.redhat.com/ml/ecos-discuss