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

Subversion Repositories or1k

[/] [or1k/] [trunk/] [gdb-5.0/] [gdb/] [config/] [pa/] [tm-hppah.h] - Blame information for rev 1774

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

Line No. Rev Author Line
1 106 markom
/* Parameters for execution on an HP PA-RISC machine, running HPUX, for GDB.
2
   Copyright 1991, 1992 Free Software Foundation, Inc.
3
 
4
   Contributed by the Center for Software Science at the
5
   University of Utah (pa-gdb-bugs@cs.utah.edu).
6
 
7
   This file is part of GDB.
8
 
9
   This program is free software; you can redistribute it and/or modify
10
   it under the terms of the GNU General Public License as published by
11
   the Free Software Foundation; either version 2 of the License, or
12
   (at your option) any later version.
13
 
14
   This program is distributed in the hope that it will be useful,
15
   but WITHOUT ANY WARRANTY; without even the implied warranty of
16
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
17
   GNU General Public License for more details.
18
 
19
   You should have received a copy of the GNU General Public License
20
   along with this program; if not, write to the Free Software
21
   Foundation, Inc., 59 Temple Place - Suite 330,
22
   Boston, MA 02111-1307, USA.  */
23
 
24
#define HPUX_SNAP1
25
#define HPUX_SNAP2
26
 
27
/* The solib hooks are not really designed to have a list of hook
28
   and handler routines.  So until we clean up those interfaces you
29
   either get SOM shared libraries or HP's unusual PA64 ELF shared
30
   libraries, but not both.  */
31
#ifdef GDB_TARGET_IS_HPPA_20W
32
#include "pa64solib.h"
33
#endif
34
 
35
#ifndef GDB_TARGET_IS_HPPA_20W
36
#include "somsolib.h"
37
#endif
38
 
39
/* Actually, for a PA running HPUX the kernel calls the signal handler
40
   without an intermediate trampoline.  Luckily the kernel always sets
41
   the return pointer for the signal handler to point to _sigreturn.  */
42
#define IN_SIGTRAMP(pc, name) (name && STREQ ("_sigreturn", name))
43
 
44
/* For HPUX:
45
 
46
   The signal context structure pointer is always saved at the base
47
   of the frame which "calls" the signal handler.  We only want to find
48
   the hardware save state structure, which lives 10 32bit words into
49
   sigcontext structure.
50
 
51
   Within the hardware save state structure, registers are found in the
52
   same order as the register numbers in GDB.
53
 
54
   At one time we peeked at %r31 rather than the PC queues to determine
55
   what instruction took the fault.  This was done on purpose, but I don't
56
   remember why.  Looking at the PC queues is really the right way, and
57
   I don't remember why that didn't work when this code was originally
58
   written.  */
59
 
60
#define FRAME_SAVED_PC_IN_SIGTRAMP(FRAME, TMP) \
61
{ \
62
  *(TMP) = read_memory_integer ((FRAME)->frame + (43 * 4) , 4); \
63
}
64
 
65
#define FRAME_BASE_BEFORE_SIGTRAMP(FRAME, TMP) \
66
{ \
67
  *(TMP) = read_memory_integer ((FRAME)->frame + (40 * 4), 4); \
68
}
69
 
70
#define FRAME_FIND_SAVED_REGS_IN_SIGTRAMP(FRAME, FSR) \
71
{ \
72
  int i; \
73
  CORE_ADDR TMP; \
74
  TMP = (FRAME)->frame + (10 * 4); \
75
  for (i = 0; i < NUM_REGS; i++) \
76
    { \
77
      if (i == SP_REGNUM) \
78
        (FSR)->regs[SP_REGNUM] = read_memory_integer (TMP + SP_REGNUM * 4, 4); \
79
      else \
80
        (FSR)->regs[i] = TMP + i * 4; \
81
    } \
82
}
83
 
84
/* For HP-UX on PA-RISC we have an implementation
85
   for the exception handling target op (in hppa-tdep.c) */
86
#define CHILD_ENABLE_EXCEPTION_CALLBACK
87
#define CHILD_GET_CURRENT_EXCEPTION_EVENT
88
 
89
/* Mostly it's common to all HPPA's.  */
90
#include "pa/tm-hppa.h"

powered by: WebSVN 2.1.0

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