This is the mail archive of the gdb@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

How to use arm-elf-gdb


Hi everyone!
I'm a new user of arm-elf-gdb, but I have not made it work till now. I went through like this.
at first I got a .elf file to debug. hello.c is very simple and not call any lib funcion.
$ arm-elf-gcc -g -o hello.elf hello.c
$ arm-elf-gdb hello.elf
GNU gdb 5.0
Copyright 2000 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-linux --target=arm-elf"...
(gdb) target sim
Connected to the simulator.
(gdb) load
Loading section .interp, size 0x13 vma 0x80480f4
Loading section .note.ABI-tag, size 0x20 vma 0x8048108
Loading section .hash, size 0x30 vma 0x8048128
Loading section .dynsym, size 0x70 vma 0x8048158
Loading section .dynstr, size 0x8e vma 0x80481c8
Loading section .gnu.version, size 0xe vma 0x8048256
Loading section .gnu.version_r, size 0x30 vma 0x8048264
Loading section .rel.got, size 0x8 vma 0x8048294
Loading section .rel.plt, size 0x20 vma 0x804829c
Loading section .init, size 0x18 vma 0x80482bc
Loading section .plt, size 0x50 vma 0x80482d4
Loading section .text, size 0x170 vma 0x8048330
Loading section .fini, size 0x1e vma 0x80484a0
Loading section .rodata, size 0x8 vma 0x80484c0
Loading section .data, size 0x10 vma 0x80494c8
Loading section .eh_frame, size 0x4 vma 0x80494d8
Loading section .ctors, size 0x8 vma 0x80494dc
Loading section .dtors, size 0x8 vma 0x80494e4
Loading section .got, size 0x20 vma 0x80494ec
Loading section .dynamic, size 0xa0 vma 0x804950c
Start address 0x8048330
Transfer rate: 9544 bits in <1 sec.
(gdb) run
Starting program: /home/bianhz/tmp/hello 


But then the screen was frozen and the program was running not to stop.
Even if I set a breakpoint before run, the problem is same.
Who can tell me the reason why I can't make it work?
Does the simulor need to config?

Thanks in advance.



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