gdb/fortran: Use TYPE_CODE_CHAR for character types
authorAndrew Burgess <andrew.burgess@embecosm.com>
Fri, 18 Jan 2019 11:24:24 +0000 (11:24 +0000)
committerAndrew Burgess <andrew.burgess@embecosm.com>
Wed, 6 Mar 2019 18:11:31 +0000 (18:11 +0000)
commit4a270568d93263e4970099456b4efb58466134a6
tree826ed6321c654560d167c5cf693f1c22bc9ea1da
parent067630bdb553bb889104e3b064e4551531ddcedc
gdb/fortran: Use TYPE_CODE_CHAR for character types

Switch to using TYPE_CODE_CHAR for character types.  This appears to
have little impact on the test results as gFortran uses the
DW_TAG_string_type to represent all character variables (as far as I
can see).  The only place this has an impact is when the user casts a
variable to a character type, in which case GDB does now use the CHAR
type, and prints the variable as both a value and a character, for
example, before:

    (gdb) p ((character) 97)
    $1 = 97

and after:

    (gdb) p ((character) 97)
    $1 = 97 'a'

gdb/ChangeLog:

* f-lang.c (build_fortran_types): Use TYPE_CODE_CHAR for character
types.

gdb/testsuite/ChangeLog:

* gdb.fortran/type-kinds.exp: Update expected results.
gdb/ChangeLog
gdb/f-lang.c
gdb/testsuite/ChangeLog
gdb/testsuite/gdb.fortran/type-kinds.exp
This page took 0.039555 seconds and 4 git commands to generate.