0cc84e34daf99012cb250e259e81938b85388ab2
1 // OBSOLETE /* Mach 3.0 common definitions and global vars.
3 // OBSOLETE Copyright 1992, 1993, 1994, 1996 Free Software Foundation, Inc.
5 // OBSOLETE This file is part of GDB.
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.
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.
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. */
22 // OBSOLETE #ifndef NM_M3_H
23 // OBSOLETE #define NM_M3_H
25 // OBSOLETE #include <mach.h>
26 // OBSOLETE #include "regcache.h"
28 // OBSOLETE /* Mach3 doesn't declare errno in <errno.h>. */
29 // OBSOLETE extern int errno;
31 // OBSOLETE /* Task port of our debugged inferior. */
33 // OBSOLETE extern task_t inferior_task;
35 // OBSOLETE /* Thread port of the current thread in the inferior. */
37 // OBSOLETE extern thread_t current_thread;
39 // OBSOLETE /* If nonzero, we must suspend/abort && resume threads
40 // OBSOLETE * when setting or getting the state.
42 // OBSOLETE extern int must_suspend_thread;
44 // OBSOLETE #define PREPARE_TO_PROCEED(select_it) mach3_prepare_to_proceed(select_it)
46 // OBSOLETE /* Try to get the privileged host port for authentication to machid
48 // OBSOLETE * If you can get this, you may debug anything on this host.
50 // OBSOLETE * If you can't, gdb gives it's own task port as the
51 // OBSOLETE * authentication port
53 // OBSOLETE #define mach_privileged_host_port() task_by_pid(-1)
56 // OBSOLETE * This is the MIG ID number of the emulator/server bsd_execve() RPC call.
58 // OBSOLETE * It SHOULD never change, but if it does, gdb `run'
59 // OBSOLETE * command won't work until you fix this define.
62 // OBSOLETE #define MIG_EXEC_SYSCALL_ID 101000
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)
68 // OBSOLETE #define GDB_MESSAGE_ID_STOP 0x41151
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.
74 // OBSOLETE * If your system defines WNOHANG differently, this has to be changed.
76 // OBSOLETE #define WNOHANG 1
78 // OBSOLETE /* Before storing, we need to read all the registers. */
80 // OBSOLETE #define CHILD_PREPARE_TO_STORE() deprecated_read_register_bytes (0, NULL, REGISTER_BYTES)
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)
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)
93 // OBSOLETE /* This is from POE9 emulator/emul_stack.h
96 // OBSOLETE * Top of emulator stack holds link and reply port.
98 // OBSOLETE struct emul_stack_top
100 // OBSOLETE struct emul_stack_top *link;
101 // OBSOLETE mach_port_t reply_port;
104 // OBSOLETE #define EMULATOR_STACK_SIZE (4096*4)
106 // OBSOLETE #define THREAD_ALLOWED_TO_BREAK(mid) mach_thread_for_breakpoint (mid)
108 // OBSOLETE #define THREAD_PARSE_ID(arg) mach_thread_parse_id (arg)
110 // OBSOLETE #define THREAD_OUTPUT_ID(mid) mach_thread_output_id (mid)
112 // OBSOLETE #define ATTACH_TO_THREAD attach_to_thread
114 // OBSOLETE /* Don't do wait_for_inferior on attach. */
115 // OBSOLETE #define ATTACH_NO_WAIT
117 // OBSOLETE /* Do Mach 3 dependent operations when ^C or a STOP is requested */
118 // OBSOLETE #define DO_QUIT() mach3_quit ()
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 ()
126 // OBSOLETE #endif /* NM_M3_H */
This page took 0.04431 seconds and 3 git commands to generate.