WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: Using Eclipse Remote System debugging  (Read 3978 times)

Offline medvedm

  • Newbie
  • *
  • Posts: 48
Using Eclipse Remote System debugging
« on: August 19, 2010, 04:15:58 PM »
Hi, all!

I'm trying to use the Eclipse Remote System stuff to download and debug a program on a tinycore linux install (currently in a virtualbox, eventually to be installed on actual hardware).  I've put openssh on the box and got that setup and working correctly (in RSE I can connect and use a terminal).

However, I can't run or debug programs through the Eclipse remote system stuff.  My program is in C++ and I have the gdb package installed on the TC system as well.

Anyone ever try this?  I'd really like to use TC as a base for my embedded system build, but I need to make these tools work.

M

Offline medvedm

  • Newbie
  • *
  • Posts: 48
Re: Using Eclipse Remote System debugging
« Reply #1 on: August 19, 2010, 04:18:02 PM »
BTW, just for info, I'm running Ubuntu on my host (where the Eclipse stuff resides).

Offline killthebabysitter

  • Newbie
  • *
  • Posts: 10
Re: Using Eclipse Remote System debugging
« Reply #2 on: November 05, 2010, 08:49:59 AM »
I've got mine working.... Sometimes.....

Create your RSE connection SSH only.
Then Create your Remote Debug configuration.
Select your connection under the Connection: pulldown
Select your binary under C/C++ Application ie. /Debug/helloworld
Set remote file path /home/tc/Debug/helloworld
Set commands to execute before application sudo chmod 777 /home/tc/Debug/helloworld

That should work in theory. This is a common method I use for debugging on other linux distros.

BUT! There is a problem that happens sometimes. I believe it is caused by the current openssh package that hoses RSE when the SSH server send the message of the day which causes Eclipse to get confused and not issue the commands at the command prompt, rather issuing them in the middle of the message of the day.

Hope this gets you somewhere, I'm going to try and install the debian package of openssh to see if that fixes this issue completely.

Offline medvedm

  • Newbie
  • *
  • Posts: 48
Re: Using Eclipse Remote System debugging
« Reply #3 on: November 12, 2010, 12:15:43 PM »
I can't debug anything.  I get a message something like this:

echo $PWD'>'
sudo su;gdbserver :2345 /home/tc/Debug/HelloWorld;exit
 (�-
 //\  Tiny Core is distributed with ABSOLUTELY NO WARRANTY.
 v_/_           www.tinycorelinux.com

 (�-
 //\  Tiny Core is distributed with ABSOLUTELY NO WARRANTY.
 v_/_           www.tinycorelinux.com

tc@box:~$


and then it fails.

Offline killthebabysitter

  • Newbie
  • *
  • Posts: 10
Re: Using Eclipse Remote System debugging
« Reply #4 on: November 15, 2010, 12:34:53 PM »
Yep, it's a problem with the SSH TCE. It prints the message of the day twice which hose eclipse. I had to build and install openssh from source to fix it.

If I get the time I'll create a new TCE of an updated working openssh.

Offline medvedm

  • Newbie
  • *
  • Posts: 48
Re: Using Eclipse Remote System debugging
« Reply #5 on: November 16, 2010, 02:01:08 PM »
What version of OpenSSH did you use?

Offline medvedm

  • Newbie
  • *
  • Posts: 48
Re: Using Eclipse Remote System debugging
« Reply #6 on: December 09, 2010, 09:12:10 AM »
So I actually get rid of the motd file and things work better... except that my program gives a Segmentation fault.  It runs totally fine if I just run it on the target, but I have no freaking way to debug this program remotely.  What a pain in my butt.

I even uninstalled the most recent version of gdb from my Ubuntu box to load 6.8 so it would match the version of gdbserver available for TC (tried compiling 7.2 for TC with no luck and lots of linker errors).