diff options
author | Tom Tromey <tromey@adacore.com> | 2021-04-15 10:14:11 -0600 |
---|---|---|
committer | Tom Tromey <tromey@adacore.com> | 2021-04-15 10:14:11 -0600 |
commit | a15a276b46bf07323a1d270d7abece83ef1ea78f (patch) | |
tree | 742b28318ab95c69c7cdbf446a4439d6e288ea5f /gdb/ada-lang.c | |
parent | 644a2e75ace6b5e76f91d38c28c3b97fcfdeeaa5 (diff) | |
download | binutils-a15a276b46bf07323a1d270d7abece83ef1ea78f.zip binutils-a15a276b46bf07323a1d270d7abece83ef1ea78f.tar.gz binutils-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/ada-lang.c')
0 files changed, 0 insertions, 0 deletions