binutils-gdb/gdb/testsuite/gdb.fortran
Andrew Burgess ce38f5edf1 gdb: fix debug dump of OP_BOOL expressions
Consider this GDB session:

  (gdb) set language fortran
  (gdb) set debug expression 1
  (gdb) p .TRUE.
  Dump of expression @ 0x4055d90, before conversion to prefix form:
  	Language fortran, 3 elements, 16 bytes each.
  	Index                Opcode         Hex Value  String Value
  	    0               OP_BOOL  79  O...............
  	    1             BINOP_ADD  1  ................
  	    2               OP_BOOL  79  O...............
  Dump of expression @ 0x4055d90, after conversion to prefix form:
  Expression: `TRUE'
  	Language fortran, 3 elements, 16 bytes each.

  	    0  OP_BOOL               Unknown format
  	    1  BINOP_ADD
  	    2    OP_BOOL               Unknown format
  	    3    OP_NULL               Unknown format
  $1 = .TRUE.

The final dump of the OP_BOOL is completely wrong.  After this patch
we now get:

  (gdb) set language fortran
  (gdb) set debug expression 1
  (gdb) p .TRUE.
  Dump of expression @ 0x2d07470, before conversion to prefix form:
  	Language fortran, 3 elements, 16 bytes each.
  	Index                Opcode         Hex Value  String Value
  	    0               OP_BOOL  79  O...............
  	    1             BINOP_ADD  1  ................
  	    2               OP_BOOL  79  O...............
  Dump of expression @ 0x2d07470, after conversion to prefix form:
  Expression: `TRUE'
  	Language fortran, 3 elements, 16 bytes each.

  	    0  OP_BOOL               TRUE
  $1 = .TRUE.

Much better.  I added a test for this into the Fortran testsuite.

gdb/ChangeLog:

	* expprint.c (dump_subexp_body_standard): Handle OP_BOOL.

gdb/testsuite/ChangeLog:

	* gdb.fortran/debug-expr.exp: Add new tests.
