This is the mail archive of the gdb-cvs@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[binutils-gdb] arm-nbsd-nat: Use ptid from regcache instead of inferior_ptid


https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=9ac8a7c281aa949cf588cccb9977ea51eaff8130

commit 9ac8a7c281aa949cf588cccb9977ea51eaff8130
Author: Simon Marchi <simon.marchi@polymtl.ca>
Date:   Fri Mar 17 13:55:50 2017 -0400

    arm-nbsd-nat: Use ptid from regcache instead of inferior_ptid
    
    gdb/ChangeLog:
    
    	* arm-nbsd-nat.c (fetch_register, fetch_regs, fetch_fp_register,
    	fetch_fp_regs, store_register, store_regs, store_fp_register,
    	store_fp_regs): Use ptid from regcache.

Diff:
---
 gdb/ChangeLog      |  6 ++++++
 gdb/arm-nbsd-nat.c | 20 ++++++++++----------
 2 files changed, 16 insertions(+), 10 deletions(-)

diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index bcc2cbc..2cd9e6d 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,11 @@
 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
 
+	* arm-nbsd-nat.c (fetch_register, fetch_regs, fetch_fp_register,
+	fetch_fp_regs, store_register, store_regs, store_fp_register,
+	store_fp_regs): Use ptid from regcache.
+
+2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
+
 	* arm-linux-nat.c (fetch_fpregs, store_fpregs, fetch_regs,
 	store_regs, fetch_wmmx_regs, store_wmmx_regs, fetch_vfp_regs,
 	store_vfp_regs): Use ptid from regcache.
diff --git a/gdb/arm-nbsd-nat.c b/gdb/arm-nbsd-nat.c
index 95bb1b2..f066528 100644
--- a/gdb/arm-nbsd-nat.c
+++ b/gdb/arm-nbsd-nat.c
@@ -77,7 +77,7 @@ fetch_register (struct regcache *regcache, int regno)
   struct reg inferior_registers;
   int ret;
 
-  ret = ptrace (PT_GETREGS, ptid_get_pid (inferior_ptid),
+  ret = ptrace (PT_GETREGS, ptid_get_pid (regcache_get_ptid (regcache)),
 		(PTRACE_TYPE_ARG3) &inferior_registers, 0);
 
   if (ret < 0)
@@ -130,7 +130,7 @@ fetch_regs (struct regcache *regcache)
   int ret;
   int regno;
 
-  ret = ptrace (PT_GETREGS, ptid_get_pid (inferior_ptid),
+  ret = ptrace (PT_GETREGS, ptid_get_pid (regcache_get_ptid (regcache)),
 		(PTRACE_TYPE_ARG3) &inferior_registers, 0);
 
   if (ret < 0)
@@ -148,7 +148,7 @@ fetch_fp_register (struct regcache *regcache, int regno)
   struct fpreg inferior_fp_registers;
   int ret;
 
-  ret = ptrace (PT_GETFPREGS, ptid_get_pid (inferior_ptid),
+  ret = ptrace (PT_GETFPREGS, ptid_get_pid (regcache_get_ptid (regcache)),
 		(PTRACE_TYPE_ARG3) &inferior_fp_registers, 0);
 
   if (ret < 0)
@@ -178,7 +178,7 @@ fetch_fp_regs (struct regcache *regcache)
   int ret;
   int regno;
 
-  ret = ptrace (PT_GETFPREGS, ptid_get_pid (inferior_ptid),
+  ret = ptrace (PT_GETFPREGS, ptid_get_pid (regcache_get_ptid (regcache)),
 		(PTRACE_TYPE_ARG3) &inferior_fp_registers, 0);
 
   if (ret < 0)
@@ -216,7 +216,7 @@ store_register (const struct regcache *regcache, int regno)
   struct reg inferior_registers;
   int ret;
 
-  ret = ptrace (PT_GETREGS, ptid_get_pid (inferior_ptid),
+  ret = ptrace (PT_GETREGS, ptid_get_pid (regcache_get_ptid (regcache)),
 		(PTRACE_TYPE_ARG3) &inferior_registers, 0);
 
   if (ret < 0)
@@ -279,7 +279,7 @@ store_register (const struct regcache *regcache, int regno)
       break;
     }
 
-  ret = ptrace (PT_SETREGS, ptid_get_pid (inferior_ptid),
+  ret = ptrace (PT_SETREGS, ptid_get_pid (regcache_get_ptid (regcache)),
 		(PTRACE_TYPE_ARG3) &inferior_registers, 0);
 
   if (ret < 0)
@@ -327,7 +327,7 @@ store_regs (const struct regcache *regcache)
       inferior_registers.r_pc = pc_val | psr_val;
     }
 
-  ret = ptrace (PT_SETREGS, ptid_get_pid (inferior_ptid),
+  ret = ptrace (PT_SETREGS, ptid_get_pid (regcache_get_ptid (regcache)),
 		(PTRACE_TYPE_ARG3) &inferior_registers, 0);
 
   if (ret < 0)
@@ -340,7 +340,7 @@ store_fp_register (const struct regcache *regcache, int regno)
   struct fpreg inferior_fp_registers;
   int ret;
 
-  ret = ptrace (PT_GETFPREGS, ptid_get_pid (inferior_ptid),
+  ret = ptrace (PT_GETFPREGS, ptid_get_pid (regcache_get_ptid (regcache)),
 		(PTRACE_TYPE_ARG3) &inferior_fp_registers, 0);
 
   if (ret < 0)
@@ -362,7 +362,7 @@ store_fp_register (const struct regcache *regcache, int regno)
       break;
     }
 
-  ret = ptrace (PT_SETFPREGS, ptid_get_pid (inferior_ptid),
+  ret = ptrace (PT_SETFPREGS, ptid_get_pid (regcache_get_ptid (regcache)),
 		(PTRACE_TYPE_ARG3) &inferior_fp_registers, 0);
 
   if (ret < 0)
@@ -384,7 +384,7 @@ store_fp_regs (const struct regcache *regcache)
   regcache_raw_collect (regcache, ARM_FPS_REGNUM,
 			(char *) &inferior_fp_registers.fpr_fpsr);
 
-  ret = ptrace (PT_SETFPREGS, ptid_get_pid (inferior_ptid),
+  ret = ptrace (PT_SETFPREGS, ptid_get_pid (regcache_get_ptid (regcache)),
 		(PTRACE_TYPE_ARG3) &inferior_fp_registers, 0);
 
   if (ret < 0)


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]