arm-elf and mips-deb-linux gdb

Niklaus
2006-06-24T11:19:09Z

Hi,
i just built a cross compiler with target=arm-elf .Then compiled an
program first.c
which contained

1 int main()
2 {
3 int i;
4 for(i=0;i<10;i++)
5 ;
6 return i;
8 }

now i built gdb with target=arm-elf and ran in simulator mode like

target sim
load first
b 4

run

it break

but when i do
b 5
it goes into an infinite loop and i have to interrupt it.

The second questions is
i built a mips-deb-linux helloworld program with cross gcc-glibc.

not under mips-deb-linux-gdb

the same program doesn't even load
it says vma something

pro@deb:~/crossenv/bin$ ./mips-deb-linux-gdb first
GNU gdb 6.5
Copyright (C) 2006 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=i686-pc-linux-gnu --target=mips-deb-linux"...
(gdb) target sim
Connected to the simulator.
(gdb) load first
Loading section .interp, size 0xd vma 0x400114
Loading section .note.ABI-tag, size 0x20 vma 0x400124
Loading section .reginfo, size 0x18 vma 0x400144
Loading section .dynamic, size 0xf8 vma 0x40015c
Loading section .hash, size 0x90 vma 0x400254
Loading section .dynsym, size 0x110 vma 0x4002e4
Loading section .dynstr, size 0xf3 vma 0x4003f4
Loading section .gnu.version, size 0x22 vma 0x4004e8
Loading section .gnu.version_r, size 0x20 vma 0x40050c
Loading section .init, size 0xa8 vma 0x40052c
Loading section .text, size 0x3d0 vma 0x4005e0
Loading section .MIPS.stubs, size 0x20 vma 0x4009b0
Loading section .fini, size 0x58 vma 0x4009d0
Loading section .rodata, size 0x10 vma 0x400a30
Loading section .eh_frame, size 0x4 vma 0x400a40
Loading section .ctors, size 0x8 vma 0x10000000
Loading section .dtors, size 0x8 vma 0x10000008
Loading section .jcr, size 0x4 vma 0x10000010
Loading section .data, size 0x30 vma 0x10000020
Loading section .rld_map, size 0x4 vma 0x10000050
Loading section .got, size 0x4c vma 0x10000060
Start address 0x4005e0
Transfer rate: 19792 bits in <1 sec.
(gdb)

gdb) list
1
2 int main()
3 {
4 int i;
5 for(i=0;i<10;i++)
6 ;
7 return i;
8 }
(gdb) b 5
Breakpoint 1 at 0x4007c8: file first.c, line 5.
(gdb) run
Starting program: /home/pro/crossenv/bin/first
Warning:
Cannot insert breakpoint 1.
Error accessing memory address 0x4007c8: Input/output error.

(gdb)

How do i resolve these