This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
Re: display character strings in fortran
- From: Tobias Burnus <burnus at net-b dot de>
- To: fortran at gcc dot gnu dot org, gdb at sourceware dot org
- Date: Wed, 10 Jun 2009 13:56:34 +0200
- Subject: Re: display character strings in fortran
kamaraju kusumanchi wrote:
> However, when debugged, the character strings are not displayed properly.
> [...]
> (gdb) p first_name
> $1 = (32 ' ', 107 'k', 97 'a', 109 'm', 97 'a', 114 'r', 97 'a', 106
> 'j', 117 'u', 32 ' ', 32 ' ', 32 ' ', 32 ' ', 32 ' ', 32 ' ', 32 ' ',
> 32 ' ', 32 ' ', 32 ' ', 32 ' ')
> [...]
> gcc version 4.3.2 (Debian 4.3.2-1.1)
> Is this a bug in gdb or gfortran? I appreciate if you could fix it.
The GCC bug was fixed about half a year ago. Please use GCC 4.4.0 (which
was released April 21, 2009) or later. Using GCC 4.4.x, one gets:
(gdb) p first_name
$1 = ' kamaraju', ' ' <repeats 11 times>
Tobias