This is the mail archive of the ecos-discuss@sourceware.org mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Static constructors List


Thanks Mr.Andrew for your prompt reply.
I tried and got the following outpur

tpawaskar@Tejas-Ubuntu:~/devel/ecos/build/quantum/newrom/ecos_install/bin$
arm-linux-gdb
GNU gdb 6.1.1
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General
Public License, and you are
welcome to change it and/or distribute copies of it
under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show
warranty" for details.
This GDB was configured as
"--host=i386-redhat-linux-gnu --target=arm-linux".
(gdb) file redboot.elf
Reading symbols from redboot.elf...done.
(gdb) x &__CTOR_END__[-1]
cannot subscript something of type `<variable (not
text or data), no debug info>'
(gdb) x &__CTOR_END__
0x8af0 <__exception_stack_base>:        0x00000000
(gdb) x 0x8af0
0x8af0 <__exception_stack_base>:        0x00000000
(gdb)

>From the above i get feeling that it is NULL.
How do i rectify the above problem?

Kind regards,
Tejas Pawaskar


--- Andrew Lunn <andrew@lunn.ch> wrote:

> On Mon, Jan 22, 2007 at 06:05:17AM +0000, tejas
> pawaskar wrote:
> > Hello 
> > 
> > I am building redboot for an intel's xscale pxa270
> > based  board. I am using pxa270's FFUART for
> serial
> > output configured at 115200-8-N-1. 
> > 
> > My problem is that the code gets stuck at the
> point
> > where from vector.s calls function
> > cyg_hal_invoke_constructors.
> > 
> > The function is in
> hal/arm/arch/current/src/hal_misc.c
> > void
> > cyg_hal_invoke_constructors (void)
> > {
> > #ifdef CYGSEM_HAL_STOP_CONSTRUCTORS_ON_FLAG
> >     static pfunc *p = &__CTOR_END__[-1];
> >     
> >     cyg_hal_stop_constructors = 0;
> >     for (; p >= __CTOR_LIST__; p--) {
> >         (*p) ();
> >         if (cyg_hal_stop_constructors) {
> >             p--;
> >             break;
> >         }
> >     }
> > #else
> >     pfunc *p;
> > 
> >     for (p = &__CTOR_END__[-1]; p >=
> __CTOR_LIST__;
> > p--)
> >         (*p) ();
> > #endif
> > }
> > 
> > >From the above code i can understand that it is
> > calling various functions starting from
> __CTOR_END[-1]
> > upto __CTOR_LIST__, and my code gets stuck in one
> of
> > the fucntions called.
> > 
> > How do i find out in which function it is getting
> > stucked? Where is the __CTOR_LIST__ located so
> that i
> > can come to know about the functions it is
> supposed to
> > call?
> 
> Do you have the elf for the redboot you are
> currently running?  You
> can use gdb to analyse the image statically, ie when
> not actually
> running on the target.
> 
> So you can do things like
> 
> print __CTOR_END__[-1]
> x &__CTOR_END__[-1]
> 
> etc, so you can see the address of the first
> function called. 
> You can then do
> 
> x 0x1234421 
> 
> and it will tell you what symbol, is function is at
> address 0x1234421
> etc.
> 
> You can then go backwards through the list and find
> out which is
> suspect. Maybe one is NULL?
>  
> > Also what are the necessary configuration settings
> > need to be done using the  configtool to run
> redboot?
> 
> There is documentation about how to build redboot in
> the redboot
> manual. Take a look at ecos.sourceware.org.
> 
>         Andrew
> 



		
__________________________________________________________
Yahoo! India Answers: Share what you know. Learn something new
http://in.answers.yahoo.com/

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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]