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

Subversion Repositories or1k

[/] [or1k/] [trunk/] [gdb-5.0/] [gdb/] [config/] [ns32k/] [xm-merlin.h] - Blame information for rev 106

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

Line No. Rev Author Line
1 106 markom
/* Definitions to make GDB run on a merlin under utek 2.1
2
   Copyright 1986, 1987, 1989, 1991, 1992 Free Software Foundation, Inc.
3
 
4
   This file is part of GDB.
5
 
6
   This program is free software; you can redistribute it and/or modify
7
   it under the terms of the GNU General Public License as published by
8
   the Free Software Foundation; either version 2 of the License, or
9
   (at your option) any later version.
10
 
11
   This program is distributed in the hope that it will be useful,
12
   but WITHOUT ANY WARRANTY; without even the implied warranty of
13
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14
   GNU General Public License for more details.
15
 
16
   You should have received a copy of the GNU General Public License
17
   along with this program; if not, write to the Free Software
18
   Foundation, Inc., 59 Temple Place - Suite 330,
19
   Boston, MA 02111-1307, USA.  */
20
 
21
#include <machine/reg.h>
22
 
23
/* This machine doesn't have the siginterrupt call.  */
24
#define NO_SIGINTERRUPT
25
 
26
/* Under Utek, a ptrace'd process can be the only active process for
27
   an executable.  Therefore instead of /bin/sh use gdb-sh (which should
28
   just be a copy of /bin/sh which is world readable and writeable).  */
29
/* FIXME: name should be passed in from Makefile so it can use prefix.  */
30
#define SHELL_FILE "/usr/local/lib/gdb-sh"
31
 
32
#define HOST_BYTE_ORDER LITTLE_ENDIAN
33
 
34
/* This is the amount to subtract from u.u_ar0
35
   to get the offset in the core file of the register values.  */
36
 
37
#define KERNEL_U_ADDR (0xfef000)
38
 
39
#define REGISTER_U_ADDR(addr, blockend, regno) \
40
{                                                                       \
41
  switch (regno) {                                                      \
42
  case 0: case 1: case 2: case 3: case 4: case 5: case 6: case 7:        \
43
        addr = blockend + (R0 - regno) * sizeof (int); break;           \
44
  case PC_REGNUM:                                                       \
45
        addr = blockend + PC * sizeof (int); break;                     \
46
  case SP_REGNUM:                                                       \
47
        addr = blockend + SP * sizeof (int); break;                     \
48
  case FP_REGNUM:                                                       \
49
        addr = blockend + FP * sizeof (int); break;                     \
50
  case PS_REGNUM:                                                       \
51
        addr = blockend + 12 * sizeof (int); break;                     \
52
  case FPS_REGNUM:                                                      \
53
        addr = 108; break;                                              \
54
  case FP0_REGNUM + 0: case FP0_REGNUM + 1:                              \
55
  case FP0_REGNUM + 2: case FP0_REGNUM + 3:                             \
56
  case FP0_REGNUM + 4: case FP0_REGNUM + 5:                             \
57
  case FP0_REGNUM + 6: case FP0_REGNUM + 7:                             \
58
        addr = 76 + (regno - FP0_REGNUM) * sizeof (float); break;       \
59
  case LP0_REGNUM + 0: case LP0_REGNUM + 1:                              \
60
  case LP0_REGNUM + 2: case LP0_REGNUM + 3:                             \
61
        addr = 76 + (regno - LP0_REGNUM) * sizeof (double); break;      \
62
  default:                                                              \
63
        printf ("bad argument to REGISTER_U_ADDR %d\n", regno);         \
64
        abort ();                                                       \
65
  }                                                                     \
66
}

powered by: WebSVN 2.1.0

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