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

Subversion Repositories or1k

[/] [or1k/] [trunk/] [gdb-5.0/] [gdb/] [config/] [m68k/] [xm-sun2.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
/* Parameters for execution on a Sun, for GDB, the GNU debugger.
2
   Copyright (C) 1986, 1987, 1989, 1996 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
#define HOST_BYTE_ORDER BIG_ENDIAN
22
 
23
/* This is the amount to subtract from u.u_ar0
24
   to get the offset in the core file of the register values.  */
25
 
26
#define KERNEL_U_ADDR 0x2800
27
 
28
 
29
/* Interface definitions for kernel debugger KDB.  */
30
 
31
/* Map machine fault codes into signal numbers.
32
   First subtract 0, divide by 4, then index in a table.
33
   Faults for which the entry in this table is 0
34
   are not handled by KDB; the program's own trap handler
35
   gets to handle then.  */
36
 
37
#define FAULT_CODE_ORIGIN 0
38
#define FAULT_CODE_UNITS 4
39
#define FAULT_TABLE    \
40
{ 0, 0, 0, 0, SIGTRAP, 0, 0, 0, \
41
  0, SIGTRAP, 0, 0, 0, 0, 0, SIGKILL, \
42
  0, 0, 0, 0, 0, 0, 0, 0, \
43
  SIGILL }
44
 
45
/* Start running with a stack stretching from BEG to END.
46
   BEG and END should be symbols meaningful to the assembler.
47
   This is used only for kdb.  */
48
 
49
#define INIT_STACK(beg, end)  \
50
{ asm (".globl end");         \
51
  asm ("movel $ end, sp");      \
52
  asm ("clrl fp"); }
53
 
54
/* Push the frame pointer register on the stack.  */
55
#define PUSH_FRAME_PTR        \
56
  asm ("movel fp, -(sp)");
57
 
58
/* Copy the top-of-stack to the frame pointer register.  */
59
#define POP_FRAME_PTR  \
60
  asm ("movl (sp), fp");
61
 
62
/* After KDB is entered by a fault, push all registers
63
   that GDB thinks about (all NUM_REGS of them),
64
   so that they appear in order of ascending GDB register number.
65
   The fault code will be on the stack beyond the last register.  */
66
 
67
#define PUSH_REGISTERS        \
68
{ asm ("clrw -(sp)");         \
69
  asm ("pea 10(sp)");         \
70
  asm ("movem $ 0xfffe,-(sp)"); }
71
 
72
/* Assuming the registers (including processor status) have been
73
   pushed on the stack in order of ascending GDB register number,
74
   restore them and return to the address in the saved PC register.  */
75
 
76
#define POP_REGISTERS          \
77
{ asm ("subil $8,28(sp)");     \
78
  asm ("movem (sp),$ 0xffff"); \
79
  asm ("rte"); }

powered by: WebSVN 2.1.0

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