public inbox for gdb@sourceware.org
 help / color / mirror / Atom feed
* fortran character strings in common blocks
@ 2005-08-02 16:16 Jack Howarth
  2005-08-03  2:44 ` Wu Zhou
  0 siblings, 1 reply; 2+ messages in thread
From: Jack Howarth @ 2005-08-02 16:16 UTC (permalink / raw)
  To: gdb

   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.

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: fortran character strings in common blocks
  2005-08-02 16:16 fortran character strings in common blocks Jack Howarth
@ 2005-08-03  2:44 ` Wu Zhou
  0 siblings, 0 replies; 2+ messages in thread
From: Wu Zhou @ 2005-08-03  2:44 UTC (permalink / raw)
  To: Jack Howarth; +Cc: gdb, fortran

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

 

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2005-08-03  2:44 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-08-02 16:16 fortran character strings in common blocks Jack Howarth
2005-08-03  2:44 ` Wu Zhou

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).