2010-11-30 10 views
6

Mi problema es el siguiente:Eclipse con Intel Fortran depurador

Quiero usar el depurador Intel BID con Eclipse para poder ir paso a paso a través de mi código, al igual que lo hace idb -gui. Ya he intentado implementar una solución que encontré donde se sustituye la llamada directa al BID -gdb con un guión:

#!/bin/bash 
exec/usr/local/soft/intel/fc/10.0.025/bin/ifort/idb -gdb "[email protected]" 

Esto realmente funciona, ya que empieza mi programa sólo hasta que se trata de un símbolo del sistema. Ahora me sale el siguiente error:

Target request failed: {R,T}xThread terminated. 

Es entonces cuando me perdí casi un día entero tratando de resolver esto y decidí escribir en modo. ¿Alguien capaz de ayudarme con algún consejo inteligente? ¿Cómo integraste idb en eclipse?

aplausos, David

Respuesta

4

No es un especialista, pero en caso de que esta ayuda, este hilo menciona (aunque es para FORTRAN 11):

I was thinking about your problem some more and I think I was not taking your problem statement as literally as you meant it maybe.
Are you saying the code you cannot see in the debugger resides in a MODULE definition file? If so, I would say the problem is due to general limitations of using gdb as a Fortran debugger. If you use the Intel debugger, you will be able to step into Intel Fortran generated code which is contained in a MODULE .

I see you are using version 11.0 of Intel Fortran. There are a couple of choices for you.

  • Intel Fortran 11.0 comes with a new standalone GUI version of IDB. You could use it if you don’t mind building in Eclipse, but debugging in another tool. You invoke the new gui version with the “ idb ” command assuming you initialized your environment for using the Intel debugger.
  • Intel Fortran 11.0 also provides the command line version of the debugger which you can invoke with the “ idbc ” command, again, assuming you have initialized your environment for using the Intel debugger.
  • A third alternative you could try is to modify your debug launch configuration in Photran so that it invokes idbc instead of gdb . This is not something that is officially supported by Intel, but when I try it with an example similar to what I think your situation is, it works o.k. Again, this is not supported by Intel so if you run into other problems in this configuration, there would be no help. If it works well enough for you though, it let’s you do everything within Eclipse/Photran.
    If you want to try it, initialize your environment to use the Intel debugger before you start Eclipse, start Eclipse, open your debug configuration and choose the debugger tab. Then in the “Debugger Options” area, “ Main ” tab, change “ GDB debugger ” from “ gdb ” to “ idbc ”.

That thread menciona también (en caso de que tenga alguna influencia sobre su problema):

The idb GUI appears to run a backend called iidb , which emulates gdb well enough for the Eclipse IDE to get by.

iidb needs to load certain shared libraries.
I made this happen by adding /opt/intel/Compiler/11.1/038/idb/lib/intel64 to environment variable LD_LIBRARY_PATH prior to Eclipse startup.
Your path should match your specific ifort installation.

In your debug configuration, tab " Debugger ," field " GDB debugger ", replace gdb with iidb . If you want it to stop on startup, try replacing main with MAIN__ .

+0

Por desgracia, todavía no puede conseguir que funcione :(¿cómo se cargan las bibliotecas compartidas para IIDB mi error:? Error al crear la sesión opción no reconocida: opción no reconocida nw (modo DBX): nw (modo DBX) opción no reconocida : nw (modo DBX) – tarrasch

+0

@tarrasch: no tengo mucho más sobre este tema, excepto este hilo http://dev.eclipse.org/mhonarc/lists/photran/msg00162.html que menciona el mismo tipo de error mensaje que tiene. – VonC

+0

@tarrasch: ¿lograron hacerlo funcionar? – VonC

0

3 años han pasado desde que se hizo la pregunta, pero esta solución funcionará para cualquier persona que tenga problemas con el eclipse y el BID, especialmente en OS X.

Sustitución gdb con idbc en la pestaña Debugger en Eclipse funciona bien en Linux.

Si está en OS X 10.7 o versiones posteriores, donde no hay soporte para el compilador Intel Fortran en Eclipse, crear un proyecto de archivo MAKE, cree un objetivo con un makefile personalizado, utilice ifort con las banderas -g -fpic -Wl,-no_pie (se necesitan estas banderas para OS X 10.7+), reemplace gdb con idb y eventualmente funcionará.