[ECOS] printf problem,examples cannt run

Jonathan Larmour jlarmour@redhat.com
Wed Mar 20 12:03:00 GMT 2002


abccs@x263.net wrote:
> 
> hi,
> I use the iq80310 board.When I run hello.c on it,it cannt run and stop on "printf".
> I use the eCos configure tools 1.3.net.
> I set breakpoints on "main" and "printf", it can stop on these breakpoints.but when I continue the program after the breakpoint "printf",the target is dead.
> Follow is the process:
> 
> E:\ecos\examples>xscale-elf-gdb -nw hello
> GNU gdb 4.18-xscale-010827
> (gdb) set remotebaud 115200
> (gdb) target remote com1
> Remote debugging using com1
> 0x18bcc in ?? ()
> (gdb) load
> Loading section .rom_vectors, size 0x40 lma 0xa1020000
> Loading section .text, size 0xbefc lma 0xa1020040
> Loading section .rodata, size 0x4e0 lma 0xa102bf3c
> Loading section .data, size 0x454 lma 0xa102c41c
> Start address 0xa1020040 , load size 51312
> Transfer rate: 82099 bits/sec, 296 bytes/write.
> (gdb) b main
> Breakpoint 1 at 0xa1020674: file hello.c, line 6.
> (gdb) c
> Continuing.
> 
> Breakpoint 1, main () at hello.c:6
> 6         printf("Hello, eCos world!\n");
> (gdb) b printf
> Breakpoint 2 at 0xa1024c80: file /ecos-e/ecos/packages/language/c/libc/std
> /current/src/output/printf.cxx, line 66.
> (gdb) c
> Continuing.
> 
> Breakpoint 2, printf (
>     format=0xa1030598 " å\002¡¼\005\003¡¬\005\003¡\004*\002¡´\201\002¡\004")
>     at /ecos-e/ecos/packages/language/c/libc/stdio/current/src/output/prin
> .cxx:66
> 66          rc = vfnprintf(stdout, INT_MAX, format, ap);
> Current language:  auto; currently c++
> (gdb) c
> Continuing.

Can you break on vfnprintf? What happens if you type "finish"? What happens
if you do lots of "stepi"s to do instruction single step to see where it is
going wrong.

Jifl
-- 
Red Hat, Rustat House, Clifton Road, Cambridge, UK. Tel: +44 (1223) 271062
Maybe this world is another planet's Hell -Aldous Huxley || Opinions==mine

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



More information about the Ecos-discuss mailing list