]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blame - gdb/config/sparc/tm-sun4sol2.h
Phase 1 of the ptid_t changes.
[thirdparty/binutils-gdb.git] / gdb / config / sparc / tm-sun4sol2.h
CommitLineData
c906108c 1/* Macro definitions for GDB for a Sun 4 running Solaris 2
b6ba6518 2 Copyright 1989, 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000
c906108c
SS
3 Free Software Foundation, Inc.
4
c5aa993b 5 This file is part of GDB.
c906108c 6
c5aa993b
JM
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.
c906108c 11
c5aa993b
JM
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.
c906108c 16
c5aa993b
JM
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 21
96dd7890 22#define GDB_MULTI_ARCH 2
5af923b0 23
c906108c
SS
24#include "sparc/tm-sparc.h"
25#include "tm-sysv4.h"
c5aa993b 26
2f09097b
ND
27/* With Sol2 it is no longer necessary to enable software single-step,
28 since the /proc interface can take care of it for us in hardware. */
29#undef SOFTWARE_SINGLE_STEP
30#undef SOFTWARE_SINGLE_STEP_P
31
c906108c
SS
32/* There are two different signal handler trampolines in Solaris2. */
33#define IN_SIGTRAMP(pc, name) \
34 ((name) \
35 && (STREQ ("sigacthandler", name) || STREQ ("ucbsigvechandler", name)))
c5aa993b 36
c906108c
SS
37/* The signal handler gets a pointer to an ucontext as third argument
38 if it is called from sigacthandler. This is the offset to the saved
39 PC within it. sparc_frame_saved_pc knows how to deal with
c5aa993b 40 ucbsigvechandler. */
c906108c
SS
41#define SIGCONTEXT_PC_OFFSET 44
42
2f09097b 43#if 0 /* FIXME Setjmp/longjmp are not as well doc'd in SunOS 5.x yet */
c906108c
SS
44
45/* Offsets into jmp_buf. Not defined by Sun, but at least documented in a
46 comment in <machine/setjmp.h>! */
47
48#define JB_ELEMENT_SIZE 4 /* Size of each element in jmp_buf */
49
50#define JB_ONSSTACK 0
51#define JB_SIGMASK 1
52#define JB_SP 2
53#define JB_PC 3
54#define JB_NPC 4
55#define JB_PSR 5
56#define JB_G1 6
57#define JB_O0 7
58#define JB_WBCNT 8
59
60/* Figure out where the longjmp will land. We expect that we have just entered
61 longjmp and haven't yet setup the stack frame, so the args are still in the
62 output regs. %o0 (O0_REGNUM) points at the jmp_buf structure from which we
63 extract the pc (JB_PC) that we will land at. The pc is copied into ADDR.
64 This routine returns true on success */
65
a14ed312 66extern int get_longjmp_target (CORE_ADDR *);
c906108c
SS
67
68#define GET_LONGJMP_TARGET(ADDR) get_longjmp_target(ADDR)
c5aa993b 69#endif /* 0 */
c906108c
SS
70
71/* The SunPRO compiler puts out 0 instead of the address in N_SO symbols,
72 and for SunPRO 3.0, N_FUN symbols too. */
73#define SOFUN_ADDRESS_MAYBE_MISSING
74
a14ed312 75extern char *sunpro_static_transform_name (char *);
c906108c
SS
76#define STATIC_TRANSFORM_NAME(x) sunpro_static_transform_name (x)
77#define IS_STATIC_TRANSFORM_NAME(name) ((name)[0] == '$')
78
79#define FAULTED_USE_SIGINFO
80
81/* Enable handling of shared libraries for a.out executables. */
82#define HANDLE_SVR4_EXEC_EMULATORS
83
84/* Macros to extract process id and thread id from a composite pid/tid */
39f77062
KB
85#define PIDGET0(PID) (((PID) & 0xffff))
86#define PIDGET(PID) ((PIDGET0 (PID) == 0xffff) ? -1 : PIDGET0 (PID))
2f09097b
ND
87#define TIDGET(PID) (((PID) & 0x7fffffff) >> 16)
88#define MERGEPID(PID, TID) (((PID) & 0xffff) | ((TID) << 16))