diff options
author | Gary Benson <gbenson@redhat.com> | 2014-06-11 15:42:34 +0100 |
---|---|---|
committer | Gary Benson <gbenson@redhat.com> | 2014-06-18 10:15:19 +0100 |
commit | e927c9fccb149b2a7bbdce1efd1a07d4367444a2 (patch) | |
tree | bdae357d54e282ec4f5518963ec7d454b5f9b202 /gdb/gdbserver | |
parent | 1b6d4134c776d54513114199f1478f83894f490b (diff) | |
download | gdb-e927c9fccb149b2a7bbdce1efd1a07d4367444a2.zip gdb-e927c9fccb149b2a7bbdce1efd1a07d4367444a2.tar.gz gdb-e927c9fccb149b2a7bbdce1efd1a07d4367444a2.tar.bz2 |
Merge error handling
This commit makes all error handling in i386-low.c use internal_error
rather than fatal and error.
gdb/gdbserver/
2014-06-18 Gary Benson <gbenson@redhat.com>
* i386-low.c (i386_length_and_rw_bits): Use internal_error
instead of fatal and error.
(i386_handle_nonaligned_watchpoint): Likewise.
Diffstat (limited to 'gdb/gdbserver')
-rw-r--r-- | gdb/gdbserver/ChangeLog | 6 | ||||
-rw-r--r-- | gdb/gdbserver/i386-low.c | 19 |
2 files changed, 16 insertions, 9 deletions
diff --git a/gdb/gdbserver/ChangeLog b/gdb/gdbserver/ChangeLog index 47a538f..91dc498 100644 --- a/gdb/gdbserver/ChangeLog +++ b/gdb/gdbserver/ChangeLog @@ -1,5 +1,11 @@ 2014-06-18 Gary Benson <gbenson@redhat.com> + * i386-low.c (i386_length_and_rw_bits): Use internal_error + instead of fatal and error. + (i386_handle_nonaligned_watchpoint): Likewise. + +2014-06-18 Gary Benson <gbenson@redhat.com> + * i386-low.c (i386_get_debug_register_length): New macro. (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro. (i386_show_dr): Use debug_printf instead of fprintf. Use diff --git a/gdb/gdbserver/i386-low.c b/gdb/gdbserver/i386-low.c index b154fcd..54dd4b8 100644 --- a/gdb/gdbserver/i386-low.c +++ b/gdb/gdbserver/i386-low.c @@ -225,7 +225,9 @@ i386_length_and_rw_bits (int len, enum target_hw_bp_type type) rw = DR_RW_WRITE; break; case hw_read: - fatal ("The i386 doesn't support data-read watchpoints.\n"); + internal_error (__FILE__, __LINE__, + _("The i386 doesn't support " + "data-read watchpoints.\n")); case hw_access: rw = DR_RW_READ; break; @@ -236,8 +238,8 @@ i386_length_and_rw_bits (int len, enum target_hw_bp_type type) break; #endif default: - error ("\ -Invalid hardware breakpoint type %d in i386_length_and_rw_bits.\n", + internal_error (__FILE__, __LINE__, _("\ +Invalid hardware breakpoint type %d in i386_length_and_rw_bits.\n"), (int) type); } @@ -254,8 +256,8 @@ Invalid hardware breakpoint type %d in i386_length_and_rw_bits.\n", return (DR_LEN_8 | rw); /* ELSE FALL THROUGH */ default: - error ("\ -Invalid hardware breakpoint length %d in i386_length_and_rw_bits.\n", len); + internal_error (__FILE__, __LINE__, _("\ +Invalid hardware breakpoint length %d in i386_length_and_rw_bits.\n"), len); } } @@ -401,10 +403,9 @@ i386_handle_nonaligned_watchpoint (struct i386_debug_reg_state *state, else if (what == WP_REMOVE) retval = i386_remove_aligned_watchpoint (state, addr, len_rw); else - fatal ("\ -Invalid value %d of operation in i386_handle_nonaligned_watchpoint.\n", - (int) what); - + internal_error (__FILE__, __LINE__, _("\ +Invalid value %d of operation in i386_handle_nonaligned_watchpoint.\n"), + (int) what); if (retval) break; } |