Module Name: src Committed By: rin Date: Tue Aug 22 06:20:32 UTC 2023
Modified Files: src/external/gpl3/gdb/dist/gdb: riscv-netbsd-nat.c Log Message: gdb/riscv: Specify lwpid for PT_[GS]ETREGS To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/external/gpl3/gdb/dist/gdb/riscv-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/riscv-netbsd-nat.c diff -u src/external/gpl3/gdb/dist/gdb/riscv-netbsd-nat.c:1.1 src/external/gpl3/gdb/dist/gdb/riscv-netbsd-nat.c:1.2 --- src/external/gpl3/gdb/dist/gdb/riscv-netbsd-nat.c:1.1 Mon Aug 14 20:42:27 2023 +++ src/external/gpl3/gdb/dist/gdb/riscv-netbsd-nat.c Tue Aug 22 06:20:32 2023 @@ -71,7 +71,7 @@ riscv_nbsd_nat_target::fetch_registers ( { 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")); regcache->supply_regset (&riscv_nbsd_gregset, regnum, ®s, @@ -104,13 +104,13 @@ riscv_nbsd_nat_target::store_registers ( { 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")); regcache->collect_regset (&riscv_nbsd_gregset, regnum, ®s, sizeof (regs)); - 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")); } @@ -118,13 +118,13 @@ riscv_nbsd_nat_target::store_registers ( { 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")); regcache->collect_regset (&riscv_nbsd_fpregset, regnum, &fpregs, sizeof (fpregs)); - 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")); } } @@ -139,5 +139,3 @@ _initialize_riscv_nbsd_nat () // bsd_kvm_add_target (riscv_nbsd_supply_pcb); } - -