diff options
author | Jason Molenda <jmolenda@apple.com> | 1999-07-07 20:19:36 +0000 |
---|---|---|
committer | Jason Molenda <jmolenda@apple.com> | 1999-07-07 20:19:36 +0000 |
commit | c5aa993b1f4add48fbdc6cc3117059f616e49875 (patch) | |
tree | c809d06515a34428cc8df5f758fbc1b6117d4c30 /gdb/gdbserver/low-sun3.c | |
parent | 3a4b77d8bee950afce6f9702aa65dc0e60817a82 (diff) | |
download | gdb-c5aa993b1f4add48fbdc6cc3117059f616e49875.zip gdb-c5aa993b1f4add48fbdc6cc3117059f616e49875.tar.gz gdb-c5aa993b1f4add48fbdc6cc3117059f616e49875.tar.bz2 |
import gdb-1999-07-07 post reformat
Diffstat (limited to 'gdb/gdbserver/low-sun3.c')
-rw-r--r-- | gdb/gdbserver/low-sun3.c | 51 |
1 files changed, 26 insertions, 25 deletions
diff --git a/gdb/gdbserver/low-sun3.c b/gdb/gdbserver/low-sun3.c index c84b79f..11f1d8a 100644 --- a/gdb/gdbserver/low-sun3.c +++ b/gdb/gdbserver/low-sun3.c @@ -1,21 +1,22 @@ /* Low level interface to ptrace, for the remote server for GDB. Copyright (C) 1986, 1987, 1993 Free Software Foundation, Inc. -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 "defs.h" #include "<sys/wait.h>" @@ -92,7 +93,7 @@ kill_inferior () return; ptrace (8, inferior_pid, 0, 0); wait (0); - /*************inferior_died ();****VK**************/ +/*************inferior_died ();****VK**************/ } /* Return nonzero if the given thread is still alive. */ @@ -162,25 +163,25 @@ fetch_inferior_registers (ignored) struct fp_status inferior_fp_registers; ptrace (PTRACE_GETREGS, inferior_pid, - (PTRACE_ARG3_TYPE) &inferior_registers); + (PTRACE_ARG3_TYPE) & inferior_registers); #ifdef FP0_REGNUM ptrace (PTRACE_GETFPREGS, inferior_pid, - (PTRACE_ARG3_TYPE) &inferior_fp_registers); -#endif - + (PTRACE_ARG3_TYPE) & inferior_fp_registers); +#endif + memcpy (registers, &inferior_registers, 16 * 4); #ifdef FP0_REGNUM memcpy (®isters[REGISTER_BYTE (FP0_REGNUM)], &inferior_fp_registers, sizeof inferior_fp_registers.fps_regs); -#endif - *(int *)®isters[REGISTER_BYTE (PS_REGNUM)] = inferior_registers.r_ps; - *(int *)®isters[REGISTER_BYTE (PC_REGNUM)] = inferior_registers.r_pc; +#endif + *(int *) ®isters[REGISTER_BYTE (PS_REGNUM)] = inferior_registers.r_ps; + *(int *) ®isters[REGISTER_BYTE (PC_REGNUM)] = inferior_registers.r_pc; #ifdef FP0_REGNUM memcpy (®isters[REGISTER_BYTE (FPC_REGNUM)], &inferior_fp_registers.fps_control, sizeof inferior_fp_registers - sizeof inferior_fp_registers.fps_regs); -#endif +#endif } /* Store our register values back into the inferior. @@ -200,8 +201,8 @@ store_inferior_registers (ignored) ®isters[REGISTER_BYTE (FP0_REGNUM)], sizeof inferior_fp_registers.fps_regs); #endif - inferior_registers.r_ps = *(int *)®isters[REGISTER_BYTE (PS_REGNUM)]; - inferior_registers.r_pc = *(int *)®isters[REGISTER_BYTE (PC_REGNUM)]; + inferior_registers.r_ps = *(int *) ®isters[REGISTER_BYTE (PS_REGNUM)]; + inferior_registers.r_pc = *(int *) ®isters[REGISTER_BYTE (PC_REGNUM)]; #ifdef FP0_REGNUM memcpy (&inferior_fp_registers.fps_control, @@ -211,10 +212,10 @@ store_inferior_registers (ignored) #endif ptrace (PTRACE_SETREGS, inferior_pid, - (PTRACE_ARG3_TYPE) &inferior_registers); + (PTRACE_ARG3_TYPE) & inferior_registers); #if FP0_REGNUM ptrace (PTRACE_SETFPREGS, inferior_pid, - (PTRACE_ARG3_TYPE) &inferior_fp_registers); + (PTRACE_ARG3_TYPE) & inferior_fp_registers); #endif } |