Author Topic: programming/ debbuging on a remote machine  (Read 4729 times)

bremenpl

  • Community Member
  • Posts: 85
  • Hero Points: 0
  • Electrical Engineer
programming/ debbuging on a remote machine
« on: July 09, 2013, 03:18:50 pm »
Hello there,
I was wondering if this situation is possible:

Writing application in slickedit on a linux/ windows computer, but compiling, running and debbuging using another pc thats in LAN. That would be very usefull for a raspberry pi. Now i have to copy the code from my pc and compile + run it manualy on raspberry pi. And i cannot debug really.
Also for the autocomlete i would have to have the same librarys on the main pc as raspberry pi i believe. Thats more of a problem because windows doesnt have gcc. But are the cygwin/ mingw libs compatibile?

Any help, would be aprichiated :).
« Last Edit: July 09, 2013, 03:21:32 pm by bremenpl »

chrisant

  • Senior Community Member
  • Posts: 1410
  • Hero Points: 131
Re: programming/ debbuging on a remote machine
« Reply #1 on: July 09, 2013, 06:00:08 pm »
I'm not sure what the question is.

Is the question how to copy source code from the "editing" computer onto the raspberry pi?
Or is it how to copy the gcc header files onto the "editing" computer and make a compiler tag file from them so that autocomplete works in SE on the "editing" computer?
Or something else?

bremenpl

  • Community Member
  • Posts: 85
  • Hero Points: 0
  • Electrical Engineer
Odp: programming/ debbuging on a remote machine
« Reply #2 on: July 09, 2013, 06:39:15 pm »
Hi thank you for answer. No the problem lies elsewhere. The way u described it i can accomplish now. What i need to do is add a remote build/ debbug target so i can write the cose in slickedit on main pc but when i hit build or debug its being done in slickedit but via raspberry pi, and actually on raspverry pi.

Im pretty shure thats doable in eclipse. Im not sure if the operating systems shuld match ie linux - linux

Bremenpl


hs2

  • Senior Community Member
  • Posts: 2752
  • Hero Points: 291
Re: programming/ debbuging on a remote machine
« Reply #3 on: July 09, 2013, 11:06:30 pm »
Or doing Windows PC local editing but with the source tree exported as an SMB share, mounted by the remote Linux target and invoking build commands over ssh ?
In this case there are some related postings in the forums. Try a search for 'putty', 'plink', 'ssh' etc.
In addition you can also edit remote files using the built-in FTP client.
HS2

bremenpl

  • Community Member
  • Posts: 85
  • Hero Points: 0
  • Electrical Engineer
Odp: programming/ debbuging on a remote machine
« Reply #4 on: July 10, 2013, 02:35:10 am »
That basically gives me what i have now and doesnt solve debbuging.

Bremenpl


Dennis

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 3226
  • Hero Points: 459
Re: programming/ debbuging on a remote machine
« Reply #5 on: July 10, 2013, 03:34:30 pm »
To get going with debugging, you need to start a gdbserver process on your remote machine.  You should be able to get this started using an ssh and the right scripting on the Raspberry Pi machine.  Then use Debug > Attach GDB > Attach To Remote Process...

You are probably also going to need a cross-compiled GDB that supports your remote machine's processor architecture.  In your case, you can get that here, if you don't already have it.
http://gnutoolchains.com/raspberry/

In SlickEdit, you can go to Debug > Debugger Options... > GDB Configurations... to point SlickEdit at the ARM GDB.  You will need that to attach to the remote process.

As hs2 and chrisant have pointed out, remote debugging has been hashed over in the forums numerous times, if you need further guidance.  No point in rehashing everything again.

bremenpl

  • Community Member
  • Posts: 85
  • Hero Points: 0
  • Electrical Engineer
Odp: programming/ debbuging on a remote machine
« Reply #6 on: July 10, 2013, 04:02:06 pm »
Wasnt mynintention to redig topics. I just didnt kbow that it can be done like that. Thank you.

Bremenpl


Graeme

  • Senior Community Member
  • Posts: 2515
  • Hero Points: 327
Re: programming/ debbuging on a remote machine
« Reply #7 on: July 11, 2013, 12:49:31 pm »
As hs2 and chrisant have pointed out, remote debugging has been hashed over in the forums numerous times, if you need further guidance.  No point in rehashing everything again.

chrisant didn't say anything about remote debugging.  hs2 didn't really either.
However, if you do search for "remote debugging" you can find this
http://community.slickedit.com/index.php/topic,3884.msg16257.html#msg16257

So perhaps it would be worth adding information like this to the slickedit help file or having a wiki for slickedit.
 

bremenpl

  • Community Member
  • Posts: 85
  • Hero Points: 0
  • Electrical Engineer
Re: programming/ debbuging on a remote machine
« Reply #8 on: July 11, 2013, 12:52:36 pm »
Yes i believe i need to take similar steps as i took when set debbuging on an ARM microcontroller through slickedit, but the difference is that the gdb server was handled by the debbuging tool (in my situation jlink).

Ill try to set that server on my raspberry pi. Thank you for help again :).

bremenpl

  • Community Member
  • Posts: 85
  • Hero Points: 0
  • Electrical Engineer
Re: programming/ debbuging on a remote machine
« Reply #9 on: July 13, 2013, 04:14:15 pm »
Hi there guys, I menaged to work out running an application in slickedit that is actually on the raspberry pi. The problem lies with debbuging. Im am trying to backengineer the steps showed here: http://hertaville.com/2013/01/11/remote-debugging/

When i try to debug, im getting this error:
Errors stepping: GDB could not step application
"Cannot find bounds of current function"

I belive a .gdbinit file would do, but i have no idea how to write one. Could anyone help me please?

EDIT:

I actually am abble to debug, i just have to go to the first breakpoint manually. I start the debbuger then click "continue untill the line curson is on" and that makes me stop in the first break point. In that case, could anyone help me with finsing a command to place in .gdb file so when the debug starts it will automatically stop at 1sy breakpoint?
« Last Edit: July 13, 2013, 04:33:49 pm by bremenpl »