NetBeans Forums

 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
  

Cross-compiling and remote debugging

 
Post new topic   Reply to topic    NetBeans Forums -> C/C++ Users
View previous topic :: View next topic  
Author Message
Abbott



Joined: 13 Jul 2017
Posts: 1

PostPosted: Mon Jul 24, 2017 5:56 pm    Post subject: Cross-compiling and remote debugging Reply with quote

Hi,

I am trying to set up a coding environment where I can code and cross-compile with NetBeans on a development machine, but debug the program on a remote machine. I have set up a cross-compiling toolchain that seems to work fine, but I am having problems getting debugging to work how I want it to. I changed the run command to a small shell script:
Code:

#!/bin/sh
scp done/app root@169.254.174.111:~
ssh root@169.254.174.111 gdbserver --debug :6000 /root/app

Which copies the compiled project to the target machine, then runs the app with gdbserver attached to it. Then, I can use the gdbserver plugin to attach to the gdbserver running on the target machine.

With this setup, I am able to set breakpoints in NetBeans on the development machine, and they stop the program running on the target machine correctly. The problem is that I don't get any of the output from the compiled project, only the output of gdbserver. This setup also does not exit nicely. Sometimes gdbserver is still running after execution, and other times it exits properly, but NetBeans still thinks the program is running.

Am I doing something wrong? Is there a better way to do this?

Thank you,
Abbott
Back to top
Display posts from previous:   
Post new topic   Reply to topic    NetBeans Forums -> C/C++ Users All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB
By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo