Cross-debugging large program using eclipse via TCP and gdbserver [message #1799444] |
Thu, 06 December 2018 20:29 |
Robert Murch 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
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.03138 seconds