Forum Replies Created
-
AuthorPosts
-
hfrmobileParticipant
Nope.
qDebug() << “One”;
qDebug() << “Two”;
qDebug() << “Three”;Sometimes:
One
TwoThree
other times:
OneTwo
Three
etc.
To put this in other words: “Someone else” must print the blank lines …
- This reply was modified 7 years, 8 months ago by hfrmobile.
January 18, 2017 at 15:04 in reply to: How/where to provide command line parameter of app do debug? #10116hfrmobileParticipantTo be more accurate: VisualGDB Project Properties -> Debug Settings
Start GDB in the following mode: Debug a new instance
Debugged executable: $(TargetPath)
Main executable arguments: -p1 -p2The cause why I asked was that didn’t find because it really was not visible because my “Start GDB in the following Mode” was set to custom. In that case, no arguments can be provided.
Anyway, problem solved.
hfrmobileParticipantJust found out that the issue is not related to “VS solution folders” since the problem also occurs within VS project/solution without.
Even when I delete the Debug folder on the build host to force re-creation of ui_MainWindow.h, moc_MainWindow.cpp/.o etc. the ui_MainWindow.h file still does not contain code for newly added controls.
I found out that I have to delete the ui_MainWindow.h file from the Windows machine to force recreation since Qt Designer doesn’t do this for me … Doing this in a custom action automatically now and it works fine.
Not sure why this is happening. Must be the “part” responsible for creating the ui_MainWindow.h file … “Qt UI Compiler” … but why is this happening on the Windows machine and not the build host (Ubuntu)?
hfrmobileParticipantFYI: when changing the directory to /tmp/VisualGDB/c/Development/xxx/trunk/Proj/xxx it is automatically changed to $(DeployDir)/VisualGDB/c/Development/xxx/trunk/Proj/xxx
hfrmobileParticipantThank you for your response!
This is happening to me even when Working Directory is not empty and contains a valid value:
$(DeployDir)/VisualGDB/c/Development/xxx/trunk/Proj/xxx
I do verify the correctness of the directory by opening the “Folder Browser” which then points to the correct directory on the remote machine.
The bash script runs on the remove machine correctly. But when opening the “Edit Custom Action” dialog the “Remote Machine” field is empty (when hitting Cancel – everything works fine; when hitting OK then the remote machine setting will be overwritten by “blank value”.
How can I avoid that the “Remote Machine” will be emptied when opening the “Edit Custom Action” dialog?
hfrmobileParticipantBtw, the forum has also a bug: Sometimes it shows the HTML code instead of doing it (e.g. underline text – see above).
hfrmobileParticipantMy .pro file contains the correct path to the MainWindow.ui file.
The above structure is only in Visual Studio (on file system its the same – so the paths are correct).
To put this in other words for my sample: myapp1.pro, .ui etc. are on the same place on disk.
FYI: https://msdn.microsoft.com/en-us/library/haytww03(v=vs.100).aspx
hfrmobileParticipantFound following issue with VisualGDB: When the project resides within a “solution folder” than it doesn’t work.
this works:
myapp1.sln myapp1.pro
this fails:
all.sln SolutionFolder1 myapp1.pro myapp2.vcproj SolutionFolder2 myapp3.pro
Since I am working on a larger project I like to organize my “sub-projects” within one VS solution.
- This reply was modified 7 years, 10 months ago by hfrmobile.
hfrmobileParticipantInstalled and configured Win32 Qt and Qt Add-in for Visual Studio. Now I am able to use the Qt Designer to design the UI (MainWindows.ui file).
But MainWindows.cpp and ui_MainWindows.h are not updated and so I don’t see the changes on the target display.
hfrmobileParticipantAfter adding -O0 to the “Common flags” (Debug target) and a rebuild the problem is gone!
hfrmobileParticipantThanks for your reply.
Can’t ask the Qt forums since my question is related to VisualGDB because:
In the Linux project wizard I can choose “Application (executable file)”:
- Use MSBuild
- Use GNU Make
- Use CMake
- Use Qt
I have chosen “Qt” for one project and “GNU Make” for the other.
<span style=”text-decoration: underline;”>Background:</span> I share some sources between the two VisualGDB projects (one with Qt, the other without).
For the moment I’ve added a preprocessor macro QT_PRESENCE to the VisualGDB settings and in the shared header/source files I do something like this:
#ifdef QT_PRESENCE #include "Something that is using Qt" #endif
To put my question in other words: How can I determine the “application type”?
hfrmobileParticipantHi,
thank you for your help! Since we already have a “special cross-compiled build of Qt” (provided by our hardware manufacturer) I simply needed to provide the path to the correct qmake version.
Thank you for the offer anyway!
Everything now works as expected. 🙂
hfrmobileParticipantOkay, that explains a lot 😉
“Exec format error”: Yes, but the “GDB Session failed to start” says:
~”This GDB was configured as \”–host=i686-pc-linux-gnu –target=arm-buildroot-linux-gnueabi\”.\nType \”show configuration\” for configuration details.”
So on the build server (virtual Ubuntu machine is x86 and the binary can be executed and works – displaying Window with a button on it – when clicking the button displaying a message box). But I don’t know how to launch the binary on the Linux Embedded device.
Used the Wizard as suggested but selected Qt4 since I have to use Qt. The board has a display attached. A small demo project already runs on the board displaying a white screen with a button on it.
Just tried the “C++ Hello world” (so exactly the same as in the tutorial) and this works!
So it seems that Qt4 causes the problem …. (used the same custom Toolchain)- This reply was modified 7 years, 10 months ago by hfrmobile.
hfrmobileParticipantadditional info: the built binary/executable works on the Linux Desktop (build host) machine but can’t execute/debug it on the target (board).
hfrmobileParticipantLicense received 🙂
Did the tutorial as suggested. I am a bit confused. Why Linux project and not “Linux embedded”? I am quite new to the Linux world and I thought that the (executable) binaries on desktop (e.g. Ubuntu) differ from the Embedded Linux? (my idea: .elf (executable file format) is for embedded?). If this is wrong, why there are different Wizards for “Linux” and “Embedded” projects?
The deployment works so far (finding the executable binary on the Linux Embedded board) but debugging fails.
-rwxr--r-- 1 root root 398968 Dec 29 2016 pw2clb
My project differs from the tutorial since I like to use Qt, so I’ve chosen “Qt4” when the Wizard asked me.
GDB log:
Thank you for your purchase. Your license details will be loaded and shown in the next 24-48 hours. f4: gdbserver exited with code 1 at gh1.b1() at gh1.c_2(DebugCustomizationSettings a) at uf1.v1() at VisualGDB.GDBDebugEngine.j1(g01 b, f a)
GDBServer log:
Process /tmp/pw2clb created; pid = 723 Cannot exec /tmp/pw2clb: Exec format error. Child exited with status 127 No program to debug. GDBserver exiting.
Found another thread with a similar problem but without solution.
As the log says “Exec format error” is the problem in my case ….
- This reply was modified 7 years, 10 months ago by hfrmobile.
-
AuthorPosts