Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » C / C++ IDE (CDT) » Cross-debugging large program using eclipse via TCP and gdbserver
Cross-debugging large program using eclipse via TCP and gdbserver [message #1799444] Thu, 06 December 2018 20:29 Go to next message
Robert Murch is currently offline Robert MurchFriend
Messages: 13
Registered: August 2018
Junior Member
Hey guys, okay well up until this point I have only ever "debugged" by using the guess and check method. Essentially, this method has exhausted itself and I need a more detailed method of debugging.

A little background:

The application is rather large. There are approximately 100+ cpp files involved. The application is embedded on an arm processor and I am communicating with the target via a serial connection. For development purposes I have created a directory for the target to run off of on my local machine @ /exports/lonepeak instead of having it run as a stand-alone system. I can run the application from a serial port terminal by navigating to /etc/init.d and running S95-lonepeak-suite. I hope this all makes sense.

Currently I have the program building in Eclipse and I am communicating with the device via gdbserver. I already have a connection setup and debugging seems to be working to some extent:
# gdbserver host:10000 S95-lonepeak-suite
Process S95-lonepeak-suite created; pid = 1910
Listening on port 10000
Remote debugging from host 10.12.1.77


I am using GDB (DSF) Manual Remote Debugging and the debugger is gbd-multiarch. One of the options: 'Stop on startup at:' I currently have unchecked. I thought I would just set a break-point somewhere in my code in the hopes that it would stop there.

The problem:

In Debug view there is a 'Debug' tab that opens next to 'Project Explorer' tab. Here I have a drop down list with a few sub-lists. For some reason one of them is called 'Unknown name[]' then under that is one labeled: 'Thread #1 2114 (Suspended: Error: Command aborted.) and below it are what seems to be two memory locations. Now if if I click 'Step Return' the label changes too: 'Thread#1 2114(Running : Step)' which is a sub list of lonepeak (great!) but all of the step options are no longer clickable (not great).

I guess the problem I am having is that I don't really know what I am doing. As I said this is the first time I have tried debugging this application in this way. What I thought would happen is that once I hit 'debug' it would simply run the program up until my breakpoint and fill up the variables tab with some relevant information. I figured I could step through the rest of the program from there and what-have-you. So I guess my question is: how do I go about debugging this program? For instance, if I set a break-point at line 7 of:

  void ToolsViewConsoleAbout_MainPage::updateBpaVerInfo()
  {
    m_bpaVerInfo = QLatin1String("");

    if (TJM::bpa().haveDevice())
    {
      m_bpaVerInfo = makeVersionString(TJM::bpa().firmwareVersion(),
                                       TJM::bpa().protocolVersion(),
                                       TJM::bpa().haveCompatibleDevice());
    }

    retranslateDeviceInfo();
  }


How can I fill the variables box with information about m_bpaVerInfo and then step through the process of creating that variable?

Maybe I need to be able to run the application from within Eclipse?

[Updated on: Thu, 06 December 2018 21:27]

Report message to a moderator

Re: Cross-debugging large program using eclipse via TCP and gdbserver [message #1799508 is a reply to message #1799444] Fri, 07 December 2018 20:54 Go to previous messageGo to next message
Anne Creek is currently offline Anne CreekFriend
Messages: 275
Registered: September 2014
Senior Member
Take a look at TCF ( Target Communication Framework) .
I am using it to cross compile my C++ code with Eclipse to be used on ARM target.
To be honest , IMO , TCF has very limited , almost non-existent support, but it has decent "target debugging" options.
It uses TCP/IP and I have used both wired (Ethernet) and wireless (WiFi) methods to communicate between the host and target.
The worst part - the installation and usage documentation is terrible.
I'll be happy to assist if you decide to "give it a go".




Re: Cross-debugging large program using eclipse via TCP and gdbserver [message #1800001 is a reply to message #1799508] Tue, 18 December 2018 18:24 Go to previous message
lbachir ugemad is currently offline lbachir ugemadFriend
Messages: 1
Registered: December 2018
Junior Member
Anne Creek wrote on Fri, 07 December 2018 20:54
Take a look at TCF ( Target Communication Framework) .
I am using it to cross compile my C++ code with Eclipse to be used on ARM target.
To be honest , IMO , TCF has very limited , almost non-existent support, but it has decent "target debugging" options.
It uses TCP/IP and I have used both wired (Ethernet) and wireless (WiFi) methods to communicate between the host and target.
The worst part - the installation and usage documentation is terrible.
I'll be happy to assist if you decide to "give it a go".





I am using GDB (DSF) Manual Remote Debugging and the debugger is gbd-multiarch. One of the options: 'Stop on startup at:' I currently have unchecked. I thought I would just set a break-point somewhere in my code in the hopes that it would stop there.
Previous Topic:Delete Line
Next Topic:Problem using Eclipse C++ IDE for Arduino
Goto Forum:
  


Current Time: Sat Apr 20 01:55:21 GMT 2024

Powered by FUDForum. Page generated in 0.03138 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top