How to debug rtems on ZedBoard
xuelin.tian at qkmtech.com
xuelin.tian at qkmtech.com
Thu Jan 14 04:38:08 UTC 2016
Hi all, I'm recently working on a project on Zynq platform. And now I get stuck at how to debug tasks on my board. Connecting to Zynq via OpenOCD or Xilinx XMD works fine, but when I move to next step---debug tasks using GDB, something goes wrong.
In this case, I may connect to a wrong target...
root at ubuntu:/home/Development/examples-v2-master/hello/hello_world_c/o-optimize# arm-rtems4.11-gdb hello.exe
GNU gdb (GDB) 7.9
Copyright (C) 2015 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "--host=x86_64-linux-gnu --target=arm-rtems4.11".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from hello.exe...done.
(gdb) target remote localhost:1239
Remote debugging using localhost:1239
0xffffff28 in ?? ()
(gdb) load
Loading section .start, size 0x3ec lma 0x104000
Loading section .text, size 0xd040 lma 0x104400
Loading section .init, size 0xc lma 0x111440
Loading section .fini, size 0xc lma 0x11144c
Loading section .rodata, size 0xc6c lma 0x111458
Loading section .ARM.exidx, size 0x8 lma 0x1120c4
Loading section .eh_frame, size 0x74 lma 0x1120cc
Loading section .init_array, size 0x4 lma 0x112140
Loading section .fini_array, size 0x4 lma 0x112144
Loading section .jcr, size 0x4 lma 0x112148
Loading section .rtemsroset, size 0x20 lma 0x11214c
Loading section .data, size 0x660 lma 0x201400
Start address 0x104040, load size 59320
Transfer rate: 14 KB/sec, 94 bytes/write.
(gdb) r
The "remote" target does not support "run". Try "help target" or "continue".
(gdb) exit
Undefined command: "exit". Try "help".
And this time, everything goes well before some internal errors comes up...root at ubuntu:/home/Development/examples-v2-master/hello/hello_world_c/o-optimize# arm-rtems4.11-gdb -e hello.exe
GNU gdb (GDB) 7.9
Copyright (C) 2015 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "--host=x86_64-linux-gnu --target=arm-rtems4.11".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word".
(gdb) l
No symbol table is loaded. Use the "file" command.
(gdb) target extended-remote localhost:1239
Remote debugging using localhost:1239
warning: Remote failure reply: E01
qTStatus: Target returns error code '01'.
warning: Remote failure reply: E01
warning: Remote failure reply: E01
Remote failure reply: E01
(gdb) target extended-remote localhost:1240
Remote debugging using localhost:1240
0x1ff93900 in ?? ()
(gdb) load
Loading section .start, size 0x3ec lma 0x104000
Loading section .text, size 0xd040 lma 0x104400
Loading section .init, size 0xc lma 0x111440
Loading section .fini, size 0xc lma 0x11144c
Loading section .rodata, size 0xc6c lma 0x111458
Loading section .ARM.exidx, size 0x8 lma 0x1120c4
Loading section .eh_frame, size 0x74 lma 0x1120cc
Loading section .init_array, size 0x4 lma 0x112140
Loading section .fini_array, size 0x4 lma 0x112144
Loading section .jcr, size 0x4 lma 0x112148
Loading section .rtemsroset, size 0x20 lma 0x11214c
Loading section .data, size 0x660 lma 0x201400
Start address 0x104040, load size 59320
Transfer rate: 8 KB/sec, 94 bytes/write.
(gdb) r
The program being debugged has been started already.
Start it from the beginning? (y or n) y
../../gdb-7.9/gdb/thread.c:89: internal-error: inferior_thread: Assertion `tp' failed.
A problem internal to GDB has been detected,
further debugging may prove unreliable.
Quit this debugging session? (y or n) y
This is a bug, please report it. For instructions, see:
<http://www.gnu.org/software/gdb/bugs/>.
../../gdb-7.9/gdb/thread.c:89: internal-error: inferior_thread: Assertion `tp' failed.
A problem internal to GDB has been detected,
further debugging may prove unreliable.
Create a core file of GDB? (y or n) y
Aborted (core dumped)
Any hints on this? Thank you.
Best,TianQ.K.M Technology Co., Ltd.xuelin.tian at qkmtech.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/users/attachments/20160114/cd929af4/attachment.html>
More information about the users
mailing list