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 |
Debugging problem in Eclipse
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 |
Luther,
did you also compile the OpenFOAM sources after changing the value of the environmental variable? |
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 |
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.
|
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. |
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 |
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 |
Thanks for the reply.
Quote:
Quote:
Yes, I can compile from Eclipse. Quote:
|
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 |
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 |
Greetings yingkun,
Quote:
Best regards, Bruno |
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? |
4 Attachment(s)
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 |
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. |
Hi yingkun,
Quote:
Use the same foamExec script, including its path, for launching the solver! In other words:
Bruno |
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 |
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 |
Yup, that definitely makes sense! Shame on me... That must be the muggy weather.
|
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? |
All times are GMT -4. The time now is 18:33. |