Commit | Line | Data |
---|---|---|
78c43945 AC |
1 | // OBSOLETE /* Mach 3.0 common definitions and global vars. |
2 | // OBSOLETE | |
3 | // OBSOLETE Copyright 1992, 1993, 1994, 1996 Free Software Foundation, Inc. | |
4 | // OBSOLETE | |
5 | // OBSOLETE This file is part of GDB. | |
6 | // OBSOLETE | |
7 | // OBSOLETE This program is free software; you can redistribute it and/or modify | |
8 | // OBSOLETE it under the terms of the GNU General Public License as published by | |
9 | // OBSOLETE the Free Software Foundation; either version 2 of the License, or | |
10 | // OBSOLETE (at your option) any later version. | |
11 | // OBSOLETE | |
12 | // OBSOLETE This program is distributed in the hope that it will be useful, | |
13 | // OBSOLETE but WITHOUT ANY WARRANTY; without even the implied warranty of | |
14 | // OBSOLETE MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
15 | // OBSOLETE GNU General Public License for more details. | |
16 | // OBSOLETE | |
17 | // OBSOLETE You should have received a copy of the GNU General Public License | |
18 | // OBSOLETE along with this program; if not, write to the Free Software | |
19 | // OBSOLETE Foundation, Inc., 59 Temple Place - Suite 330, | |
20 | // OBSOLETE Boston, MA 02111-1307, USA. */ | |
21 | // OBSOLETE | |
22 | // OBSOLETE #ifndef NM_M3_H | |
23 | // OBSOLETE #define NM_M3_H | |
24 | // OBSOLETE | |
25 | // OBSOLETE #include <mach.h> | |
26 | // OBSOLETE #include "regcache.h" | |
27 | // OBSOLETE | |
28 | // OBSOLETE /* Mach3 doesn't declare errno in <errno.h>. */ | |
29 | // OBSOLETE extern int errno; | |
30 | // OBSOLETE | |
31 | // OBSOLETE /* Task port of our debugged inferior. */ | |
32 | // OBSOLETE | |
33 | // OBSOLETE extern task_t inferior_task; | |
34 | // OBSOLETE | |
35 | // OBSOLETE /* Thread port of the current thread in the inferior. */ | |
36 | // OBSOLETE | |
37 | // OBSOLETE extern thread_t current_thread; | |
38 | // OBSOLETE | |
39 | // OBSOLETE /* If nonzero, we must suspend/abort && resume threads | |
40 | // OBSOLETE * when setting or getting the state. | |
41 | // OBSOLETE */ | |
42 | // OBSOLETE extern int must_suspend_thread; | |
43 | // OBSOLETE | |
44 | // OBSOLETE #define PREPARE_TO_PROCEED(select_it) mach3_prepare_to_proceed(select_it) | |
45 | // OBSOLETE | |
46 | // OBSOLETE /* Try to get the privileged host port for authentication to machid | |
47 | // OBSOLETE | |
48 | // OBSOLETE * If you can get this, you may debug anything on this host. | |
49 | // OBSOLETE * | |
50 | // OBSOLETE * If you can't, gdb gives it's own task port as the | |
51 | // OBSOLETE * authentication port | |
52 | // OBSOLETE */ | |
53 | // OBSOLETE #define mach_privileged_host_port() task_by_pid(-1) | |
54 | // OBSOLETE | |
55 | // OBSOLETE /* | |
56 | // OBSOLETE * This is the MIG ID number of the emulator/server bsd_execve() RPC call. | |
57 | // OBSOLETE * | |
58 | // OBSOLETE * It SHOULD never change, but if it does, gdb `run' | |
59 | // OBSOLETE * command won't work until you fix this define. | |
60 | // OBSOLETE * | |
61 | // OBSOLETE */ | |
62 | // OBSOLETE #define MIG_EXEC_SYSCALL_ID 101000 | |
63 | // OBSOLETE | |
64 | // OBSOLETE /* If our_message_port gets a msg with this ID, | |
65 | // OBSOLETE * GDB suspends it's inferior and enters command level. | |
66 | // OBSOLETE * (Useful at least if ^C does not work) | |
67 | // OBSOLETE */ | |
68 | // OBSOLETE #define GDB_MESSAGE_ID_STOP 0x41151 | |
69 | // OBSOLETE | |
70 | // OBSOLETE /* wait3 WNOHANG is defined in <sys/wait.h> but | |
71 | // OBSOLETE * for some reason gdb does not want to include | |
72 | // OBSOLETE * that file. | |
73 | // OBSOLETE * | |
74 | // OBSOLETE * If your system defines WNOHANG differently, this has to be changed. | |
75 | // OBSOLETE */ | |
76 | // OBSOLETE #define WNOHANG 1 | |
77 | // OBSOLETE | |
78 | // OBSOLETE /* Before storing, we need to read all the registers. */ | |
79 | // OBSOLETE | |
80 | // OBSOLETE #define CHILD_PREPARE_TO_STORE() deprecated_read_register_bytes (0, NULL, REGISTER_BYTES) | |
81 | // OBSOLETE | |
82 | // OBSOLETE /* Check if the inferior exists */ | |
83 | // OBSOLETE #define MACH_ERROR_NO_INFERIOR \ | |
84 | // OBSOLETE do if (!MACH_PORT_VALID (inferior_task)) \ | |
85 | // OBSOLETE error ("Inferior task does not exist."); while(0) | |
86 | // OBSOLETE | |
87 | // OBSOLETE /* Error handler for mach calls */ | |
88 | // OBSOLETE #define CHK(str,ret) \ | |
89 | // OBSOLETE do if (ret != KERN_SUCCESS) \ | |
90 | // OBSOLETE error ("Gdb %s [%d] %s : %s\n",__FILE__,__LINE__,str, \ | |
91 | // OBSOLETE mach_error_string(ret)); while(0) | |
92 | // OBSOLETE | |
93 | // OBSOLETE /* This is from POE9 emulator/emul_stack.h | |
94 | // OBSOLETE */ | |
95 | // OBSOLETE /* | |
96 | // OBSOLETE * Top of emulator stack holds link and reply port. | |
97 | // OBSOLETE */ | |
98 | // OBSOLETE struct emul_stack_top | |
99 | // OBSOLETE { | |
100 | // OBSOLETE struct emul_stack_top *link; | |
101 | // OBSOLETE mach_port_t reply_port; | |
102 | // OBSOLETE }; | |
103 | // OBSOLETE | |
104 | // OBSOLETE #define EMULATOR_STACK_SIZE (4096*4) | |
105 | // OBSOLETE | |
106 | // OBSOLETE #define THREAD_ALLOWED_TO_BREAK(mid) mach_thread_for_breakpoint (mid) | |
107 | // OBSOLETE | |
108 | // OBSOLETE #define THREAD_PARSE_ID(arg) mach_thread_parse_id (arg) | |
109 | // OBSOLETE | |
110 | // OBSOLETE #define THREAD_OUTPUT_ID(mid) mach_thread_output_id (mid) | |
111 | // OBSOLETE | |
112 | // OBSOLETE #define ATTACH_TO_THREAD attach_to_thread | |
113 | // OBSOLETE | |
114 | // OBSOLETE /* Don't do wait_for_inferior on attach. */ | |
115 | // OBSOLETE #define ATTACH_NO_WAIT | |
116 | // OBSOLETE | |
117 | // OBSOLETE /* Do Mach 3 dependent operations when ^C or a STOP is requested */ | |
118 | // OBSOLETE #define DO_QUIT() mach3_quit () | |
119 | // OBSOLETE | |
120 | // OBSOLETE #if 0 | |
121 | // OBSOLETE /* This is bogus. It is NOT OK to quit out of target_wait. */ | |
122 | // OBSOLETE /* If in mach_msg() and ^C is typed set immediate_quit */ | |
123 | // OBSOLETE #define REQUEST_QUIT() mach3_request_quit () | |
124 | // OBSOLETE #endif | |
125 | // OBSOLETE | |
126 | // OBSOLETE #endif /* NM_M3_H */ |