This is the mail archive of the gdb@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]