mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-08-06 06:45:56 +08:00
MIPS ptrace build fixes
Since Pedro's ptrace cleanups, the MIPS buildbot compilation fails. Code in MIPS native uses ptrace with 3 arguments, where ptrace requires 4. When looking at the definition of ptrace in /usr/include/sys/ptrace.h, it shows that it takes a variable number of arguments. The wrapper macro in nat/gdb_ptrace.h takes a fixed number of arguments (4). That would explain why it used to work and stopped. I am pushing this as obvious, tell me if there is any problem. I built-tested this with a MIPS toolchain (ct-ng), but I don't have any setup to test it. At least it should put back the buildbot builder in a better shape. gdb/ChangeLog: * mips-linux-nat.c (write_watchpoint_regs): Add NULL as ptrace's 4th parameter. (mips_linux_new_thread): Likewise. * nat/mips-linux-watch.c (mips_linux_read_watch_registers): Likewise. gdb/gdbserver/ChangeLog: * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as ptrace's 4th parameter.
This commit is contained in:
@ -614,7 +614,7 @@ write_watchpoint_regs (void)
|
||||
ALL_LWPS (lp)
|
||||
{
|
||||
tid = ptid_get_lwp (lp->ptid);
|
||||
if (ptrace (PTRACE_SET_WATCH_REGS, tid, &watch_mirror) == -1)
|
||||
if (ptrace (PTRACE_SET_WATCH_REGS, tid, &watch_mirror, NULL) == -1)
|
||||
perror_with_name (_("Couldn't write debug register"));
|
||||
}
|
||||
return 0;
|
||||
@ -634,7 +634,7 @@ mips_linux_new_thread (struct lwp_info *lp)
|
||||
return;
|
||||
|
||||
tid = ptid_get_lwp (lp->ptid);
|
||||
if (ptrace (PTRACE_SET_WATCH_REGS, tid, &watch_mirror) == -1)
|
||||
if (ptrace (PTRACE_SET_WATCH_REGS, tid, &watch_mirror, NULL) == -1)
|
||||
perror_with_name (_("Couldn't write debug register"));
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user