diff options
author | Andrew Burgess <aburgess@redhat.com> | 2021-11-09 13:22:05 +0000 |
---|---|---|
committer | Andrew Burgess <aburgess@redhat.com> | 2021-11-16 17:35:03 +0000 |
commit | a6e7fea128b8e1da3ea99dc906df56f85589d335 (patch) | |
tree | 6befb7056fdcd80cd87ab3c896f4227d25296024 /gdb/ada-lang.c | |
parent | b7c9d393d60957b901418359d2cf5d276bcc5e4b (diff) | |
download | binutils-a6e7fea128b8e1da3ea99dc906df56f85589d335.zip binutils-a6e7fea128b8e1da3ea99dc906df56f85589d335.tar.gz binutils-a6e7fea128b8e1da3ea99dc906df56f85589d335.tar.bz2 |
gdb: throw OPTIMIZED_OUT_ERROR rather than GENERIC_ERROR
While reviewing this patch:
https://sourceware.org/pipermail/gdb-patches/2021-November/183227.html
I spotted that the patch could be improved if we threw
OPTIMIZED_OUT_ERROR rather than GENERIC_ERROR in a few places.
This commit updates error_value_optimized_out and
require_not_optimized_out to throw OPTIMIZED_OUT_ERROR.
I ran the testsuite and saw no regressions. This doesn't really
surprise me, we don't usually write code like:
catch (const gdb_exception_error &ex)
{
(if ex.error == GENERIC_ERROR)
...
else
...
}
There are a three places where we write something like:
catch (const gdb_exception_error &ex)
{
(if ex.error == OPTIMIZED_OUT_ERROR)
...
}
In frame.c:unwind_pc, stack.c:info_frame_command_core, and
value.c:value_optimized_out, but if we are hitting these cases then
it's not significantly changing GDB's behaviour.
Diffstat (limited to 'gdb/ada-lang.c')
0 files changed, 0 insertions, 0 deletions