aboutsummaryrefslogtreecommitdiff
path: root/gdb/ChangeLog
diff options
context:
space:
mode:
authorTom Tromey <tromey@adacore.com>2021-04-15 10:14:11 -0600
committerTom Tromey <tromey@adacore.com>2021-04-15 10:14:11 -0600
commita15a276b46bf07323a1d270d7abece83ef1ea78f (patch)
tree742b28318ab95c69c7cdbf446a4439d6e288ea5f /gdb/ChangeLog
parent644a2e75ace6b5e76f91d38c28c3b97fcfdeeaa5 (diff)
downloadgdb-a15a276b46bf07323a1d270d7abece83ef1ea78f.zip
gdb-a15a276b46bf07323a1d270d7abece83ef1ea78f.tar.gz
gdb-a15a276b46bf07323a1d270d7abece83ef1ea78f.tar.bz2
Avoid crash in Ada value printing with optimized-out array
The Ada value-printing code could crash when printing an array which had been optimized out. The crash is difficult to reproduce, but I did manage to write a test that at least shows that the previous behavior was incorrect -- before the patch, the array is printed as if it is valid and every value is 0. gdb/ChangeLog 2021-04-15 Tom Tromey <tromey@adacore.com> * ada-valprint.c (ada_value_print_array): Handle optimized-out arrays. gdb/testsuite/ChangeLog 2021-04-15 Tom Tromey <tromey@adacore.com> * gdb.dwarf2/arr-stride.exp: Add test.
Diffstat (limited to 'gdb/ChangeLog')
-rw-r--r--gdb/ChangeLog5
1 files changed, 5 insertions, 0 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 54a035c..5b2f6c9 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,10 @@
2021-04-15 Tom Tromey <tromey@adacore.com>
+ * ada-valprint.c (ada_value_print_array): Handle optimized-out
+ arrays.
+
+2021-04-15 Tom Tromey <tromey@adacore.com>
+
* printcmd.c (print_variable_and_value): Use
common_val_print_checked.