From f15f99484e2dd62e08e1200678c3919c8399adea Mon Sep 17 00:00:00 2001 From: Thiago Jung Bauermann Date: Tue, 24 Apr 2012 15:03:43 +0000 Subject: * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c. (PTRACE_ARG4_TYPE): Likewise. (PTRACE_XFER_TYPE): Likewise. * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of ptrace to PTRACE_ARG3_TYPE. * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h. (PTRACE_ARG4_TYPE): Likewise. (PTRACE_XFER_TYPE): Likewise. (linux_detach_one_lwp): Cast fourth argument of ptrace to long then PTRACE_ARG4_TYPE. (regsets_fetch_inferior_registers): Cast third argument of ptrace to long then PTRACE_ARG3_TYPE. (regsets_store_inferior_registers): Likewise. --- gdb/gdbserver/linux-arm-low.c | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) (limited to 'gdb/gdbserver/linux-arm-low.c') diff --git a/gdb/gdbserver/linux-arm-low.c b/gdb/gdbserver/linux-arm-low.c index bf1792b..c4d2000 100644 --- a/gdb/gdbserver/linux-arm-low.c +++ b/gdb/gdbserver/linux-arm-low.c @@ -709,13 +709,15 @@ arm_prepare_to_resume (struct lwp_info *lwp) errno = 0; if (arm_hwbp_control_is_enabled (proc_info->bpts[i].control)) - if (ptrace (PTRACE_SETHBPREGS, pid, ((i << 1) + 1), - &proc_info->bpts[i].address) < 0) + if (ptrace (PTRACE_SETHBPREGS, pid, + (PTRACE_ARG3_TYPE) ((i << 1) + 1), + &proc_info->bpts[i].address) < 0) perror_with_name ("Unexpected error setting breakpoint address"); if (arm_hwbp_control_is_initialized (proc_info->bpts[i].control)) - if (ptrace (PTRACE_SETHBPREGS, pid, ((i << 1) + 2), - &proc_info->bpts[i].control) < 0) + if (ptrace (PTRACE_SETHBPREGS, pid, + (PTRACE_ARG3_TYPE) ((i << 1) + 2), + &proc_info->bpts[i].control) < 0) perror_with_name ("Unexpected error setting breakpoint"); lwp_info->bpts_changed[i] = 0; @@ -727,13 +729,15 @@ arm_prepare_to_resume (struct lwp_info *lwp) errno = 0; if (arm_hwbp_control_is_enabled (proc_info->wpts[i].control)) - if (ptrace (PTRACE_SETHBPREGS, pid, -((i << 1) + 1), - &proc_info->wpts[i].address) < 0) + if (ptrace (PTRACE_SETHBPREGS, pid, + (PTRACE_ARG3_TYPE) -((i << 1) + 1), + &proc_info->wpts[i].address) < 0) perror_with_name ("Unexpected error setting watchpoint address"); if (arm_hwbp_control_is_initialized (proc_info->wpts[i].control)) - if (ptrace (PTRACE_SETHBPREGS, pid, -((i << 1) + 2), - &proc_info->wpts[i].control) < 0) + if (ptrace (PTRACE_SETHBPREGS, pid, + (PTRACE_ARG3_TYPE) -((i << 1) + 2), + &proc_info->wpts[i].control) < 0) perror_with_name ("Unexpected error setting watchpoint"); lwp_info->wpts_changed[i] = 0; -- cgit v1.1