This is the mail archive of the ecos-discuss@sources.redhat.com 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]

cyg_io_init problems


Hi

I just updated my sources (AT91M40400) to 2000-09-06 cvs version (from
august version) and I'm having some problems.

in void cyg_io_init(void) the system is crashing
from what I've been able to debug, (below is the modified source code)
there is an offset problem occuring, the <cyg_devtab_entry_t *t;> seems to
be offset by 4.


cyg_io_init(void)
{
    static int _init = false;
    cyg_devtab_entry_t *t;
    if (_init) return;
    for (t = &__DEVTAB__[0]; t != &__DEVTAB_END__; t++) {
//#ifdef CYGDBG_IO_INIT
        diag_printf("Init device '%s'\n", t->name);
//#endif
        diag_printf("xxxxxxxxxxxxxxxxxxx Init 0x%x 0x%x 0x%x 0x%x\n", t,
&(t->init), t->init, &(t->name));
        if (t != 0)
        {
        if (t->init(t)) {
        diag_printf("xxxxxxxxxxxxxxxxxxx avail xxxxxxxxx\n");
            t->status |= CYG_DEVTAB_STATUS_AVAIL;
        } else {
        diag_printf("xxxxxxxxxxxxxxxxxxx not avail xxxxxxxxx\n");
            // What to do if device init fails?
            // Device not [currently] available
            t->status &= ~CYG_DEVTAB_STATUS_AVAIL;
        }
        }

<gdb trace>

(gdb) c
Continuing.
Init device '<null>'
xxxxxxxxxxxxxxxxxxx Init 0x200B7A4 0x200B7B0 0x200B6D0 0x200B7A4
[New thread 0]

Program received signal SIGTRAP, Trace/breakpoint trap.
[Switching to thread 0]
0x2013b1c in ?? ()
(gdb) x 0x200b7a4
0x200b7a4 <__DEVTAB__>:	0x00000000
(gdb) x 0x200b7a8
0x200b7a8 <tty_io_diag>:	0x0200b070
(gdb) x 0x200b070
0x200b070
<_._t12Cyg_Mempolt21Z35Cyg_Mempool_dlmalloc_Implementation+1744>:	
0x7665642f
(gdb) x/10c 0x200b070
0x200b070
<_._t12Cyg_Mempolt21Z35Cyg_Mempool_dlmalloc_Implementation+1744>:	
47 '/'	100 'd'	101 'e'	118 'v'	47 '/'	116 't'	116 't'	121 'y'
0x200b078
<_._t12Cyg_Mempolt21Z35Cyg_Mempool_dlmalloc_Implementation+1752>:	
100 'd'	105 'i'
(gdb) 


looks like at
0x200b7a4 <__DEVTAB__>: 0x00000000
the 0x0000000 has been inserted for some reason???

any ideas?

thanks

Carl van Schaik   <carl@leg.uct.ac.za>
-----------------------------------------------------
Dept. Electrical Engineering, UCT

621 Menzies Building
University of Cape Town
Rondebosch   
Western Cape
7700
South Africa

Tel: +27 21 650-3467
Fax: +27 21 650-3465


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