aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gdb/ChangeLog4
-rw-r--r--gdb/expprint.c9
-rw-r--r--gdb/testsuite/ChangeLog4
-rw-r--r--gdb/testsuite/gdb.fortran/debug-expr.exp8
4 files changed, 24 insertions, 1 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 720d3b2..d4a1b98 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,9 @@
2021-01-12 Andrew Burgess <andrew.burgess@embecosm.com>
+ * expprint.c (dump_subexp_body_standard): Handle OP_BOOL.
+
+2021-01-12 Andrew Burgess <andrew.burgess@embecosm.com>
+
* f-exp.y (dot_ops): Rename to...
(fortran_operators): ...this. Add a header comment. Add symbol
based operators.
diff --git a/gdb/expprint.c b/gdb/expprint.c
index f75874b..d95835f 100644
--- a/gdb/expprint.c
+++ b/gdb/expprint.c
@@ -1121,11 +1121,18 @@ dump_subexp_body_standard (struct expression *exp,
}
break;
+ case OP_BOOL:
+ {
+ bool val = (bool) (exp->elts[elt].longconst);
+ fputs_filtered (val ? "TRUE" : "FALSE", stream);
+ elt += 2;
+ }
+ break;
+
default:
case OP_NULL:
case MULTI_SUBSCRIPT:
case OP_COMPLEX:
- case OP_BOOL:
case OP_M2_STRING:
case OP_THIS:
case OP_NAME:
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog
index e31b712..0cae318 100644
--- a/gdb/testsuite/ChangeLog
+++ b/gdb/testsuite/ChangeLog
@@ -1,5 +1,9 @@
2021-01-12 Andrew Burgess <andrew.burgess@embecosm.com>
+ * gdb.fortran/debug-expr.exp: Add new tests.
+
+2021-01-12 Andrew Burgess <andrew.burgess@embecosm.com>
+
* gdb.fortran/dot-ops.exp: Add new tests.
2021-01-11 Tom de Vries <tdevries@suse.de>
diff --git a/gdb/testsuite/gdb.fortran/debug-expr.exp b/gdb/testsuite/gdb.fortran/debug-expr.exp
index 4111d8d..fd63ea7 100644
--- a/gdb/testsuite/gdb.fortran/debug-expr.exp
+++ b/gdb/testsuite/gdb.fortran/debug-expr.exp
@@ -41,3 +41,11 @@ gdb_continue_to_breakpoint "Break Here"
gdb_test_no_output "set debug expression 1"
gdb_test_debug_expr "print obj%three(1)%two(1)%one(1)%i" "\\\$$decimal = 1"
+gdb_test_debug_expr "print .TRUE." [multi_line \
+ "" \
+ "\\s+0\\s+OP_BOOL\\s+TRUE" \
+ "\\\$$decimal = \.TRUE\."]
+gdb_test_debug_expr "print .FALSE." [multi_line \
+ "" \
+ "\\s+0\\s+OP_BOOL\\s+FALSE" \
+ "\\\$$decimal = \.FALSE\."]