OpenCores
URL https://opencores.org/ocsvn/or1k/or1k/trunk

Subversion Repositories or1k

[/] [or1k/] [trunk/] [gdb-5.3/] [gdb/] [remote-vx960.c] - Blame information for rev 1774

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 1181 sfurman
// OBSOLETE /* i80960-dependent portions of the RPC protocol
2
// OBSOLETE    used with a VxWorks target 
3
// OBSOLETE 
4
// OBSOLETE    Contributed by Wind River Systems.
5
// OBSOLETE 
6
// OBSOLETE    This file is part of GDB.
7
// OBSOLETE 
8
// OBSOLETE    This program is free software; you can redistribute it and/or modify
9
// OBSOLETE    it under the terms of the GNU General Public License as published by
10
// OBSOLETE    the Free Software Foundation; either version 2 of the License, or
11
// OBSOLETE    (at your option) any later version.
12
// OBSOLETE 
13
// OBSOLETE    This program is distributed in the hope that it will be useful,
14
// OBSOLETE    but WITHOUT ANY WARRANTY; without even the implied warranty of
15
// OBSOLETE    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16
// OBSOLETE    GNU General Public License for more details.
17
// OBSOLETE 
18
// OBSOLETE    You should have received a copy of the GNU General Public License
19
// OBSOLETE    along with this program; if not, write to the Free Software
20
// OBSOLETE    Foundation, Inc., 59 Temple Place - Suite 330,
21
// OBSOLETE    Boston, MA 02111-1307, USA.  */
22
// OBSOLETE 
23
// OBSOLETE #include <stdio.h>
24
// OBSOLETE #include "defs.h"
25
// OBSOLETE 
26
// OBSOLETE #include "vx-share/regPacket.h"
27
// OBSOLETE #include "frame.h"
28
// OBSOLETE #include "inferior.h"
29
// OBSOLETE #include "target.h"
30
// OBSOLETE #include "gdbcore.h"
31
// OBSOLETE #include "command.h"
32
// OBSOLETE #include "symtab.h"
33
// OBSOLETE #include "symfile.h"                /* for struct complaint */
34
// OBSOLETE #include "regcache.h"
35
// OBSOLETE 
36
// OBSOLETE #include "gdb_string.h"
37
// OBSOLETE #include <errno.h>
38
// OBSOLETE #include <fcntl.h>
39
// OBSOLETE #include <sys/types.h>
40
// OBSOLETE #include <sys/time.h>
41
// OBSOLETE #include <sys/socket.h>
42
// OBSOLETE 
43
// OBSOLETE #ifdef _AIX                 /* IBM claims "void *malloc()" not char * */
44
// OBSOLETE #define malloc bogon_malloc
45
// OBSOLETE #endif
46
// OBSOLETE 
47
// OBSOLETE #include <rpc/rpc.h>
48
// OBSOLETE #include <sys/time.h>               /* UTek's <rpc/rpc.h> doesn't #incl this */
49
// OBSOLETE #include <netdb.h>
50
// OBSOLETE #include "vx-share/ptrace.h"
51
// OBSOLETE #include "vx-share/xdr_ptrace.h"
52
// OBSOLETE #include "vx-share/xdr_ld.h"
53
// OBSOLETE #include "vx-share/xdr_rdb.h"
54
// OBSOLETE #include "vx-share/dbgRpcLib.h"
55
// OBSOLETE 
56
// OBSOLETE /* get rid of value.h if possible */
57
// OBSOLETE #include <value.h>
58
// OBSOLETE #include <symtab.h>
59
// OBSOLETE 
60
// OBSOLETE /* Flag set if target has fpu */
61
// OBSOLETE 
62
// OBSOLETE extern int target_has_fp;
63
// OBSOLETE 
64
// OBSOLETE /* 960 floating point format descriptor, from "i960-tdep.c."  */
65
// OBSOLETE 
66
// OBSOLETE extern struct ext_format ext_format_i960;
67
// OBSOLETE 
68
// OBSOLETE /* Generic register read/write routines in remote-vx.c.  */
69
// OBSOLETE 
70
// OBSOLETE extern void net_read_registers ();
71
// OBSOLETE extern void net_write_registers ();
72
// OBSOLETE 
73
// OBSOLETE /* Read a register or registers from the VxWorks target.
74
// OBSOLETE    REGNO is the register to read, or -1 for all; currently,
75
// OBSOLETE    it is ignored.  FIXME look at regno to improve efficiency.  */
76
// OBSOLETE 
77
// OBSOLETE void
78
// OBSOLETE vx_read_register (int regno)
79
// OBSOLETE {
80
// OBSOLETE   char i960_greg_packet[I960_GREG_PLEN];
81
// OBSOLETE   char i960_fpreg_packet[I960_FPREG_PLEN];
82
// OBSOLETE 
83
// OBSOLETE   /* Get general-purpose registers.  When copying values into
84
// OBSOLETE      registers [], don't assume that a location in registers []
85
// OBSOLETE      is properly aligned for the target data type.  */
86
// OBSOLETE 
87
// OBSOLETE   net_read_registers (i960_greg_packet, I960_GREG_PLEN, PTRACE_GETREGS);
88
// OBSOLETE 
89
// OBSOLETE   bcopy (&i960_greg_packet[I960_R_R0],
90
// OBSOLETE      &registers[REGISTER_BYTE (R0_REGNUM)], 16 * I960_GREG_SIZE);
91
// OBSOLETE   bcopy (&i960_greg_packet[I960_R_G0],
92
// OBSOLETE      &registers[REGISTER_BYTE (G0_REGNUM)], 16 * I960_GREG_SIZE);
93
// OBSOLETE   bcopy (&i960_greg_packet[I960_R_PCW],
94
// OBSOLETE      &registers[REGISTER_BYTE (PCW_REGNUM)], sizeof (int));
95
// OBSOLETE   bcopy (&i960_greg_packet[I960_R_ACW],
96
// OBSOLETE      &registers[REGISTER_BYTE (ACW_REGNUM)], sizeof (int));
97
// OBSOLETE   bcopy (&i960_greg_packet[I960_R_TCW],
98
// OBSOLETE      &registers[REGISTER_BYTE (TCW_REGNUM)], sizeof (int));
99
// OBSOLETE 
100
// OBSOLETE   /* If the target has floating point registers, fetch them.
101
// OBSOLETE      Otherwise, zero the floating point register values in
102
// OBSOLETE      registers[] for good measure, even though we might not
103
// OBSOLETE      need to.  */
104
// OBSOLETE 
105
// OBSOLETE   if (target_has_fp)
106
// OBSOLETE     {
107
// OBSOLETE       net_read_registers (i960_fpreg_packet, I960_FPREG_PLEN,
108
// OBSOLETE                       PTRACE_GETFPREGS);
109
// OBSOLETE       bcopy (&i960_fpreg_packet[I960_R_FP0],
110
// OBSOLETE          &registers[REGISTER_BYTE (FP0_REGNUM)],
111
// OBSOLETE          REGISTER_RAW_SIZE (FP0_REGNUM) * 4);
112
// OBSOLETE     }
113
// OBSOLETE   else
114
// OBSOLETE     bzero (&registers[REGISTER_BYTE (FP0_REGNUM)],
115
// OBSOLETE        REGISTER_RAW_SIZE (FP0_REGNUM) * 4);
116
// OBSOLETE 
117
// OBSOLETE   /* Mark the register cache valid.  */
118
// OBSOLETE 
119
// OBSOLETE   registers_fetched ();
120
// OBSOLETE }
121
// OBSOLETE 
122
// OBSOLETE /* Store a register or registers into the VxWorks target.
123
// OBSOLETE    REGNO is the register to store, or -1 for all; currently,
124
// OBSOLETE    it is ignored.  FIXME look at regno to improve efficiency.  */
125
// OBSOLETE 
126
// OBSOLETE void
127
// OBSOLETE vx_write_register (int regno)
128
// OBSOLETE {
129
// OBSOLETE   char i960_greg_packet[I960_GREG_PLEN];
130
// OBSOLETE   char i960_fpreg_packet[I960_FPREG_PLEN];
131
// OBSOLETE 
132
// OBSOLETE   /* Store floating-point registers.  When copying values from
133
// OBSOLETE      registers [], don't assume that a location in registers []
134
// OBSOLETE      is properly aligned for the target data type.  */
135
// OBSOLETE 
136
// OBSOLETE   bcopy (&registers[REGISTER_BYTE (R0_REGNUM)],
137
// OBSOLETE      &i960_greg_packet[I960_R_R0], 16 * I960_GREG_SIZE);
138
// OBSOLETE   bcopy (&registers[REGISTER_BYTE (G0_REGNUM)],
139
// OBSOLETE      &i960_greg_packet[I960_R_G0], 16 * I960_GREG_SIZE);
140
// OBSOLETE   bcopy (&registers[REGISTER_BYTE (PCW_REGNUM)],
141
// OBSOLETE      &i960_greg_packet[I960_R_PCW], sizeof (int));
142
// OBSOLETE   bcopy (&registers[REGISTER_BYTE (ACW_REGNUM)],
143
// OBSOLETE      &i960_greg_packet[I960_R_ACW], sizeof (int));
144
// OBSOLETE   bcopy (&registers[REGISTER_BYTE (TCW_REGNUM)],
145
// OBSOLETE      &i960_greg_packet[I960_R_TCW], sizeof (int));
146
// OBSOLETE 
147
// OBSOLETE   net_write_registers (i960_greg_packet, I960_GREG_PLEN, PTRACE_SETREGS);
148
// OBSOLETE 
149
// OBSOLETE   /* Store floating point registers if the target has them.  */
150
// OBSOLETE 
151
// OBSOLETE   if (target_has_fp)
152
// OBSOLETE     {
153
// OBSOLETE       bcopy (&registers[REGISTER_BYTE (FP0_REGNUM)],
154
// OBSOLETE          &i960_fpreg_packet[I960_R_FP0],
155
// OBSOLETE          REGISTER_RAW_SIZE (FP0_REGNUM) * 4);
156
// OBSOLETE 
157
// OBSOLETE       net_write_registers (i960_fpreg_packet, I960_FPREG_PLEN,
158
// OBSOLETE                        PTRACE_SETFPREGS);
159
// OBSOLETE     }
160
// OBSOLETE }

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.