Shorten register coping code.
This commit is contained in:
parent
fb5f2e6e92
commit
acc7239f63
@ -17,7 +17,7 @@ You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
|
||||
$Id: m68k-nat.c,v 1.5 1995/01/26 18:27:39 mycroft Exp $
|
||||
$Id: m68k-nat.c,v 1.6 1995/01/26 18:28:18 mycroft Exp $
|
||||
*/
|
||||
|
||||
#include <sys/types.h>
|
||||
@ -40,12 +40,12 @@ fetch_inferior_registers (regno)
|
||||
ptrace (PT_GETREGS, inferior_pid,
|
||||
(PTRACE_ARG3_TYPE) &inferior_registers, 0);
|
||||
|
||||
memcpy (®isters[REGISTER_BYTE (0)], &inferior_registers.r_regs[0], 4*18);
|
||||
memcpy (®isters[REGISTER_BYTE (0)], &inferior_registers, 4*18);
|
||||
|
||||
ptrace (PT_GETFPREGS, inferior_pid,
|
||||
(PTRACE_ARG3_TYPE) &inferior_fp_registers, 0);
|
||||
|
||||
memcpy (®isters[REGISTER_BYTE (18)], &inferior_fp_registers.r_regs[0], 8*12+4*3);
|
||||
memcpy (®isters[REGISTER_BYTE (18)], &inferior_fp_registers, 8*12+4*3);
|
||||
|
||||
registers_fetched ();
|
||||
}
|
||||
@ -57,12 +57,12 @@ store_inferior_registers (regno)
|
||||
struct reg inferior_registers;
|
||||
struct fpreg inferior_fp_registers;
|
||||
|
||||
memcpy (&inferior_registers.r_regs[0], ®isters[REGISTER_BYTE (0)], 4*18);
|
||||
memcpy (&inferior_registers, ®isters[REGISTER_BYTE (0)], 4*18);
|
||||
|
||||
ptrace (PT_SETREGS, inferior_pid,
|
||||
(PTRACE_ARG3_TYPE) &inferior_registers, 0);
|
||||
|
||||
memcpy (&inferior_fp_registers.r_regs[0], ®isters[REGISTER_BYTE (18)], 8*12+4*3);
|
||||
memcpy (&inferior_fp_registers, ®isters[REGISTER_BYTE (18)], 8*12+4*3);
|
||||
|
||||
ptrace (PT_SETFPREGS, inferior_pid,
|
||||
(PTRACE_ARG3_TYPE) &inferior_fp_registers, 0);
|
||||
|
Loading…
Reference in New Issue
Block a user