* arm-elf and mips-deb-linux gdb
@ 2006-06-24 13:08 Niklaus
2006-06-24 13:30 ` Daniel Jacobowitz
0 siblings, 1 reply; 6+ messages in thread
From: Niklaus @ 2006-06-24 13:08 UTC (permalink / raw)
To: gdb
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
^ permalink raw reply [flat|nested] 6+ messages in thread* Re: arm-elf and mips-deb-linux gdb
2006-06-24 13:08 arm-elf and mips-deb-linux gdb Niklaus
@ 2006-06-24 13:30 ` Daniel Jacobowitz
2006-06-26 13:03 ` Niklaus
0 siblings, 1 reply; 6+ messages in thread
From: Daniel Jacobowitz @ 2006-06-24 13:30 UTC (permalink / raw)
To: Niklaus; +Cc: gdb
On Sat, Jun 24, 2006 at 05:19:04PM +0600, Niklaus wrote:
> 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 most important thing in a bug report is being specific. Please
show us a complete log of the GDB session.
> 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
The MIPS simulator can not run Linux binaries.
--
Daniel Jacobowitz
CodeSourcery
^ permalink raw reply [flat|nested] 6+ messages in thread* Re: arm-elf and mips-deb-linux gdb
2006-06-24 13:30 ` Daniel Jacobowitz
@ 2006-06-26 13:03 ` Niklaus
2006-06-26 14:55 ` Daniel Jacobowitz
0 siblings, 1 reply; 6+ messages in thread
From: Niklaus @ 2006-06-26 13:03 UTC (permalink / raw)
To: Niklaus, gdb
On 6/24/06, Daniel Jacobowitz <drow@false.org> wrote:
> On Sat, Jun 24, 2006 at 05:19:04PM +0600, Niklaus wrote:
> > 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 most important thing in a bug report is being specific. Please
> show us a complete log of the GDB session.
>
pro@deb:~/armenv/bin$ ./arm-elf-gdb first.o
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=arm-elf"...
(gdb) target sim
Connected to the simulator.
(gdb) list
1
2 int main()
3 {
4 int i=3;
5 while(i<10){
6 i++;
7 }
8 return i;
9 }
(gdb) b 6
Breakpoint 1 at 0x1c: file first.c, line 6.
(gdb) load first.o
Loading section .text, size 0x40 vma 0x0
Start address 0x0
Transfer rate: 512 bits in <1 sec.
(gdb) run
Starting program: /home/pro/armenv/bin/first.o
after 2 mins or so i interrupt with a Ctrl-C
Program received signal SIGINT, Interrupt.
0xf26ed660 in ?? ()
(gdb)
Sometimes when i ran it sometime back i got " Unhandled v6 thumb
insn: e92d", i am not sure why i got this. But at that time path was
not exported properly.when i export it goes into infinite loop as show
above.
> > 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
>
> The MIPS simulator can not run Linux binaries.
>
> --
> Daniel Jacobowitz
> CodeSourcery
>
^ permalink raw reply [flat|nested] 6+ messages in thread* Re: arm-elf and mips-deb-linux gdb
2006-06-26 13:03 ` Niklaus
@ 2006-06-26 14:55 ` Daniel Jacobowitz
2006-06-26 14:56 ` Niklaus
0 siblings, 1 reply; 6+ messages in thread
From: Daniel Jacobowitz @ 2006-06-26 14:55 UTC (permalink / raw)
To: Niklaus; +Cc: gdb
Thanks. This is why I asked for a complete transcript - now it is
apparent what is wrong.
On Mon, Jun 26, 2006 at 04:42:43PM +0600, Niklaus wrote:
> pro@deb:~/armenv/bin$ ./arm-elf-gdb first.o
You have to run the simulator using fully linked executables, not just
object files. See the linker scripts that are part of newlib.
--
Daniel Jacobowitz
CodeSourcery
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: arm-elf and mips-deb-linux gdb
2006-06-26 14:55 ` Daniel Jacobowitz
@ 2006-06-26 14:56 ` Niklaus
2006-06-26 15:00 ` Daniel Jacobowitz
0 siblings, 1 reply; 6+ messages in thread
From: Niklaus @ 2006-06-26 14:56 UTC (permalink / raw)
To: Niklaus, gdb
On 6/26/06, Daniel Jacobowitz <drow@false.org> wrote:
> Thanks. This is why I asked for a complete transcript - now it is
> apparent what is wrong.
>
> On Mon, Jun 26, 2006 at 04:42:43PM +0600, Niklaus wrote:
> > pro@deb:~/armenv/bin$ ./arm-elf-gdb first.o
>
> You have to run the simulator using fully linked executables, not just
> object files. See the linker scripts that are part of newlib.
>
Can you tell why it fails . I would like to know the reason why it
fails. Which linker script would you recommend.
> --
> Daniel Jacobowitz
> CodeSourcery
>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: arm-elf and mips-deb-linux gdb
2006-06-26 14:56 ` Niklaus
@ 2006-06-26 15:00 ` Daniel Jacobowitz
0 siblings, 0 replies; 6+ messages in thread
From: Daniel Jacobowitz @ 2006-06-26 15:00 UTC (permalink / raw)
To: Niklaus; +Cc: gdb
On Mon, Jun 26, 2006 at 06:28:53PM +0530, Niklaus wrote:
> On 6/26/06, Daniel Jacobowitz <drow@false.org> wrote:
> >Thanks. This is why I asked for a complete transcript - now it is
> >apparent what is wrong.
> >
> >On Mon, Jun 26, 2006 at 04:42:43PM +0600, Niklaus wrote:
> >> pro@deb:~/armenv/bin$ ./arm-elf-gdb first.o
> >
> >You have to run the simulator using fully linked executables, not just
> >object files. See the linker scripts that are part of newlib.
> >
> Can you tell why it fails . I would like to know the reason why it
> fails. Which linker script would you recommend.
I don't know anything about building for arm-elf; you'll have to ask
somewhere else.
It fails because your application has not been linked. It doesn't have
startup code, it doesn't have relocations applied. The simulator has
probably branched off into nowhere.
--
Daniel Jacobowitz
CodeSourcery
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2006-06-26 13:03 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-06-24 13:08 arm-elf and mips-deb-linux gdb Niklaus
2006-06-24 13:30 ` Daniel Jacobowitz
2006-06-26 13:03 ` Niklaus
2006-06-26 14:55 ` Daniel Jacobowitz
2006-06-26 14:56 ` Niklaus
2006-06-26 15:00 ` Daniel Jacobowitz
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox