aboutsummaryrefslogtreecommitdiff
path: root/gdb/gdbserver/linux-x86-low.c
diff options
context:
space:
mode:
authorGary Benson <gbenson@redhat.com>2014-08-06 11:56:25 +0100
committerGary Benson <gbenson@redhat.com>2014-08-28 15:06:45 +0100
commit38e08fcac0966f52dac0ec97870fdea4de304d86 (patch)
treeaab65459f955f6622d7544965c141af8b5785926 /gdb/gdbserver/linux-x86-low.c
parent6aefca7e4978b93f502ff8123a6c3cab6e0171f1 (diff)
downloadfsf-binutils-gdb-38e08fcac0966f52dac0ec97870fdea4de304d86.zip
fsf-binutils-gdb-38e08fcac0966f52dac0ec97870fdea4de304d86.tar.gz
fsf-binutils-gdb-38e08fcac0966f52dac0ec97870fdea4de304d86.tar.bz2
Straightforward fatal to internal_error conversions
This commit replaces most of the calls to fatal that represent internal errors with calls to internal_error, either directly or via gdb_assert and gdb_assert_not_reached. gdb/gdbserver/ChangeLog: * inferiors.c (get_thread_process): Replace check with gdb_assert. * linux-low.c (linux_wait_for_event_filtered): Replace fatal with internal_error. (linux_resume_one_lwp): Likewise. * linux-x86-low.c (x86_siginfo_fixup): Replace checks with gdb_assert. * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal with internal_error. * regcache.c (get_thread_regcache): Replace check with gdb_assert. (init_register_cache): Replace fatal with gdb_assert_not_reached. (find_register_by_name): Replace fatal with internal_error. (find_regno): Likewise. * tdesc.c (init_target_desc): Replace check with gdb_assert. * thread-db.c (thread_db_create_event): Likewise. (thread_db_load_search): Likewise. (try_thread_db_load_1): Likewise. * tracepoint.c (get_jump_space_head): Replace fatal with internal_error. (claim_trampoline_space): Likewise. (have_fast_tracepoint_trampoline_buffer): Likewise. (cmd_qtstart): Likewise. (stop_tracing): Likewise. (fast_tracepoint_collecting): Likewise. (target_malloc): Likewise. (download_tracepoint): Likewise. (download_trace_state_variables): Replace check with gdb_assert. (upload_fast_traceframes): Replace fatal with internal_error.
Diffstat (limited to 'gdb/gdbserver/linux-x86-low.c')
-rw-r--r--gdb/gdbserver/linux-x86-low.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/gdb/gdbserver/linux-x86-low.c b/gdb/gdbserver/linux-x86-low.c
index 7a8a473..a47fcbe 100644
--- a/gdb/gdbserver/linux-x86-low.c
+++ b/gdb/gdbserver/linux-x86-low.c
@@ -1227,8 +1227,7 @@ x86_siginfo_fixup (siginfo_t *native, void *inf, int direction)
/* Is the inferior 32-bit? If so, then fixup the siginfo object. */
if (!is_64bit_tdesc ())
{
- if (sizeof (siginfo_t) != sizeof (compat_siginfo_t))
- fatal ("unexpected difference in siginfo");
+ gdb_assert (sizeof (siginfo_t) == sizeof (compat_siginfo_t));
if (direction == 0)
compat_siginfo_from_siginfo ((struct compat_siginfo *) inf, native);
@@ -1240,8 +1239,7 @@ x86_siginfo_fixup (siginfo_t *native, void *inf, int direction)
/* No fixup for native x32 GDB. */
else if (!is_elf64 && sizeof (void *) == 8)
{
- if (sizeof (siginfo_t) != sizeof (compat_x32_siginfo_t))
- fatal ("unexpected difference in siginfo");
+ gdb_assert (sizeof (siginfo_t) == sizeof (compat_x32_siginfo_t));
if (direction == 0)
compat_x32_siginfo_from_siginfo ((struct compat_x32_siginfo *) inf,