|
[Sponsors] |
January 10, 2011, 08:39 |
|
#21 |
New Member
Astrid Mahrla
Join Date: May 2010
Location: Munich, Germany
Posts: 22
Rep Power: 17 |
Hi!
I think it's a bug in the machine interface gdb/mi .. If I remember correctly I was able to reproduce the bug with another IDE in same manner.. Best, Astrid |
|
May 7, 2011, 09:49 |
Debugging problem in Eclipse
|
#22 |
New Member
Luther Terblanche
Join Date: May 2009
Posts: 15
Rep Power: 17 |
Hi All,
I have managed to successfully import a solver to an eclipse helios project. I can also run it applied to a test case thanks to the tutorial on how to use eclipse with openfoam. My problem is that when I insert breakpoints, the debugger does not stop at them. It only stops at entry into main(). Also it does not display any code information. It only says " No source available for "main() at 0x8055df0" ". Can anyone help me please. I have changed the option in the ./etc/bashrc file to Debug instead op Opt. What else should I do to be able to see the code and walk through it? Regards Luther |
|
May 7, 2011, 09:59 |
|
#23 |
Senior Member
Robert Sawko
Join Date: Mar 2009
Posts: 117
Rep Power: 22 |
Luther,
did you also compile the OpenFOAM sources after changing the value of the environmental variable? |
|
May 7, 2011, 10:07 |
|
#24 |
New Member
Luther Terblanche
Join Date: May 2009
Posts: 15
Rep Power: 17 |
Hi Robert,
I have only compiled the solver that I have imported. In this test case it is a local copy of simpleFoam located in my /home/ directory. The binary that gets created are located $FOAM_USER_APPBIN. This is also the binary I point to in the run and debug configurations of Eclipse. I hope this info helps. Thanks Regards Luther |
|
May 7, 2011, 10:14 |
|
#25 |
Senior Member
Robert Sawko
Join Date: Mar 2009
Posts: 117
Rep Power: 22 |
I can't think of anything else, but to compile the main sources as well so if you have a possibility to do that it shouldn't hurt to try. I am not myself an expert on debugging OpenFOAM but the fact that you didn't recompile the main sources seems to explain why you enter the main of your solver, but can't get any other info.
|
|
May 7, 2011, 10:20 |
|
#26 |
New Member
Luther Terblanche
Join Date: May 2009
Posts: 15
Rep Power: 17 |
I would expect not to get any information on all of the other sources, such as createMesh for example, since they are release builds, but i would expect to get information on the main() subroutine of the solver I have just compiled and imported into eclipse.
Thank you for your help. I will fiddle some more with the options in eclipse. |
|
May 17, 2011, 07:47 |
|
#27 |
Senior Member
Robert Sawko
Join Date: Mar 2009
Posts: 117
Rep Power: 22 |
Dear Astrid,
could I ask for advice again? I've been running the Eclipse debugging smoothly for quite some time. Recently I've changed to openSUSE 11.4. According to your advice I compiled gdb 6.8 but still, I cannot install breakpoints. It either replies with: No source file named ... or No line ... in file ... Neither of these problems appear in gdb run from the command line. I've already tried adding my code to Source in Eclipse/Debug configuration, but no change. I'm afraid that my problem might be specific to configuration, but if you have encountered a problem of this kind and know a workaround please let me know. Many thanks, Robert |
|
May 17, 2011, 08:59 |
|
#28 |
New Member
Astrid Mahrla
Join Date: May 2010
Location: Munich, Germany
Posts: 22
Rep Power: 17 |
Hi Robert!
Remote diagnostics always makes things a little bit difficult, but of course I can try some standard guesses.. - I assume that you've recompiled OpenFOAM in debug mode..? - Are you sure that eclipse starts with correct environment variables for OpenFOAM (check this starting eclipse from console, in case you haven't already done so...)? - Can you compile from eclipse? If not, this is a hint for wrong environment variables.. By the way... Suse 11.4 uses gdb 7.2, isn't it? Is the bug still present? Best, Astrid |
|
May 17, 2011, 09:41 |
|
#29 | ||
Senior Member
Robert Sawko
Join Date: Mar 2009
Posts: 117
Rep Power: 22 |
Thanks for the reply.
Quote:
Quote:
Yes, I can compile from Eclipse. I am afraid so. On 7.2 it simply freezes. With 6.8 I just can't install breakpoints, but again it might be specific to my system configuration. |
|||
May 17, 2011, 10:12 |
|
#30 |
New Member
Astrid Mahrla
Join Date: May 2010
Location: Munich, Germany
Posts: 22
Rep Power: 17 |
Hi Robert!
Sorry, that I can't help you. Haven't encountered that kind of problem - possibly as I'm not using openSUSE 11.4 ... But please let me know if you've found out what's wrong.. I'm still interested... Astrid |
|
June 8, 2011, 22:56 |
|
#31 |
Member
桂莹
Join Date: Apr 2011
Posts: 36
Rep Power: 15 |
hi,Bruno
I had the same problem,and I try to do what you said "edit the menu, then edit the Eclipse menu item and switch to "Type: Application in Terminal" ",where is the Eclipse menu item?I'm sorry,I'm a newer |
|
June 9, 2011, 17:31 |
|
#32 | |
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,981
Blog Entries: 45
Rep Power: 128 |
Greetings yingkun,
Quote:
Best regards, Bruno
__________________
|
||
June 9, 2011, 23:49 |
|
#33 |
Member
桂莹
Join Date: Apr 2011
Posts: 36
Rep Power: 15 |
Thank you for the reply.
my Ubuntu version is 10.04,and now I can build project,but when running,it shows: /home/ying/eclipsework/coalChemistryFoam /coalChemistryFoam:error while loading shared libraries:libfiniteVolume.so:cannot open shared object file:No such file or directory. what's the problem? |
|
June 10, 2011, 14:43 |
|
#34 |
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,981
Blog Entries: 45
Rep Power: 128 |
Hi yingkun,
It seems like you didn't manage to get things set-up properly. To answer your previous question and hopefully this will fix the current problem, attached are a few images:
Bruno
__________________
|
|
June 12, 2011, 00:22 |
|
#35 |
Member
桂莹
Join Date: Apr 2011
Posts: 36
Rep Power: 15 |
Hi,Bruno
I follow you with the code HOME/OpenFOAM/OpenFOAM-1.6/bin/foamExec wmake instesd of wmake, and I can build project,but I still can't run,it shows: /home/ying/eclipsework/coalChemistryFoam /coalChemistryFoam:error while loading shared libraries:libfiniteVolume.so:cannot open shared object file:No such file or directory. |
|
June 12, 2011, 13:19 |
|
#36 | |
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,981
Blog Entries: 45
Rep Power: 128 |
Hi yingkun,
Quote:
Use the same foamExec script, including its path, for launching the solver! In other words:
Bruno
__________________
|
||
July 13, 2011, 11:56 |
|
#37 | |
Senior Member
Arne Stahlmann
Join Date: Nov 2009
Location: Hanover, Germany
Posts: 209
Rep Power: 18 |
Hi there,
I have a problem running point 7 from the wiki "Running applications and debugging". Up to this point, everything works. I could load the whole OF package into the workspace, and could compile a test-solver. Running an imported application ramp (from /tutorials/surfaceTracking/interTrackFoam), I get the following error: In Run -> Run Configurations I chose "ramp" as Project and "/opt/OpenFOAM/OpenFOAM-1.6-ext/applications/solvers/surfaceTracking/interTrackFoam" as Application (from the Browse... menue). But I can't run it as I get Quote:
I'm using OF 1.6-ext compiled in debug mode on Ubuntu 10.04 64bit. Eclipse is 3.5.2 installed via apt-get. Arne |
||
July 13, 2011, 12:45 |
|
#38 |
New Member
Astrid Mahrla
Join Date: May 2010
Location: Munich, Germany
Posts: 22
Rep Power: 17 |
Hi Arne,
you should look for the compiled binary instead of the source code. Have look in "/opt/OpenFOAM/OpenFOAM-1.6-ext/applications/bin". Hope, that helps. Best, Astrid |
|
July 13, 2011, 13:01 |
|
#39 |
Senior Member
Arne Stahlmann
Join Date: Nov 2009
Location: Hanover, Germany
Posts: 209
Rep Power: 18 |
Yup, that definitely makes sense! Shame on me... That must be the muggy weather.
|
|
July 14, 2011, 09:24 |
|
#40 | |
Senior Member
Arne Stahlmann
Join Date: Nov 2009
Location: Hanover, Germany
Posts: 209
Rep Power: 18 |
Like already posted in #16, I also have a problem including paths to be able to jump trough the source code.
A copied a solver (interDyMFoam) to FOAM_USER_APPBIN, renamed (solver01) and compiled it. In solver01.C, when e.g. pointing to #include "fvCFD.H" and pressing F3, I only get Quote:
Only those files that are directly included in the solver01 folder can be displayed/pointed to. Any hints? |
||
|
|