Author Topic: GDB print fortran character arrays as string literals  (Read 4586 times)

creeping

  • Guest
GDB print fortran character arrays as string literals
« on: January 09, 2008, 10:51:37 pm »
I've set-up Codeblocks to compile Fortran 77 projects successfully. I've also been able to use the debugger to watch variables.

However one thing that is annoying me is the output for character arrays. Is there any way to view the watch as a character string, instead of a character array with accompanying ASCII character number?

e.g. I have a variable:

Code
character*4 site

I add a watch "site__" and it prints:

Code
(66 'B', 76 'L', 85 'U', 70 'F')

I've tried changing the watch "Format" to character but it just gives the following output:

Code
(<error reading variable>, <error reading variable>, <error reading variable>, <error reading variable>)

I would be good to get the watch to print "BLUF". I could even live with "('B', 'L', 'U', 'F')"

Thanks