diff options
author | Tom de Vries <tdevries@suse.de> | 2021-10-13 21:35:49 +0200 |
---|---|---|
committer | Tom de Vries <tdevries@suse.de> | 2021-10-13 21:35:49 +0200 |
commit | 9cd609f8641849d4bbf25f90d5fde58228aeb866 (patch) | |
tree | d5e2bf089f9d44e971ea9390d5ce8f04bbd94588 /bfd | |
parent | 1284c2264cca5c848e2f9622ea53e42c97e4e838 (diff) | |
download | gdb-9cd609f8641849d4bbf25f90d5fde58228aeb866.zip gdb-9cd609f8641849d4bbf25f90d5fde58228aeb866.tar.gz gdb-9cd609f8641849d4bbf25f90d5fde58228aeb866.tar.bz2 |
[gdb/exp] Improve <error reading variable> message
When printing a variable x in a subroutine foo:
...
subroutine foo (x)
integer(4) :: x (*)
x(3) = 1
end subroutine foo
...
where x is an array with unknown bounds, we get:
...
$ gdb -q -batch outputs/gdb.fortran/array-no-bounds/array-no-bounds \
-ex "break foo" \
-ex run \
-ex "print x"
Breakpoint 1 at 0x4005cf: file array-no-bounds.f90, line 18.
Breakpoint 1, foo (x=...) at array-no-bounds.f90:18
18 x(3) = 1
$1 = <error reading variable>
...
Improve the error message by printing the details of the error, such that we
have instead:
...
$1 = <error reading variable: failed to get range bounds>
...
This is a change in gdb/valprint.c, and grepping through the sources reveals
that this is a common pattern.
Tested on x86_64-linux.
Diffstat (limited to 'bfd')
0 files changed, 0 insertions, 0 deletions