public inbox for ecos-discuss@sourceware.org
 help / color / mirror / Atom feed
* [ECOS] static class initilization order
@ 2003-10-23  3:55 Ottawa Guy
  2003-10-23 14:30 ` Nick Garnett
  0 siblings, 1 reply; 2+ messages in thread
From: Ottawa Guy @ 2003-10-23  3:55 UTC (permalink / raw)
  To: ecos-discuss

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.

Can someone please help.
        Mike

__________________________________
Do you Yahoo!?
The New Yahoo! Shopping - with improved product search
http://shopping.yahoo.com

-- 
Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos
and search the list archive: http://sources.redhat.com/ml/ecos-discuss

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [ECOS] static class initilization order
  2003-10-23  3:55 [ECOS] static class initilization order Ottawa Guy
@ 2003-10-23 14:30 ` Nick Garnett
  0 siblings, 0 replies; 2+ messages in thread
From: Nick Garnett @ 2003-10-23 14:30 UTC (permalink / raw)
  To: Ottawa Guy; +Cc: ecos-discuss

Ottawa Guy <ottawaguy81@yahoo.com> 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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2003-10-23 14:30 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-10-23  3:55 [ECOS] static class initilization order Ottawa Guy
2003-10-23 14:30 ` Nick Garnett

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).