Qt creator 2.4.1 cannot debug the very simple c++ code "Don't know how to attach"
-
Btw, I am mildly annoyed by the attitude. This is not the place for random ramblings about operating systems, nor about unnamed bugs in Qt. If you have a bug to report, go to bugreports.qt-project.org. This exists for a reason.
-
your suggestion didn't work so far.
to answer your question, i don't know which place you live, even it's a big company, still tight schedule, lots of work to do to get the paycheck. then have kid to take care at home.
i need to work from device drivers, application, all the way up to the web.
now you tell me i have spend extra time to figure out why debugger is not working,
you think the manager will buy into it ?QTCreator doesn't give me any clue where to go from that error.
i have to post question here, then you guys give me links to follow.your attitude is: you should know this, you should know that.
This is most linux guys's attitude.
if i even knew where to find answers, i wouldn't have posted question here.
Be straight, i googled and found this website, i don't even know which company owns this site.
How am i suppose to know bugreports.qt-project.org ?
i'm expected to get my task done in one day or two, do you think i'll bother to post bug there ?[quote author="andrep" date="1353187878"]Btw, I am mildly annoyed by the attitude. This is not the place for random ramblings about operating systems, nor about unnamed bugs in Qt. If you have a bug to report, go to bugreports.qt-project.org. This exists for a reason.[/quote]
-
ningji: As far as I know the hardware running this site is owned by the Qt hosting foundation (a norwegian non-profit) which runs it for the Qt project. No company is involved, neither here nor at bugreports.qt-project.org. All help here is provided by people volunteering their time.
I doubt that any volunteer will be impressed by your companies project management mistakes (too tight a schedule, no time for developers to learn about the technologies they are supposed to use) and unwillingness to cooperate with the community they work with (not even in the form of bug reports). Your company is free to buy a "commercial license":http://qt.digia.com/ for Qt and Qt Creator if you need a dedicated support team. There also are other companies that can provide support to you, even on-site if necessary.
And still here I am spending my weekend trying to help you instead of playing with my kids... so far you did only dump a bit of random data on us and ignored any question for specifics. So let's just start over: What do you actually want to do? Are you targeting an embedded linux device or a linux desktop? Which OS (incl. version number) are you actually using on your desktop and device (if that applies)? Which compilers do you use to build your software with and which version of gdb are you trying to debug with?
What did you try to do so far? Did you e.g. enable ptrace support (ubuntu disables that IIRC since a couple of versions).
-
Tobias,
Appreciate your comments.
Most likely i'll check the setup in another pc to compare the difference 1st, Qt Creator works on that one. (Tried to remote into linux virtual box to compare, but doesn't work with windows remote desktop this time.) After that i can post more info.
i'm mad as most engineers understand how management works these days, everyone gets pushed from level above. I don't even want to think about it. As a loser in life in some sense, i lost job several times during last 6 years. No place gives you realistic schedule. For the one does, team got shutdown. You can see ppl are getting unfriendly during work, blame each other.
Now most engineers knows about wall street, and corp management, why engineers are still willing to be slaves ? why engineers cannot push back, deliver quality products in slow phases ?
i like to play around with linux, with Qt just for fun. But don't want to use it as commercial products.
Qt may have to support all different platforms, especially different linux. Don't claim Qt can do everything, just list the the platforms you fully tested, run dependency 1st before it launches, report verbose useful error message other than ask me search around.
if customers want more platform support, tell management for more time to deliver a quality product. Don't squeeze other engineers in the world to save your job.Agree we should bought Qt support license, but it's late in the project.
Another mistake is using ubuntu for Arm embedded system development.
But it was not my call.Got to go, sorry for my angry words, shouldn't mad with you guys.
It's this crazy world destroying people's inspiration.[quote author="Tobias Hunger" date="1353230951"]ningji: As far as I know the hardware running this site is owned by the Qt hosting foundation (a norwegian non-profit) which runs it for the Qt project. No company is involved, neither here nor at bugreports.qt-project.org. All help here is provided by people volunteering their time.
I doubt that any volunteer will be impressed by your companies project management mistakes (too tight a schedule, no time for developers to learn about the technologies they are supposed to use) and unwillingness to cooperate with the community they work with (not even in the form of bug reports). Your company is free to buy a "commercial license":http://qt.digia.com/ for Qt and Qt Creator if you need a dedicated support team. There also are other companies that can provide support to you, even on-site if necessary.
And still here I am spending my weekend trying to help you instead of playing with my kids... so far you did only dump a bit of random data on us and ignored any question for specifics. So let's just start over: What do you actually want to do? Are you targeting an embedded linux device or a linux desktop? Which OS (incl. version number) are you actually using on your desktop and device (if that applies)? Which compilers do you use to build your software with and which version of gdb are you trying to debug with?
What did you try to do so far? Did you e.g. enable ptrace support (ubuntu disables that IIRC since a couple of versions).[/quote]
-
We never claimed that Qt can do everything: The supported platforms are "documented":http://qt-project.org/doc/qt-4.8/supported-platforms.html . Note that arm/linux is not listed as either a tier 1 nor tier 2 platform (even though it works well) for the open source version.
None of this got us any closer to getting your issue fixed though. I do know now that you are targeting a arm-based ubuntu system of some version though.
-
ningji: I understand you don't have as much time as you wish, and you already spent more than you could afford on giving us some valuable insight into how software development in Massachusetts works nowadays. Thank you very much for doing that.
The link I gave points to a text mentioning:
bq. Debugger Cannot Attach to Running Process on Linux: GDB uses ptrace to attach to running processes. Some Linux distributions do not allow this, which stops all attempts to either directly attach to an existing process or use the Run in terminal option in Qt Creator. [...] this feature can be easily disabled. With root permissions, you can disable the feature immediately by writing 0 into /proc/sys/kernel/yama/ptrace_scope.
So with a "sudo echo 0 > /proc/sys/kernel/yama/ptrace_scope" you should be ok up to the next reboot.
With a recent version of Qt Creator you would get an additional hint: "For more details, see /etc/sysctl.d/10-ptrace.conf." The text in this file explains a way to permanently remove that "protection". (Hint: replace the 1 at the end of the file by a 0). It also states that the default of 1 "may not be appropriate for developers".
In any case note that this is neither a Qt or Qt Creator feature, but a decision taken by the distribution (Ubuntu). Their reasoning is (partially) given at https://wiki.ubuntu.com/SecurityTeam/Roadmap/KernelHardening#ptrace Protection. I personally don't fully agree with it, but it makes sense to a certain degree in their context.
-
Thanks, i'm busying with other tasks, when i can have a little bit time, will come back to this.
in most case, i'm the one never wants to give up, so will be back.
Thanks again ![quote author="Tobias Hunger" date="1353357143"]We never claimed that Qt can do everything: The supported platforms are "documented":http://qt-project.org/doc/qt-4.8/supported-platforms.html . Note that arm/linux is not listed as either a tier 1 nor tier 2 platform (even though it works well) for the open source version.
None of this got us any closer to getting your issue fixed though. I do know now that you are targeting a arm-based ubuntu system of some version though.[/quote]
-
Let me finish other tasks and i'll be back on this, thanks a lot !
[quote author="andrep" date="1353357718"]ningji: I understand you don't have as much time as you wish, and you already spent more than you could afford on giving us some valuable insight into how software development in Massachusetts works nowadays. Thank you very much for doing that.
The link I gave points to a text mentioning:
bq. Debugger Cannot Attach to Running Process on Linux: GDB uses ptrace to attach to running processes. Some Linux distributions do not allow this, which stops all attempts to either directly attach to an existing process or use the Run in terminal option in Qt Creator. [...] this feature can be easily disabled. With root permissions, you can disable the feature immediately by writing 0 into /proc/sys/kernel/yama/ptrace_scope.
So with a "sudo echo 0 > /proc/sys/kernel/yama/ptrace_scope" you should be ok up to the next reboot.
With a recent version of Qt Creator you would get an additional hint: "For more details, see /etc/sysctl.d/10-ptrace.conf." The text in this file explains a way to permanently remove that "protection". (Hint: replace the 1 at the end of the file by a 0). It also states that the default of 1 "may not be appropriate for developers".
In any case note that this is neither a Qt or Qt Creator feature, but a decision taken by the distribution (Ubuntu). Their reasoning is (partially) given at https://wiki.ubuntu.com/SecurityTeam/Roadmap/KernelHardening#ptrace Protection. I personally don't fully agree with it, but it makes sense to a certain degree in their context.[/quote]
-
the development is in ubuntu lucid 10.04, i was trying just a dummy i386 project.
no need to spend more time, sth. might be wrong in my linux box. Thanks again ![quote author="Tobias Hunger" date="1353357143"]We never claimed that Qt can do everything: The supported platforms are "documented":http://qt-project.org/doc/qt-4.8/supported-platforms.html . Note that arm/linux is not listed as either a tier 1 nor tier 2 platform (even though it works well) for the open source version.
None of this got us any closer to getting your issue fixed though. I do know now that you are targeting a arm-based ubuntu system of some version though.[/quote]
-
no /proc/sys/kernel/yama, i cannot create it as root either.
i'm going to try gdb/ddd, after i can fix the makefile mess from previous ppl 1st.thanks a lot !
[quote author="andrep" date="1353357718"]ningji: I understand you don't have as much time as you wish, and you already spent more than you could afford on giving us some valuable insight into how software development in Massachusetts works nowadays. Thank you very much for doing that.
The link I gave points to a text mentioning:
bq. Debugger Cannot Attach to Running Process on Linux: GDB uses ptrace to attach to running processes. Some Linux distributions do not allow this, which stops all attempts to either directly attach to an existing process or use the Run in terminal option in Qt Creator. [...] this feature can be easily disabled. With root permissions, you can disable the feature immediately by writing 0 into /proc/sys/kernel/yama/ptrace_scope.
So with a "sudo echo 0 > /proc/sys/kernel/yama/ptrace_scope" you should be ok up to the next reboot.
With a recent version of Qt Creator you would get an additional hint: "For more details, see /etc/sysctl.d/10-ptrace.conf." The text in this file explains a way to permanently remove that "protection". (Hint: replace the 1 at the end of the file by a 0). It also states that the default of 1 "may not be appropriate for developers".
In any case note that this is neither a Qt or Qt Creator feature, but a decision taken by the distribution (Ubuntu). Their reasoning is (partially) given at https://wiki.ubuntu.com/SecurityTeam/Roadmap/KernelHardening#ptrace Protection. I personally don't fully agree with it, but it makes sense to a certain degree in their context.[/quote]
-
Looks like it is not the pthread issue then or that they are using a different security system now to enforce it.
-
ok, finally i come back to this, uninstall gcc, gdb.
reinstall gcc, g++, gdb. Problem fixed.