2021-01-12 09:44:08 +00:00
..
array-bounds-high.exp Update copyright year range in all GDB files 2021-01-01 12:12:21 +04:00
array-bounds-high.f90 Update copyright year range in all GDB files 2021-01-01 12:12:21 +04:00
array-bounds.exp Update copyright year range in all GDB files 2021-01-01 12:12:21 +04:00
array-bounds.f90 Update copyright year range in all GDB files 2021-01-01 12:12:21 +04:00
array-element.exp Update copyright year range in all GDB files 2021-01-01 12:12:21 +04:00
array-element.f Update copyright year range in all GDB files 2021-01-01 12:12:21 +04:00
array-slices-bad.exp Update copyright year range in all GDB files 2021-01-01 12:12:21 +04:00
array-slices-bad.f90 Update copyright year range in all GDB files 2021-01-01 12:12:21 +04:00
array-slices-sub-slices.exp Update copyright year range in all GDB files 2021-01-01 12:12:21 +04:00
array-slices-sub-slices.f90 Update copyright year range in all GDB files 2021-01-01 12:12:21 +04:00
array-slices.exp Update copyright year range in all GDB files 2021-01-01 12:12:21 +04:00
array-slices.f90 Update copyright year range in all GDB files 2021-01-01 12:12:21 +04:00
block-data.exp Update copyright year range in all GDB files 2021-01-01 12:12:21 +04:00
block-data.f Update copyright year range in all GDB files 2021-01-01 12:12:21 +04:00
charset.exp Update copyright year range in all GDB files 2021-01-01 12:12:21 +04:00
charset.f90
class-allocatable-array.exp Update copyright year range in all GDB files 2021-01-01 12:12:21 +04:00
class-allocatable-array.f90 Update copyright year range in all GDB files 2021-01-01 12:12:21 +04:00
common-block.exp Update copyright year range in all GDB files 2021-01-01 12:12:21 +04:00
common-block.f90 Update copyright year range in all GDB files 2021-01-01 12:12:21 +04:00
completion.exp Update copyright year range in all GDB files 2021-01-01 12:12:21 +04:00
completion.f90 Update copyright year range in all GDB files 2021-01-01 12:12:21 +04:00
complex.exp Update copyright year range in all GDB files 2021-01-01 12:12:21 +04:00
complex.f90 Update copyright year range in all GDB files 2021-01-01 12:12:21 +04:00
debug-expr.exp gdb: fix debug dump of OP_BOOL expressions 2021-01-12 09:44:08 +00:00
debug-expr.f90 Update copyright year range in all GDB files 2021-01-01 12:12:21 +04:00
derived-type-function.exp Update copyright year range in all GDB files 2021-01-01 12:12:21 +04:00
derived-type-function.f90 Update copyright year range in all GDB files 2021-01-01 12:12:21 +04:00
derived-type-striding.exp Update copyright year range in all GDB files 2021-01-01 12:12:21 +04:00
derived-type-striding.f90 Update copyright year range in all GDB files 2021-01-01 12:12:21 +04:00
derived-type.exp Update copyright year range in all GDB files 2021-01-01 12:12:21 +04:00
derived-type.f90 Update copyright year range in all GDB files 2021-01-01 12:12:21 +04:00
dot-ops.exp gdb/fortran: add symbol base comparison operators 2021-01-12 09:40:55 +00:00
exprs.exp Update copyright year range in all GDB files 2021-01-01 12:12:21 +04:00
function-calls.exp Update copyright year range in all GDB files 2021-01-01 12:12:21 +04:00
function-calls.f90 Update copyright year range in all GDB files 2021-01-01 12:12:21 +04:00
info-modules.exp Update copyright year range in all GDB files 2021-01-01 12:12:21 +04:00
info-types-2.f90 Update copyright year range in all GDB files 2021-01-01 12:12:21 +04:00
info-types.exp Update copyright year range in all GDB files 2021-01-01 12:12:21 +04:00
info-types.f90 Update copyright year range in all GDB files 2021-01-01 12:12:21 +04:00
intrinsics.exp Update copyright year range in all GDB files 2021-01-01 12:12:21 +04:00
intrinsics.f90 Update copyright year range in all GDB files 2021-01-01 12:12:21 +04:00
intvar-array.exp gdb/fortran: Correct the lval type for array elements of internal vars 2021-01-08 09:54:21 +00:00
intvar-array.f90 gdb/fortran: Correct the lval type for array elements of internal vars 2021-01-08 09:54:21 +00:00
intvar-dynamic-types.exp gdb: user variables with components of dynamic type 2021-01-08 11:52:56 +00:00
intvar-dynamic-types.f90 gdb: user variables with components of dynamic type 2021-01-08 11:52:56 +00:00
library-module-lib.f90 Update copyright year range in all GDB files 2021-01-01 12:12:21 +04:00
library-module-main.f90 Update copyright year range in all GDB files 2021-01-01 12:12:21 +04:00
library-module.exp Update copyright year range in all GDB files 2021-01-01 12:12:21 +04:00
logical.exp Update copyright year range in all GDB files 2021-01-01 12:12:21 +04:00
logical.f90 Update copyright year range in all GDB files 2021-01-01 12:12:21 +04:00
max-depth.exp Update copyright year range in all GDB files 2021-01-01 12:12:21 +04:00
max-depth.f90 Update copyright year range in all GDB files 2021-01-01 12:12:21 +04:00
mixed-lang-stack.c Update copyright year range in all GDB files 2021-01-01 12:12:21 +04:00
mixed-lang-stack.cpp Update copyright year range in all GDB files 2021-01-01 12:12:21 +04:00
mixed-lang-stack.exp Update copyright year range in all GDB files 2021-01-01 12:12:21 +04:00
mixed-lang-stack.f90 Update copyright year range in all GDB files 2021-01-01 12:12:21 +04:00
module.exp Update copyright year range in all GDB files 2021-01-01 12:12:21 +04:00
module.f90 Update copyright year range in all GDB files 2021-01-01 12:12:21 +04:00
multi-dim.exp Update copyright year range in all GDB files 2021-01-01 12:12:21 +04:00
multi-dim.f90 Update copyright year range in all GDB files 2021-01-01 12:12:21 +04:00
nested-funcs-2.exp Update copyright year range in all GDB files 2021-01-01 12:12:21 +04:00
nested-funcs-2.f90 Update copyright year range in all GDB files 2021-01-01 12:12:21 +04:00
nested-funcs.exp Update copyright year range in all GDB files 2021-01-01 12:12:21 +04:00
nested-funcs.f90 Update copyright year range in all GDB files 2021-01-01 12:12:21 +04:00
pointer-to-pointer.exp Update copyright year range in all GDB files 2021-01-01 12:12:21 +04:00
pointer-to-pointer.f90 Update copyright year range in all GDB files 2021-01-01 12:12:21 +04:00
pointers.f90 Update copyright year range in all GDB files 2021-01-01 12:12:21 +04:00
print_type.exp Update copyright year range in all GDB files 2021-01-01 12:12:21 +04:00
print-formatted.exp Update copyright year range in all GDB files 2021-01-01 12:12:21 +04:00
print-formatted.f90 Update copyright year range in all GDB files 2021-01-01 12:12:21 +04:00
printing-types.exp Update copyright year range in all GDB files 2021-01-01 12:12:21 +04:00
printing-types.f90 Update copyright year range in all GDB files 2021-01-01 12:12:21 +04:00
ptr-indentation.exp Update copyright year range in all GDB files 2021-01-01 12:12:21 +04:00
ptr-indentation.f90 Update copyright year range in all GDB files 2021-01-01 12:12:21 +04:00
ptype-on-functions.exp Update copyright year range in all GDB files 2021-01-01 12:12:21 +04:00
ptype-on-functions.f90 Update copyright year range in all GDB files 2021-01-01 12:12:21 +04:00
short-circuit-argument-list.exp Update copyright year range in all GDB files 2021-01-01 12:12:21 +04:00
short-circuit-argument-list.f90 Update copyright year range in all GDB files 2021-01-01 12:12:21 +04:00
subarray.exp Update copyright year range in all GDB files 2021-01-01 12:12:21 +04:00
subarray.f Update copyright year range in all GDB files 2021-01-01 12:12:21 +04:00
type-kinds.exp Update copyright year range in all GDB files 2021-01-01 12:12:21 +04:00
type.f90 Update copyright year range in all GDB files 2021-01-01 12:12:21 +04:00
types.exp Update copyright year range in all GDB files 2021-01-01 12:12:21 +04:00
vla-alloc-assoc.exp Update copyright year range in all GDB files 2021-01-01 12:12:21 +04:00
vla-datatypes.exp Update copyright year range in all GDB files 2021-01-01 12:12:21 +04:00
vla-datatypes.f90 Update copyright year range in all GDB files 2021-01-01 12:12:21 +04:00
vla-history.exp Update copyright year range in all GDB files 2021-01-01 12:12:21 +04:00
vla-ptr-info.exp Update copyright year range in all GDB files 2021-01-01 12:12:21 +04:00
vla-ptype-sub.exp Update copyright year range in all GDB files 2021-01-01 12:12:21 +04:00
vla-ptype.exp Update copyright year range in all GDB files 2021-01-01 12:12:21 +04:00
vla-sizeof.exp Update copyright year range in all GDB files 2021-01-01 12:12:21 +04:00
vla-sub.f90 Update copyright year range in all GDB files 2021-01-01 12:12:21 +04:00
vla-type.exp Update copyright year range in all GDB files 2021-01-01 12:12:21 +04:00
vla-type.f90 Update copyright year range in all GDB files 2021-01-01 12:12:21 +04:00
vla-value-sub-arbitrary.exp Update copyright year range in all GDB files 2021-01-01 12:12:21 +04:00
vla-value-sub-finish.exp Update copyright year range in all GDB files 2021-01-01 12:12:21 +04:00
vla-value-sub.exp Update copyright year range in all GDB files 2021-01-01 12:12:21 +04:00
vla-value.exp Update copyright year range in all GDB files 2021-01-01 12:12:21 +04:00
vla.f90 Update copyright year range in all GDB files 2021-01-01 12:12:21 +04:00
whatis_type.exp Update copyright year range in all GDB files 2021-01-01 12:12:21 +04:00