This is the mail archive of the crossgcc@sourceware.cygnus.com mailing list for the crossgcc project.

See the CrossGCC FAQ for lots more infromation.


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

About using GDB with target ARM simulator


   I've built crossgcc for target arm-linux and gdb for target arm-elf. (couldn't match the two targets for some reasons but i thought it wouldn't matter. I couldn't find any difference between them. Is there any difference?)
   I tried a simple example for debugging with gdb target as simulator and gdb ignores the breakpoints as follows. I'll appreciate any kind of advice. Thanks in advance.

$ arm-linux-gcc -g foo.c -o foo
$ arm-elf-gdb 
GNU gdb 4.18
Copyright 1998 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) file foo
Reading symbols from foo...done.
(gdb) target sim
Connected to the simulator.
(gdb) load foo
Loading section .interp, size 0x27 vma 0x20000f4
Loading section .note.ABI-tag, size 0x20 vma 0x2000120
Loading section .hash, size 0x24 vma 0x2000140
Loading section .dynsym, size 0x40 vma 0x2000164
Loading section .dynstr, size 0x3c vma 0x20001a4
Loading section .gnu.version, size 0x8 vma 0x20001e0
Loading section .gnu.version_r, size 0x20 vma 0x20001e8
Loading section .rel.plt, size 0x10 vma 0x2000208
Loading section .init, size 0x18 vma 0x2000218
Loading section .plt, size 0x30 vma 0x2000230
Loading section .text, size 0x350 vma 0x2000260
Loading section .fini, size 0x14 vma 0x20005b0
Loading section .rodata, size 0x4 vma 0x20005c4
Loading section .data, size 0xc vma 0x20085c8
Loading section .ctors, size 0x8 vma 0x20085d4
Loading section .dtors, size 0x8 vma 0x20085dc
Loading section .got, size 0x14 vma 0x20085e4
Loading section .dynamic, size 0x88 vma 0x20085f8
Start address 0x2000260
Transfer rate: 11320 bits in <1 sec.
(gdb) list main
1 int main()
2 {
3 int a=27;
4 int b=4;
5 int c;
6 c=a*b;
(gdb) 
7 c=a%b;
8 c=a/b;
9 }
(gdb) br 7
Breakpoint 1 at 0x200036c: file foo.c, line 7.
(gdb) run
Starting program: /home/totohero/test/foo 

Program exited with code 074.
(gdb) quit


-----------------
Lim, Sung-taek
totohero@poppy.snu.ac.kr
http://poppy.snu.ac.kr/~totohero/


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