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