daily update
[deliverable/binutils-gdb.git] / gdb / config / i386 / nm-i386v42mp.h
1 /* Native support for i386 running SVR4.
2 Copyright 1986, 1987, 1989, 1992, 1996, 1997, 1998
3 Free Software Foundation, Inc.
4 Changes for 80386 by Pace Willisson (pace@prep.ai.mit.edu), July 1988.
5
6 This file is part of GDB.
7
8 This program is free software; you can redistribute it and/or modify
9 it under the terms of the GNU General Public License as published by
10 the Free Software Foundation; either version 2 of the License, or
11 (at your option) any later version.
12
13 This program is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 GNU General Public License for more details.
17
18 You should have received a copy of the GNU General Public License
19 along with this program; if not, write to the Free Software
20 Foundation, Inc., 59 Temple Place - Suite 330,
21 Boston, MA 02111-1307, USA. */
22
23 #ifndef NM_I386V42MP_H
24 #define NM_I386V42MP_H
25
26 /* Use SVR4 style shared library support */
27
28 #include "solib.h"
29
30 /* SVR4 has /proc support, so use it instead of ptrace. */
31
32 #define USE_PROC_FS
33
34 /* define to select for other sysv4.2mp weirdness (see procfs.c) */
35
36 #define UNIXWARE
37
38 #if 0
39 /* The following macros extract process and lwp/thread ids from a
40 composite id.
41
42 For consistency with UnixWare core files, allocate bits 0-15 for
43 process ids and bits 16 and up for lwp ids. Reserve bit 31 for
44 negative return values to indicate exceptions, and use bit 30 as a
45 flag to indicate a user-mode thread, leaving 14 bits for lwp
46 ids. */
47
48 /* Number of bits in composite id allocated to process number. */
49 #define PIDBITS 16
50
51 /* Return the process id stored in composite PID. */
52 #define PIDGET(PID) (((PID) & ((1 << PIDBITS) - 1)))
53
54 /* Return the thread or lwp id stored in composite PID. */
55 #define TIDGET(PID) (((PID) & 0x3fffffff) >> PIDBITS)
56 #define LIDGET(PID) TIDGET(PID)
57
58 /* Construct a composite id from lwp LID and the process portion of
59 composite PID. */
60 #define MERGEPID(PID, LID) (PIDGET(PID) | ((LID) << PIDBITS))
61 #define MKLID(PID, LID) MERGEPID(PID, LID)
62
63 /* Construct a composite id from thread TID and the process portion of
64 composite PID. */
65 #define MKTID(PID, TID) (MERGEPID(PID, TID) | 0x40000000)
66
67 /* Return whether PID contains a user-space thread id. */
68 #define ISTID(PID) ((PID) & 0x40000000)
69 #endif
70
71 /* New definitions of the ptid stuff. Due to the way the
72 code is structured in uw-thread.c, I'm overloading the thread id
73 and lwp id onto the lwp field. The tid field is used to indicate
74 whether the lwp is a tid or not.
75
76 FIXME: Check that core file support is not broken. (See original
77 #if 0'd comments above.)
78 FIXME: Restructure uw-thread.c so that the struct ptid fields
79 can be used as intended. */
80
81 /* Return the process id stored in composite PID. */
82 #define PIDGET(PID) (ptid_get_pid (PID))
83
84 /* Return the thread or lwp id stored in composite PID. */
85 #define TIDGET(PID) (ptid_get_lwp (PID))
86 #define LIDGET(PID) TIDGET(PID)
87
88 #define MERGEPID(PID, LID) (ptid_build ((PID), (LID), 0))
89 #define MKLID(PID, LID) (ptid_build ((PID), (LID), 0))
90
91 /* Construct a composite id from thread TID and the process portion of
92 composite PID. */
93 #define MKTID(PID, TID) (ptid_build ((PID), (TID), 1))
94
95 /* Return whether PID contains a user-space thread id. */
96 #define ISTID(PID) (ptid_get_tid (PID))
97
98 /* This is the amount to subtract from u.u_ar0
99 to get the offset in the core file of the register values. */
100 #define KERNEL_U_ADDR 0xe0000000
101
102 #endif /* NM_I386V42MP_H */
This page took 0.031199 seconds and 4 git commands to generate.