]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blame - gdb/config/alpha/tm-alphalinux.h
import gdb-1999-12-06 snapshot
[thirdparty/binutils-gdb.git] / gdb / config / alpha / tm-alphalinux.h
CommitLineData
c906108c
SS
1/* Definitions to make GDB run on an Alpha box under Linux. The
2 definitions here are used when the _target_ system is running Linux.
3 Copyright 1996 Free Software Foundation, Inc.
4
c5aa993b
JM
5 This file is part of GDB.
6
7 This program is free software; you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation; either version 2 of the License, or
10 (at your option) any later version.
11
12 This program is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
16
17 You should have received a copy of the GNU General Public License
18 along with this program; if not, write to the Free Software
19 Foundation, Inc., 59 Temple Place - Suite 330,
20 Boston, MA 02111-1307, USA. */
c906108c
SS
21
22#ifndef TM_LINUXALPHA_H
23#define TM_LINUXALPHA_H
24
25#include "alpha/tm-alpha.h"
26
27/* Are we currently handling a signal ? */
28
29extern long alpha_linux_sigtramp_offset PARAMS ((CORE_ADDR));
30#undef IN_SIGTRAMP
31#define IN_SIGTRAMP(pc, name) (alpha_linux_sigtramp_offset (pc) >= 0)
32
33/* Get start and end address of sigtramp handler. */
34
35#define SIGTRAMP_START(pc) (pc - alpha_linux_sigtramp_offset (pc))
36#define SIGTRAMP_END(pc) (SIGTRAMP_START(pc) + 3*4)
37
38
39/* Number of traps that happen between exec'ing the shell to run an
40 inferior, and when we finally get to the inferior code. This is 2
41 on Linux and most implementations. */
42
43#undef START_INFERIOR_TRAPS_EXPECTED
44#define START_INFERIOR_TRAPS_EXPECTED 2
45
46/* Return TRUE if procedure descriptor PROC is a procedure descriptor
47 that refers to a dynamically generated sigtramp function. */
48
49#undef PROC_DESC_IS_DYN_SIGTRAMP
50#define PROC_SIGTRAMP_MAGIC 0x0e0f0f0f
51#define PROC_DESC_IS_DYN_SIGTRAMP(proc) ((proc)->pdr.isym \
52 == PROC_SIGTRAMP_MAGIC)
53#undef SET_PROC_DESC_IS_DYN_SIGTRAMP
54#define SET_PROC_DESC_IS_DYN_SIGTRAMP(proc) ((proc)->pdr.isym \
55 = PROC_SIGTRAMP_MAGIC)
56
57/* If PC is inside a dynamically generated sigtramp function, return
58 how many bytes the program counter is beyond the start of that
59 function. Otherwise, return a negative value. */
60
61#undef DYNAMIC_SIGTRAMP_OFFSET
62#define DYNAMIC_SIGTRAMP_OFFSET(pc) (alpha_linux_sigtramp_offset (pc))
63
64/* Translate a signal handler frame into the address of the sigcontext
65 structure. */
66
67#undef SIGCONTEXT_ADDR
68#define SIGCONTEXT_ADDR(frame) ((frame)->frame - 0x298)
69
70/* If FRAME refers to a sigtramp frame, return the address of the next frame.
71
72 Under Linux, sigtramp handlers have dynamically generated procedure
73 descriptors that make this hack unnecessary. */
74
75#undef FRAME_PAST_SIGTRAMP_FRAME
76#define FRAME_PAST_SIGTRAMP_FRAME(frame, pc) (0)
77
c2d11a7d 78#include "tm-linux.h"
c906108c
SS
79
80#endif /* TM_LINUXALPHA_H */