How to use the e-gdb

Any technical questions about the Epiphany chip and Parallella HW Platform.

Moderator: aolofsson

How to use the e-gdb

Postby Richardye » Tue Sep 08, 2015 7:24 am

Hello Everyone,

I am new to the Epiphany and I got some troubles in debugging the program. Assuming I have got one .elf file which is the executable file of the host side, I follow the steps from the manuals. Just as followed.

e-gdb main.elf
(gdb) target sim
(gdb) load
(gdb) run

But e-gdb always gives out the result "core: 2 byte misaligned read to address 0x8861 at 0x8861
Program received signal SIGBUS, Bus error.”


And what bothers me is that no matter what .elf file used, even the simplest one from hello-world, e-gdb still gives me the same result. Hope anyone of you could help with that ! Otherwise it is too hard for me to debug the program. Thank you very much !
Richardye
 
Posts: 8
Joined: Mon Sep 07, 2015 6:30 pm

Re: How to use the e-gdb

Postby sebraa » Tue Sep 08, 2015 12:31 pm

The ELF-file which is runnable on the host needs to be run through "gdb" (which is the debugger for the host).
The ELF-file which is runnable on the Epiphany needs to be run through "e-gdb" (which is the debugger for the Epiphany).

Otherwise your Epiphany (or Epiphany simulator) tries to execute ARM code, which will fail sooner or later.
sebraa
 
Posts: 495
Joined: Mon Jul 21, 2014 7:54 pm

Re: How to use the e-gdb

Postby Richardye » Tue Sep 08, 2015 3:38 pm

Hello Sebraa,

Thank you for you reply ! So you mean that I should use gdb to debug the program on the host side and e-gdb for the epiphany side ?

Here comes another question, since my host part code will put data into the epiphany cores and the cores will process these data. Do you know how to put the data in my epiphany cores before debug the epiphany side code?

Really thank you for your reply !

Richard
Richardye
 
Posts: 8
Joined: Mon Sep 07, 2015 6:30 pm

Re: How to use the e-gdb

Postby sebraa » Tue Sep 08, 2015 7:14 pm

The host application is executed on the host, so you need to use the host debugger (gdb).
For e-gdb, I don't know, since we never used it. It might be that e-gdb is related to Epiphany simulator.

I tend to write code without a debugger (and use printf-style debugging, or magic numbers in case of Epiphany).
sebraa
 
Posts: 495
Joined: Mon Jul 21, 2014 7:54 pm


Return to Epiphany and Parallella Q & A

Who is online

Users browsing this forum: No registered users and 8 guests

cron