This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
Re: fortran character strings in common blocks
- From: Wu Zhou <woodzltc at cn dot ibm dot com>
- To: Jack Howarth <howarth at bromo dot msbb dot uc dot edu>
- Cc: gdb at sources dot redhat dot com, fortran at gcc dot gnu dot org
- Date: Wed, 3 Aug 2005 02:02:26 +0800 (CST)
- Subject: Re: fortran character strings in common blocks
- References: <20050802161249.EBE801DC06D@bromo.msbb.uc.edu>
On Tue, 2 Aug 2005, Jack Howarth wrote:
> Is gdb supposed to be able to print the values of character strings
> that belong to COMMON blocks? I find that a character string declared as...
>
> PARAMETER (COMMAX=132)
> CHARACTER*(COMMAX) COMLYN
>
> COMMON /CCOMND/ COMLYN
>
> that I get an error...
>
> (gdb) print COMLYN
> No symbol "COMLYN" in current context.
>
> even though I can assign this character string to
> a locally declared character string (not in a
> COMMON block) and then print this string with gdb.
> Thanks in advance for any clarifications on this issue.
> Jack
> ps This is with gfortran from the current gcc 4.0 branch.
>
The reason is that gfortran treats common blocks as structure. So gdb
can't handle it at this time. gdb expects it treated as
DW_TAG_common_block. I ever opened a bug on this at GCC bugzilla:
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23057
Hope that gfortran community could handle this in a near future.
Regards
- Wu Zhou