1 // OBSOLETE /* Native support for Motorola 88k running Harris CX/UX.
2 // OBSOLETE Copyright 1988, 1990, 1991, 1992, 1993, 1994, 1995, 1998, 1999, 2000,
3 // OBSOLETE 2001 Free Software Foundation, Inc.
5 // OBSOLETE This file is part of GDB.
7 // OBSOLETE This program is free software; you can redistribute it and/or modify
8 // OBSOLETE it under the terms of the GNU General Public License as published by
9 // OBSOLETE the Free Software Foundation; either version 2 of the License, or
10 // OBSOLETE (at your option) any later version.
12 // OBSOLETE This program is distributed in the hope that it will be useful,
13 // OBSOLETE but WITHOUT ANY WARRANTY; without even the implied warranty of
14 // OBSOLETE MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 // OBSOLETE GNU General Public License for more details.
17 // OBSOLETE You should have received a copy of the GNU General Public License
18 // OBSOLETE along with this program; if not, write to the Free Software
19 // OBSOLETE Foundation, Inc., 59 Temple Place - Suite 330,
20 // OBSOLETE Boston, MA 02111-1307, USA. */
22 // OBSOLETE #include "defs.h"
23 // OBSOLETE #include "frame.h"
24 // OBSOLETE #include "inferior.h"
26 // OBSOLETE #include <sys/types.h>
27 // OBSOLETE #include <sys/param.h>
28 // OBSOLETE #include <sys/dir.h>
29 // OBSOLETE #include <signal.h>
30 // OBSOLETE #include "gdbcore.h"
31 // OBSOLETE #include <sys/user.h>
33 // OBSOLETE #include "bfd.h"
34 // OBSOLETE #include "symfile.h"
35 // OBSOLETE #include "objfiles.h"
36 // OBSOLETE #include "symtab.h"
37 // OBSOLETE #include "regcache.h"
39 // OBSOLETE #ifndef USER /* added to support BCS ptrace_user */
40 // OBSOLETE #define USER ptrace_user
42 // OBSOLETE #include <sys/ioctl.h>
43 // OBSOLETE #include <fcntl.h>
44 // OBSOLETE #include <sys/file.h>
45 // OBSOLETE #include "gdb_stat.h"
47 // OBSOLETE #include "symtab.h"
48 // OBSOLETE #include "setjmp.h"
49 // OBSOLETE #include "value.h"
51 // OBSOLETE #include <sys/ptrace.h>
53 // OBSOLETE /* CX/UX provides them already, but as word offsets instead of char offsets */
54 // OBSOLETE #define SXIP_OFFSET (PT_SXIP * 4)
55 // OBSOLETE #define SNIP_OFFSET (PT_SNIP * 4)
56 // OBSOLETE #define SFIP_OFFSET (PT_SFIP * 4)
57 // OBSOLETE #define PSR_OFFSET (PT_PSR * sizeof(int))
58 // OBSOLETE #define FPSR_OFFSET (PT_FPSR * sizeof(int))
59 // OBSOLETE #define FPCR_OFFSET (PT_FPCR * sizeof(int))
61 // OBSOLETE #define XREGADDR(r) (((char *)&u.pt_x0-(char *)&u) + \
62 // OBSOLETE ((r)-X0_REGNUM)*sizeof(X_REGISTER_RAW_TYPE))
64 // OBSOLETE extern int have_symbol_file_p ();
66 // OBSOLETE extern jmp_buf stack_jmp;
68 // OBSOLETE extern int errno;
71 // OBSOLETE fetch_inferior_registers (int regno)
73 // OBSOLETE register unsigned int regaddr;
74 // OBSOLETE char buf[MAX_REGISTER_RAW_SIZE];
75 // OBSOLETE register int i;
77 // OBSOLETE struct USER u;
78 // OBSOLETE unsigned int offset;
80 // OBSOLETE offset = (char *) &u.pt_r0 - (char *) &u;
81 // OBSOLETE regaddr = offset; /* byte offset to r0; */
83 // OBSOLETE /* offset = ptrace (3, PIDGET (inferior_ptid), (PTRACE_ARG3_TYPE) offset, 0) - KERNEL_U_ADDR; */
84 // OBSOLETE for (regno = 0; regno < PC_REGNUM; regno++)
86 // OBSOLETE /*regaddr = register_addr (regno, offset); */
87 // OBSOLETE /* 88k enhancement */
89 // OBSOLETE for (i = 0; i < REGISTER_RAW_SIZE (regno); i += sizeof (int))
91 // OBSOLETE *(int *) &buf[i] = ptrace (3, PIDGET (inferior_ptid),
92 // OBSOLETE (PTRACE_ARG3_TYPE) regaddr, 0);
93 // OBSOLETE regaddr += sizeof (int);
95 // OBSOLETE supply_register (regno, buf);
97 // OBSOLETE /* now load up registers 32-37; special pc registers */
98 // OBSOLETE *(int *) &buf[0] = ptrace (3, PIDGET (inferior_ptid),
99 // OBSOLETE (PTRACE_ARG3_TYPE) PSR_OFFSET, 0);
100 // OBSOLETE supply_register (PSR_REGNUM, buf);
101 // OBSOLETE *(int *) &buf[0] = ptrace (3, PIDGET (inferior_ptid),
102 // OBSOLETE (PTRACE_ARG3_TYPE) FPSR_OFFSET, 0);
103 // OBSOLETE supply_register (FPSR_REGNUM, buf);
104 // OBSOLETE *(int *) &buf[0] = ptrace (3, PIDGET (inferior_ptid),
105 // OBSOLETE (PTRACE_ARG3_TYPE) FPCR_OFFSET, 0);
106 // OBSOLETE supply_register (FPCR_REGNUM, buf);
107 // OBSOLETE *(int *) &buf[0] = ptrace (3, PIDGET (inferior_ptid),
108 // OBSOLETE (PTRACE_ARG3_TYPE) SXIP_OFFSET, 0);
109 // OBSOLETE supply_register (SXIP_REGNUM, buf);
110 // OBSOLETE *(int *) &buf[0] = ptrace (3, PIDGET (inferior_ptid),
111 // OBSOLETE (PTRACE_ARG3_TYPE) SNIP_OFFSET, 0);
112 // OBSOLETE supply_register (SNIP_REGNUM, buf);
113 // OBSOLETE *(int *) &buf[0] = ptrace (3, PIDGET (inferior_ptid),
114 // OBSOLETE (PTRACE_ARG3_TYPE) SFIP_OFFSET, 0);
115 // OBSOLETE supply_register (SFIP_REGNUM, buf);
117 // OBSOLETE if (target_is_m88110)
119 // OBSOLETE for (regaddr = XREGADDR (X0_REGNUM), regno = X0_REGNUM;
120 // OBSOLETE regno < NUM_REGS;
121 // OBSOLETE regno++, regaddr += 16)
123 // OBSOLETE X_REGISTER_RAW_TYPE xval;
125 // OBSOLETE *(int *) &xval.w1 = ptrace (3, PIDGET (inferior_ptid),
126 // OBSOLETE (PTRACE_ARG3_TYPE) regaddr, 0);
127 // OBSOLETE *(int *) &xval.w2 = ptrace (3, PIDGET (inferior_ptid),
128 // OBSOLETE (PTRACE_ARG3_TYPE) (regaddr + 4), 0);
129 // OBSOLETE *(int *) &xval.w3 = ptrace (3, PIDGET (inferior_ptid),
130 // OBSOLETE (PTRACE_ARG3_TYPE) (regaddr + 8), 0);
131 // OBSOLETE *(int *) &xval.w4 = ptrace (3, PIDGET (inferior_ptid),
132 // OBSOLETE (PTRACE_ARG3_TYPE) (regaddr + 12), 0);
133 // OBSOLETE supply_register (regno, (void *) &xval);
138 // OBSOLETE /* Store our register values back into the inferior.
139 // OBSOLETE If REGNO is -1, do this for all registers.
140 // OBSOLETE Otherwise, REGNO specifies which register (so we can save time). */
143 // OBSOLETE store_inferior_registers (int regno)
145 // OBSOLETE register unsigned int regaddr;
146 // OBSOLETE char buf[80];
148 // OBSOLETE struct USER u;
150 // OBSOLETE unsigned int offset = (char *) &u.pt_r0 - (char *) &u;
152 // OBSOLETE regaddr = offset;
154 // OBSOLETE /* Don't try to deal with EXIP_REGNUM or ENIP_REGNUM, because I think either
155 // OBSOLETE svr3 doesn't run on an 88110, or the kernel isolates the different (not
156 // OBSOLETE completely sure this is true, but seems to be. */
157 // OBSOLETE if (regno >= 0)
159 // OBSOLETE /* regaddr = register_addr (regno, offset); */
160 // OBSOLETE if (regno < PC_REGNUM)
162 // OBSOLETE regaddr = offset + regno * sizeof (int);
163 // OBSOLETE errno = 0;
164 // OBSOLETE ptrace (6, PIDGET (inferior_ptid),
165 // OBSOLETE (PTRACE_ARG3_TYPE) regaddr, read_register (regno));
166 // OBSOLETE if (errno != 0)
168 // OBSOLETE sprintf (buf, "writing register number %d", regno);
169 // OBSOLETE perror_with_name (buf);
172 // OBSOLETE else if (regno == PSR_REGNUM)
173 // OBSOLETE ptrace (6, PIDGET (inferior_ptid),
174 // OBSOLETE (PTRACE_ARG3_TYPE) PSR_OFFSET, read_register (regno));
175 // OBSOLETE else if (regno == FPSR_REGNUM)
176 // OBSOLETE ptrace (6, PIDGET (inferior_ptid),
177 // OBSOLETE (PTRACE_ARG3_TYPE) FPSR_OFFSET, read_register (regno));
178 // OBSOLETE else if (regno == FPCR_REGNUM)
179 // OBSOLETE ptrace (6, PIDGET (inferior_ptid),
180 // OBSOLETE (PTRACE_ARG3_TYPE) FPCR_OFFSET, read_register (regno));
181 // OBSOLETE else if (regno == SXIP_REGNUM)
182 // OBSOLETE ptrace (6, PIDGET (inferior_ptid),
183 // OBSOLETE (PTRACE_ARG3_TYPE) SXIP_OFFSET, read_register (regno));
184 // OBSOLETE else if (regno == SNIP_REGNUM)
185 // OBSOLETE ptrace (6, PIDGET (inferior_ptid),
186 // OBSOLETE (PTRACE_ARG3_TYPE) SNIP_OFFSET, read_register (regno));
187 // OBSOLETE else if (regno == SFIP_REGNUM)
188 // OBSOLETE ptrace (6, PIDGET (inferior_ptid),
189 // OBSOLETE (PTRACE_ARG3_TYPE) SFIP_OFFSET, read_register (regno));
190 // OBSOLETE else if (target_is_m88110 && regno < NUM_REGS)
192 // OBSOLETE X_REGISTER_RAW_TYPE xval;
194 // OBSOLETE read_register_bytes (REGISTER_BYTE (regno), (char *) &xval,
195 // OBSOLETE sizeof (X_REGISTER_RAW_TYPE));
196 // OBSOLETE regaddr = XREGADDR (regno);
197 // OBSOLETE ptrace (6, PIDGET (inferior_ptid), (PTRACE_ARG3_TYPE) regaddr, xval.w1);
198 // OBSOLETE ptrace (6, PIDGET (inferior_ptid), (PTRACE_ARG3_TYPE) regaddr + 4, xval.w2);
199 // OBSOLETE ptrace (6, PIDGET (inferior_ptid), (PTRACE_ARG3_TYPE) regaddr + 8, xval.w3);
200 // OBSOLETE ptrace (6, PIDGET (inferior_ptid), (PTRACE_ARG3_TYPE) regaddr + 12, xval.w4);
203 // OBSOLETE printf_unfiltered ("Bad register number for store_inferior routine\n");
207 // OBSOLETE for (regno = 0; regno < PC_REGNUM; regno++)
209 // OBSOLETE /* regaddr = register_addr (regno, offset); */
210 // OBSOLETE errno = 0;
211 // OBSOLETE regaddr = offset + regno * sizeof (int);
212 // OBSOLETE ptrace (6, PIDGET (inferior_ptid),
213 // OBSOLETE (PTRACE_ARG3_TYPE) regaddr, read_register (regno));
214 // OBSOLETE if (errno != 0)
216 // OBSOLETE sprintf (buf, "writing register number %d", regno);
217 // OBSOLETE perror_with_name (buf);
220 // OBSOLETE ptrace (6, PIDGET (inferior_ptid),
221 // OBSOLETE (PTRACE_ARG3_TYPE) PSR_OFFSET, read_register (regno));
222 // OBSOLETE ptrace (6, PIDGET (inferior_ptid),
223 // OBSOLETE (PTRACE_ARG3_TYPE) FPSR_OFFSET, read_register (regno));
224 // OBSOLETE ptrace (6, PIDGET (inferior_ptid),
225 // OBSOLETE (PTRACE_ARG3_TYPE) FPCR_OFFSET, read_register (regno));
226 // OBSOLETE ptrace (6, PIDGET (inferior_ptid),
227 // OBSOLETE (PTRACE_ARG3_TYPE) SXIP_OFFSET, read_register (SXIP_REGNUM));
228 // OBSOLETE ptrace (6, PIDGET (inferior_ptid),
229 // OBSOLETE (PTRACE_ARG3_TYPE) SNIP_OFFSET, read_register (SNIP_REGNUM));
230 // OBSOLETE ptrace (6, PIDGET (inferior_ptid),
231 // OBSOLETE (PTRACE_ARG3_TYPE) SFIP_OFFSET, read_register (SFIP_REGNUM));
232 // OBSOLETE if (target_is_m88110)
234 // OBSOLETE for (regno = X0_REGNUM; regno < NUM_REGS; regno++)
236 // OBSOLETE X_REGISTER_RAW_TYPE xval;
238 // OBSOLETE read_register_bytes (REGISTER_BYTE (regno), (char *) &xval,
239 // OBSOLETE sizeof (X_REGISTER_RAW_TYPE));
240 // OBSOLETE regaddr = XREGADDR (regno);
241 // OBSOLETE ptrace (6, PIDGET (inferior_ptid), (PTRACE_ARG3_TYPE) regaddr, xval.w1);
242 // OBSOLETE ptrace (6, PIDGET (inferior_ptid), (PTRACE_ARG3_TYPE) (regaddr + 4), xval.w2);
243 // OBSOLETE ptrace (6, PIDGET (inferior_ptid), (PTRACE_ARG3_TYPE) (regaddr + 8), xval.w3);
244 // OBSOLETE ptrace (6, PIDGET (inferior_ptid), (PTRACE_ARG3_TYPE) (regaddr + 12), xval.w4);
250 // OBSOLETE /* blockend is the address of the end of the user structure */
252 // OBSOLETE m88k_register_u_addr (int blockend, int regnum)
254 // OBSOLETE struct USER u;
255 // OBSOLETE int ustart = blockend - sizeof (struct USER);
257 // OBSOLETE if (regnum < PSR_REGNUM)
258 // OBSOLETE return (ustart + ((int) &u.pt_r0 - (int) &u) +
259 // OBSOLETE REGISTER_SIZE * regnum);
260 // OBSOLETE else if (regnum == PSR_REGNUM)
261 // OBSOLETE return (ustart + ((int) &u.pt_psr) - (int) &u);
262 // OBSOLETE else if (regnum == FPSR_REGNUM)
263 // OBSOLETE return (ustart + ((int) &u.pt_fpsr) - (int) &u);
264 // OBSOLETE else if (regnum == FPCR_REGNUM)
265 // OBSOLETE return (ustart + ((int) &u.pt_fpcr) - (int) &u);
266 // OBSOLETE else if (regnum == SXIP_REGNUM)
267 // OBSOLETE return (ustart + SXIP_OFFSET);
268 // OBSOLETE else if (regnum == SNIP_REGNUM)
269 // OBSOLETE return (ustart + SNIP_OFFSET);
270 // OBSOLETE else if (regnum == SFIP_REGNUM)
271 // OBSOLETE return (ustart + SFIP_OFFSET);
272 // OBSOLETE else if (target_is_m88110)
273 // OBSOLETE return (ustart + ((int) &u.pt_x0 - (int) &u) + /* Must be X register */
274 // OBSOLETE sizeof (u.pt_x0) * (regnum - X0_REGNUM));
276 // OBSOLETE return (blockend + REGISTER_SIZE * regnum);
279 // OBSOLETE #ifdef USE_PROC_FS
281 // OBSOLETE #include <sys/procfs.h>
283 // OBSOLETE /* Prototypes for supply_gregset etc. */
284 // OBSOLETE #include "gregset.h"
286 // OBSOLETE /* Given a pointer to a general register set in /proc format (gregset_t *),
287 // OBSOLETE unpack the register contents and supply them as gdb's idea of the current
288 // OBSOLETE register values. */
291 // OBSOLETE supply_gregset (gregset_t *gregsetp)
293 // OBSOLETE register int regi;
294 // OBSOLETE register greg_t *regp = (greg_t *) gregsetp;
296 // OBSOLETE for (regi = 0; regi <= SP_REGNUM; regi++)
297 // OBSOLETE supply_register (regi, (char *) (regp + regi));
299 // OBSOLETE supply_register (SXIP_REGNUM, (char *) (regp + R_XIP));
300 // OBSOLETE supply_register (SNIP_REGNUM, (char *) (regp + R_NIP));
301 // OBSOLETE supply_register (SFIP_REGNUM, (char *) (regp + R_FIP));
302 // OBSOLETE supply_register (PSR_REGNUM, (char *) (regp + R_PSR));
303 // OBSOLETE supply_register (FPSR_REGNUM, (char *) (regp + R_FPSR));
304 // OBSOLETE supply_register (FPCR_REGNUM, (char *) (regp + R_FPCR));
308 // OBSOLETE fill_gregset (gregset_t *gregsetp, int regno)
310 // OBSOLETE int regi;
311 // OBSOLETE register greg_t *regp = (greg_t *) gregsetp;
313 // OBSOLETE for (regi = 0; regi <= R_R31; regi++)
314 // OBSOLETE if ((regno == -1) || (regno == regi))
315 // OBSOLETE *(regp + regi) = *(int *) ®isters[REGISTER_BYTE (regi)];
317 // OBSOLETE if ((regno == -1) || (regno == SXIP_REGNUM))
318 // OBSOLETE *(regp + R_XIP) = *(int *) ®isters[REGISTER_BYTE (SXIP_REGNUM)];
319 // OBSOLETE if ((regno == -1) || (regno == SNIP_REGNUM))
320 // OBSOLETE *(regp + R_NIP) = *(int *) ®isters[REGISTER_BYTE (SNIP_REGNUM)];
321 // OBSOLETE if ((regno == -1) || (regno == SFIP_REGNUM))
322 // OBSOLETE *(regp + R_FIP) = *(int *) ®isters[REGISTER_BYTE (SFIP_REGNUM)];
323 // OBSOLETE if ((regno == -1) || (regno == PSR_REGNUM))
324 // OBSOLETE *(regp + R_PSR) = *(int *) ®isters[REGISTER_BYTE (PSR_REGNUM)];
325 // OBSOLETE if ((regno == -1) || (regno == FPSR_REGNUM))
326 // OBSOLETE *(regp + R_FPSR) = *(int *) ®isters[REGISTER_BYTE (FPSR_REGNUM)];
327 // OBSOLETE if ((regno == -1) || (regno == FPCR_REGNUM))
328 // OBSOLETE *(regp + R_FPCR) = *(int *) ®isters[REGISTER_BYTE (FPCR_REGNUM)];
331 // OBSOLETE #endif /* USE_PROC_FS */
333 // OBSOLETE /* This support adds the equivalent of adb's % command. When
334 // OBSOLETE the `add-shared-symbol-files' command is given, this routine scans
335 // OBSOLETE the dynamic linker's link map and reads the minimal symbols
336 // OBSOLETE from each shared object file listed in the map. */
338 // OBSOLETE struct link_map
340 // OBSOLETE unsigned long l_addr; /* address at which object is mapped */
341 // OBSOLETE char *l_name; /* full name of loaded object */
342 // OBSOLETE void *l_ld; /* dynamic structure of object */
343 // OBSOLETE struct link_map *l_next; /* next link object */
344 // OBSOLETE struct link_map *l_prev; /* previous link object */
347 // OBSOLETE #define LINKS_MAP_POINTER "_ld_tail"
348 // OBSOLETE #define LIBC_FILE "/usr/lib/libc.so.1"
349 // OBSOLETE #define SHARED_OFFSET 0xf0001000
351 // OBSOLETE #ifndef PATH_MAX
352 // OBSOLETE #define PATH_MAX 1023 /* maximum size of path name on OS */
356 // OBSOLETE add_shared_symbol_files (void)
358 // OBSOLETE void *desc;
359 // OBSOLETE struct link_map *ld_map, *lm, lms;
360 // OBSOLETE struct minimal_symbol *minsym;
361 // OBSOLETE struct objfile *objfile;
362 // OBSOLETE char *path_name;
364 // OBSOLETE if (ptid_equal (inferior_ptid, null_ptid))
366 // OBSOLETE warning ("The program has not yet been started.");
370 // OBSOLETE objfile = symbol_file_add (LIBC_FILE, 0, NULL, 0, OBJF_READNOW);
371 // OBSOLETE minsym = lookup_minimal_symbol (LINKS_MAP_POINTER, objfile);
373 // OBSOLETE ld_map = (struct link_map *)
374 // OBSOLETE read_memory_integer (((int) SYMBOL_VALUE_ADDRESS (minsym) + SHARED_OFFSET), 4);
375 // OBSOLETE lm = ld_map;
376 // OBSOLETE while (lm)
378 // OBSOLETE int local_errno = 0;
380 // OBSOLETE read_memory ((CORE_ADDR) lm, (char *) &lms, sizeof (struct link_map));
381 // OBSOLETE if (lms.l_name)
383 // OBSOLETE if (target_read_string ((CORE_ADDR) lms.l_name, &path_name,
384 // OBSOLETE PATH_MAX, &local_errno))
386 // OBSOLETE struct section_addr_info section_addrs;
387 // OBSOLETE memset (§ion_addrs, 0, sizeof (section_addrs));
388 // OBSOLETE section_addrs.other[0].addr = lms.l_addr;
389 // OBSOLETE section_addrs.other[0].name = ".text";
390 // OBSOLETE symbol_file_add (path_name, 1, §ion_addrs, 0, 0);
391 // OBSOLETE xfree (path_name);
394 // OBSOLETE /* traverse links in reverse order so that we get the
395 // OBSOLETE the symbols the user actually gets. */
396 // OBSOLETE lm = lms.l_prev;
399 // OBSOLETE /* Getting new symbols may change our opinion about what is
400 // OBSOLETE frameless. */
401 // OBSOLETE reinit_frame_cache ();
404 // OBSOLETE #if defined(_ES_MP)
406 // OBSOLETE #include <sys/regset.h>
408 // OBSOLETE unsigned int
409 // OBSOLETE m88k_harris_core_register_addr (int regno, int reg_ptr)
411 // OBSOLETE unsigned int word_offset;
413 // OBSOLETE switch (regno)
415 // OBSOLETE case PSR_REGNUM:
416 // OBSOLETE word_offset = R_EPSR;
418 // OBSOLETE case FPSR_REGNUM:
419 // OBSOLETE word_offset = R_FPSR;
421 // OBSOLETE case FPCR_REGNUM:
422 // OBSOLETE word_offset = R_FPCR;
424 // OBSOLETE case SXIP_REGNUM:
425 // OBSOLETE word_offset = R_EXIP;
427 // OBSOLETE case SNIP_REGNUM:
428 // OBSOLETE word_offset = R_ENIP;
430 // OBSOLETE case SFIP_REGNUM:
431 // OBSOLETE word_offset = R_EFIP;
434 // OBSOLETE if (regno <= FP_REGNUM)
435 // OBSOLETE word_offset = regno;
437 // OBSOLETE word_offset = ((regno - X0_REGNUM) * 4);
439 // OBSOLETE return (word_offset * 4);
442 // OBSOLETE #endif /* _ES_MP */
445 // OBSOLETE _initialize_m88k_nat (void)
447 // OBSOLETE #ifdef _ES_MP
448 // OBSOLETE /* Enable 88110 support, as we don't support the 88100 under ES/MP. */
450 // OBSOLETE target_is_m88110 = 1;
451 // OBSOLETE #elif defined(_CX_UX)
452 // OBSOLETE /* Determine whether we're running on an 88100 or an 88110. */
453 // OBSOLETE target_is_m88110 = (sinfo (SYSMACHINE, 0) == SYS5800);
454 // OBSOLETE #endif /* _CX_UX */
457 // OBSOLETE #ifdef _ES_MP
458 // OBSOLETE /* Given a pointer to a general register set in /proc format (gregset_t *),
459 // OBSOLETE unpack the register contents and supply them as gdb's idea of the current
460 // OBSOLETE register values. */
463 // OBSOLETE supply_gregset (gregset_t *gregsetp)
465 // OBSOLETE register int regi;
466 // OBSOLETE register greg_t *regp = (greg_t *) gregsetp;
468 // OBSOLETE for (regi = 0; regi < R_R31; regi++)
470 // OBSOLETE supply_register (regi, (char *) (regp + regi));
472 // OBSOLETE supply_register (PSR_REGNUM, (char *) (regp + R_EPSR));
473 // OBSOLETE supply_register (FPSR_REGNUM, (char *) (regp + R_FPSR));
474 // OBSOLETE supply_register (FPCR_REGNUM, (char *) (regp + R_FPCR));
475 // OBSOLETE supply_register (SXIP_REGNUM, (char *) (regp + R_EXIP));
476 // OBSOLETE supply_register (SNIP_REGNUM, (char *) (regp + R_ENIP));
477 // OBSOLETE supply_register (SFIP_REGNUM, (char *) (regp + R_EFIP));
480 // OBSOLETE /* Given a pointer to a floating point register set in /proc format
481 // OBSOLETE (fpregset_t *), unpack the register contents and supply them as gdb's
482 // OBSOLETE idea of the current floating point register values. */
485 // OBSOLETE supply_fpregset (fpregset_t *fpregsetp)
487 // OBSOLETE register int regi;
488 // OBSOLETE char *from;
490 // OBSOLETE for (regi = FP0_REGNUM; regi <= FPLAST_REGNUM; regi++)
492 // OBSOLETE from = (char *) &((*fpregsetp)[regi - FP0_REGNUM]);
493 // OBSOLETE supply_register (regi, from);
497 // OBSOLETE #endif /* _ES_MP */
499 // OBSOLETE #ifdef _CX_UX
501 // OBSOLETE #include <sys/regset.h>
503 // OBSOLETE unsigned int
504 // OBSOLETE m88k_harris_core_register_addr (int regno, int reg_ptr)
506 // OBSOLETE unsigned int word_offset;
508 // OBSOLETE switch (regno)
510 // OBSOLETE case PSR_REGNUM:
511 // OBSOLETE word_offset = R_PSR;
513 // OBSOLETE case FPSR_REGNUM:
514 // OBSOLETE word_offset = R_FPSR;
516 // OBSOLETE case FPCR_REGNUM:
517 // OBSOLETE word_offset = R_FPCR;
519 // OBSOLETE case SXIP_REGNUM:
520 // OBSOLETE word_offset = R_XIP;
522 // OBSOLETE case SNIP_REGNUM:
523 // OBSOLETE word_offset = R_NIP;
525 // OBSOLETE case SFIP_REGNUM:
526 // OBSOLETE word_offset = R_FIP;
529 // OBSOLETE if (regno <= FP_REGNUM)
530 // OBSOLETE word_offset = regno;
532 // OBSOLETE word_offset = ((regno - X0_REGNUM) * 4) + R_X0;
534 // OBSOLETE return (word_offset * 4);
537 // OBSOLETE #endif /* _CX_UX */
This page took 0.043 seconds and 4 git commands to generate.