import gdb-1999-07-07 post reformat

This commit is contained in:
Jason Molenda
1999-07-07 20:19:36 +00:00
parent 3a4b77d8be
commit c5aa993b1f
643 changed files with 69889 additions and 65773 deletions

View File

@@ -1,28 +1,29 @@
/* MIPS-dependent portions of the RPC protocol
used with a VxWorks target
Contributed by Wind River Systems.
Contributed by Wind River Systems.
This file is part of GDB.
This file is part of GDB.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
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., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
#include <stdio.h>
#include "defs.h"
#include "vx-share/regPacket.h"
#include "vx-share/regPacket.h"
#include "frame.h"
#include "inferior.h"
#include "wait.h"
@@ -78,50 +79,50 @@ vx_read_register (regno)
/* this code copies the registers obtained by RPC
stored in a structure(s) like this :
Register(s) Offset(s)
gp 0-31 0x00
hi 0x80
lo 0x84
sr 0x88
pc 0x8c
Register(s) Offset(s)
gp 0-31 0x00
hi 0x80
lo 0x84
sr 0x88
pc 0x8c
into a stucture like this:
0x00 GP 0-31
0x80 SR
0x84 LO
0x88 HI
0x8C BAD --- Not available currently
0x90 CAUSE --- Not available currently
0x94 PC
0x98 FP 0-31
0x118 FCSR
0x11C FIR --- Not available currently
0x120 FP --- Not available currently
0x00 GP 0-31
0x80 SR
0x84 LO
0x88 HI
0x8C BAD --- Not available currently
0x90 CAUSE --- Not available currently
0x94 PC
0x98 FP 0-31
0x118 FCSR
0x11C FIR --- Not available currently
0x120 FP --- Not available currently
structure is 0x124 (292) bytes in length */
/* Copy the general registers. */
bcopy (&mips_greg_packet[MIPS_R_GP0], &registers[0], 32 * MIPS_GREG_SIZE);
/* Copy SR, LO, HI, and PC. */
bcopy (&mips_greg_packet[MIPS_R_SR],
&registers[REGISTER_BYTE (PS_REGNUM)], MIPS_GREG_SIZE);
&registers[REGISTER_BYTE (PS_REGNUM)], MIPS_GREG_SIZE);
bcopy (&mips_greg_packet[MIPS_R_LO],
&registers[REGISTER_BYTE (LO_REGNUM)], MIPS_GREG_SIZE);
&registers[REGISTER_BYTE (LO_REGNUM)], MIPS_GREG_SIZE);
bcopy (&mips_greg_packet[MIPS_R_HI],
&registers[REGISTER_BYTE (HI_REGNUM)], MIPS_GREG_SIZE);
&registers[REGISTER_BYTE (HI_REGNUM)], MIPS_GREG_SIZE);
bcopy (&mips_greg_packet[MIPS_R_PC],
&registers[REGISTER_BYTE (PC_REGNUM)], MIPS_GREG_SIZE);
&registers[REGISTER_BYTE (PC_REGNUM)], MIPS_GREG_SIZE);
/* If the target has floating point registers, fetch them.
Otherwise, zero the floating point register values in
registers[] for good measure, even though we might not
need to. */
if (target_has_fp)
{
net_read_registers (mips_fpreg_packet, MIPS_FPREG_PLEN,
@@ -129,23 +130,23 @@ vx_read_register (regno)
/* Copy the floating point registers. */
bcopy (&mips_fpreg_packet[MIPS_R_FP0],
bcopy (&mips_fpreg_packet[MIPS_R_FP0],
&registers[REGISTER_BYTE (FP0_REGNUM)],
REGISTER_RAW_SIZE (FP0_REGNUM) * 32);
/* Copy the floating point control/status register (fpcsr). */
bcopy (&mips_fpreg_packet[MIPS_R_FPCSR],
bcopy (&mips_fpreg_packet[MIPS_R_FPCSR],
&registers[REGISTER_BYTE (FCRCS_REGNUM)],
REGISTER_RAW_SIZE (FCRCS_REGNUM));
}
}
else
{
{
bzero ((char *) &registers[REGISTER_BYTE (FP0_REGNUM)],
REGISTER_RAW_SIZE (FP0_REGNUM) * 32);
bzero ((char *) &registers[REGISTER_BYTE (FCRCS_REGNUM)],
REGISTER_RAW_SIZE (FCRCS_REGNUM));
}
}
/* Mark the register cache valid. */
@@ -165,18 +166,18 @@ vx_write_register (regno)
/* Store general registers. */
bcopy (&registers[0], &mips_greg_packet[MIPS_R_GP0], 32 * MIPS_GREG_SIZE);
/* Copy SR, LO, HI, and PC. */
bcopy (&registers[REGISTER_BYTE (PS_REGNUM)],
&mips_greg_packet[MIPS_R_SR], MIPS_GREG_SIZE);
&mips_greg_packet[MIPS_R_SR], MIPS_GREG_SIZE);
bcopy (&registers[REGISTER_BYTE (LO_REGNUM)],
&mips_greg_packet[MIPS_R_LO], MIPS_GREG_SIZE);
&mips_greg_packet[MIPS_R_LO], MIPS_GREG_SIZE);
bcopy (&registers[REGISTER_BYTE (HI_REGNUM)],
&mips_greg_packet[MIPS_R_HI], MIPS_GREG_SIZE);
&mips_greg_packet[MIPS_R_HI], MIPS_GREG_SIZE);
bcopy (&registers[REGISTER_BYTE (PC_REGNUM)],
&mips_greg_packet[MIPS_R_PC], MIPS_GREG_SIZE);
&mips_greg_packet[MIPS_R_PC], MIPS_GREG_SIZE);
net_write_registers (mips_greg_packet, MIPS_GREG_PLEN, PTRACE_SETREGS);
/* Store floating point registers if the target has them. */
@@ -186,13 +187,13 @@ vx_write_register (regno)
/* Copy the floating point data registers. */
bcopy (&registers[REGISTER_BYTE (FP0_REGNUM)],
&mips_fpreg_packet[MIPS_R_FP0],
&mips_fpreg_packet[MIPS_R_FP0],
REGISTER_RAW_SIZE (FP0_REGNUM) * 32);
/* Copy the floating point control/status register (fpcsr). */
bcopy (&registers[REGISTER_BYTE (FCRCS_REGNUM)],
&mips_fpreg_packet[MIPS_R_FPCSR],
&mips_fpreg_packet[MIPS_R_FPCSR],
REGISTER_RAW_SIZE (FCRCS_REGNUM));
net_write_registers (mips_fpreg_packet, MIPS_FPREG_PLEN,