geany / geany-plugins

The combined Geany Plugins collection
http://plugins.geany.org/
587 stars 261 forks source link

Debugger: Fortran #583

Open yuanshuoastro opened 7 years ago

yuanshuoastro commented 7 years ago

Dear all, I am very thankful to the debugger plugin team. It is a very good tool to my work. I would like to ask some "how to" here. Maybe some of them can be considered into wishlist.

  1. How to show variables' address? In F90, we have LOC(x) to show its address in memery. Can I use it in the "watching window" as well?

2.how to access some variables that are located under module? In intel f90+VS in Windows10, we have "mod::" method in debugger to enable this. Can we have the similar functions in geany?

  1. ... (Maybe we can add more "enhancement" under this box?:D)

Thanks. Shuo

codebrainz commented 7 years ago

I'm not GDB expert, and don't know Fortran at all, but if it's the same commands as for C/C++, I think you can use print &thevar inside the console tab.

nomadbyte commented 2 years ago

Years later... but just FYI (with GDB 8.1.1):

  1. To see the address value of a Fortran variable x: add &x in the Debugger's Watch tab. The dereferenced variable value can be shown by clicking on the V arrow.
  2. To reference a Fortran module variable or parameter: specify it in form modname::varname

E.g. debugger-f90-var-address