aboutsummaryrefslogtreecommitdiff
path: root/gdb/dwarf2loc.c
diff options
context:
space:
mode:
authorPedro Alves <palves@redhat.com>2013-12-06 19:48:54 +0000
committerPedro Alves <palves@redhat.com>2013-12-06 19:48:54 +0000
commit710409a221f27f39d8b8e33c5676c97cb04cf4b8 (patch)
tree9af164e9fb5ca2f9ac907c6f89304ebe0913a540 /gdb/dwarf2loc.c
parent7580e9176779460e031d82aa1cd5790db53ad27b (diff)
downloadgdb-710409a221f27f39d8b8e33c5676c97cb04cf4b8.zip
gdb-710409a221f27f39d8b8e33c5676c97cb04cf4b8.tar.gz
gdb-710409a221f27f39d8b8e33c5676c97cb04cf4b8.tar.bz2
New OPTIMIZED_OUT_ERROR error code.
In order to catch <optimized out> errors like we catch <unavailable> errors, this adds a new OPTIMIZED_OUT_ERROR error code, and throws it in various places. gdb/ChangeLog 2013-12-06 Andrew Burgess <aburgess@broadcom.com> Pedro Alves <palves@redhat.com> * exceptions.h (errors): Add OPTIMIZED_OUT_ERROR. * dwarf2loc.c (write_pieced_value): Throw OPTIMIZED_OUT_ERROR. * frame.c (frame_unwind_register): Throw OPTIMIZED_OUT_ERROR. * spu-tdep.c (spu_software_single_step): Throw OPTIMIZED_OUT_ERROR. * valops.c (value_assign): Throw OPTIMIZED_OUT_ERROR.
Diffstat (limited to 'gdb/dwarf2loc.c')
-rw-r--r--gdb/dwarf2loc.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/gdb/dwarf2loc.c b/gdb/dwarf2loc.c
index 2d15546..2b1f323 100644
--- a/gdb/dwarf2loc.c
+++ b/gdb/dwarf2loc.c
@@ -1893,9 +1893,10 @@ write_pieced_value (struct value *to, struct value *from)
&optim, &unavail))
{
if (optim)
- error (_("Can't do read-modify-write to "
- "update bitfield; containing word has been "
- "optimized out"));
+ throw_error (OPTIMIZED_OUT_ERROR,
+ _("Can't do read-modify-write to "
+ "update bitfield; containing word "
+ "has been optimized out"));
if (unavail)
throw_error (NOT_AVAILABLE_ERROR,
_("Can't do read-modify-write to update "