Module Name: src Committed By: rin Date: Thu Aug 17 05:48:09 UTC 2023
Modified Files: src/external/gpl3/gdb/dist/gdb: mips-netbsd-nat.c Log Message: gdb/mips: Specify LWP ID for PT_[GS]ET{,FP}REGS, lost during merge To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/external/gpl3/gdb/dist/gdb/mips-netbsd-nat.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/external/gpl3/gdb/dist/gdb/mips-netbsd-nat.c diff -u src/external/gpl3/gdb/dist/gdb/mips-netbsd-nat.c:1.2 src/external/gpl3/gdb/dist/gdb/mips-netbsd-nat.c:1.3 --- src/external/gpl3/gdb/dist/gdb/mips-netbsd-nat.c:1.2 Mon Aug 14 20:42:27 2023 +++ src/external/gpl3/gdb/dist/gdb/mips-netbsd-nat.c Thu Aug 17 05:48:09 2023 @@ -54,13 +54,14 @@ void mips_nbsd_nat_target::fetch_registers (struct regcache *regcache, int regno) { pid_t pid = regcache->ptid ().pid (); + int lwp = regcache->ptid ().lwp (); struct gdbarch *gdbarch = regcache->arch (); if (regno == -1 || getregs_supplies (gdbarch, regno)) { struct reg regs; - if (ptrace (PT_GETREGS, pid, (PTRACE_TYPE_ARG3) ®s, 0) == -1) + if (ptrace (PT_GETREGS, pid, (PTRACE_TYPE_ARG3) ®s, lwp) == -1) perror_with_name (_("Couldn't get registers")); mipsnbsd_supply_reg (regcache, (char *) ®s, regno); @@ -73,7 +74,7 @@ mips_nbsd_nat_target::fetch_registers (s { struct fpreg fpregs; - if (ptrace (PT_GETFPREGS, pid, (PTRACE_TYPE_ARG3) &fpregs, 0) == -1) + if (ptrace (PT_GETFPREGS, pid, (PTRACE_TYPE_ARG3) &fpregs, lwp) == -1) perror_with_name (_("Couldn't get floating point status")); mipsnbsd_supply_fpreg (regcache, (char *) &fpregs, regno); @@ -84,18 +85,19 @@ void mips_nbsd_nat_target::store_registers (struct regcache *regcache, int regno) { pid_t pid = regcache->ptid ().pid (); + int lwp = regcache->ptid ().lwp (); struct gdbarch *gdbarch = regcache->arch (); if (regno == -1 || getregs_supplies (gdbarch, regno)) { struct reg regs; - if (ptrace (PT_GETREGS, pid, (PTRACE_TYPE_ARG3) ®s, 0) == -1) + if (ptrace (PT_GETREGS, pid, (PTRACE_TYPE_ARG3) ®s, lwp) == -1) perror_with_name (_("Couldn't get registers")); mipsnbsd_fill_reg (regcache, (char *) ®s, regno); - if (ptrace (PT_SETREGS, pid, (PTRACE_TYPE_ARG3) ®s, 0) == -1) + if (ptrace (PT_SETREGS, pid, (PTRACE_TYPE_ARG3) ®s, lwp) == -1) perror_with_name (_("Couldn't write registers")); if (regno != -1) @@ -107,12 +109,12 @@ mips_nbsd_nat_target::store_registers (s { struct fpreg fpregs; - if (ptrace (PT_GETFPREGS, pid, (PTRACE_TYPE_ARG3) &fpregs, 0) == -1) + if (ptrace (PT_GETFPREGS, pid, (PTRACE_TYPE_ARG3) &fpregs, lwp) == -1) perror_with_name (_("Couldn't get floating point status")); mipsnbsd_fill_fpreg (regcache, (char *) &fpregs, regno); - if (ptrace (PT_SETFPREGS, pid, (PTRACE_TYPE_ARG3) &fpregs, 0) == -1) + if (ptrace (PT_SETFPREGS, pid, (PTRACE_TYPE_ARG3) &fpregs, lwp) == -1) perror_with_name (_("Couldn't write floating point status")); } }