Remove obsolete MacOS support.

This commit is contained in:
Andrew Cagney 2002-01-05 05:54:31 +00:00
parent d7449b42d3
commit a752853e6e
21 changed files with 34 additions and 2570 deletions

View File

@ -1,3 +1,26 @@
2002-01-05 Andrew Cagney <ac131313@redhat.com>
* configure.tgt: Remove powerpc-*-macos* target.
* config/m68k/xm-mpw.h: Delete file.
* config/xm-mpw.h: Delete file.
* ser-mac.c: Delete file.
* mpw-make.sed: Delete file.
* mpw-config.in: Delete file.
* mac-xdep.c: Delete file.
* mac-gdb.r: Delete file.
* mac-defs.h: Delete file.
* mac-nat.c: Delete file.
* config/powerpc/macos.mh: Delete file.
* config/powerpc/macos.mt: Delete file.
* config/powerpc/nm-macos.h: Delete file.
* config/powerpc/tm-macos.h: Delete file.
* source.c (openp, open_source_file): Remove obsolete code.
* top.c (gdb_readline): Ditto.
* utils.c (query): Ditto.
* event-top.c (display_gdb_prompt): Ditto.
* Makefile.in (ser-mac.o): Delete obsolete target.
* NEWS: Update.
2002-01-04 Andrew Cagney <ac131313@redhat.com>
* defs.h (BIG_ENDIAN): Delete macro definition.

View File

@ -1990,8 +1990,6 @@ scm-valprint.o: $(defs_h) $(value_h) $(parser_defs_h) $(language_h) \
ser-go32.o: ser-go32.c $(defs_h) $(serial_h)
# OBSOLETE ser-mac.o: ser-mac.c $(defs_h) $(serial_h)
ser-pipe.o: ser-pipe.c $(defs_h) $(serial_h) $(gdb_string_h) $(ser_unix_h)
ser-tcp.o: ser-tcp.c $(defs_h) $(serial_h) $(gdb_string_h) $(ser_unix_h)

View File

@ -25,6 +25,7 @@ SunOS 4.0.Xi on i386 i[3456]86-*-sunos*
Ultracomputer (29K) running Sym1 a29k-nyu-sym1 a29k-*-kern*
Sony NEWS (68K) running NEWSOS 3.x m68*-sony-sysv news
ISI Optimum V (3.05) under 4.3bsd. m68*-isi-*
Apple Macintosh (MPW) host and target N/A host, powerpc-*-macos*
* Changes to command line processing

View File

@ -1,25 +0,0 @@
/* OBSOLETE /* Macro definitions for running GDB on Apple 68k-based Macintoshes. */
/* OBSOLETE Copyright 1994, 1995 Free Software Foundation, Inc. */
/* OBSOLETE */
/* OBSOLETE This file is part of GDB. */
/* OBSOLETE */
/* OBSOLETE This program is free software; you can redistribute it and/or modify */
/* OBSOLETE it under the terms of the GNU General Public License as published by */
/* OBSOLETE the Free Software Foundation; either version 2 of the License, or */
/* OBSOLETE (at your option) any later version. */
/* OBSOLETE */
/* OBSOLETE This program is distributed in the hope that it will be useful, */
/* OBSOLETE but WITHOUT ANY WARRANTY; without even the implied warranty of */
/* OBSOLETE MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */
/* OBSOLETE GNU General Public License for more details. */
/* OBSOLETE */
/* OBSOLETE You should have received a copy of the GNU General Public License */
/* OBSOLETE along with this program; if not, write to the Free Software */
/* OBSOLETE Foundation, Inc., 59 Temple Place - Suite 330, */
/* OBSOLETE Boston, MA 02111-1307, USA. */ */
/* OBSOLETE */
/* OBSOLETE #define HOST_BYTE_ORDER BIG_ENDIAN */
/* OBSOLETE */
/* OBSOLETE /* Use angle brackets so that the common xm-mpw.h is found. */ */
/* OBSOLETE */
/* OBSOLETE #include <xm-mpw.h> */

View File

@ -1,4 +0,0 @@
# Host: PowerMac (PowerPC running MacOS)
NATDEPFILES= mac-nat.o
NAT_FILE= nm-macos.h

View File

@ -1,3 +0,0 @@
# Target: PowerMac (PowerPC running MacOS)
TDEPFILES= rs6000-tdep.o xcoffread.o ppc-linux-tdep.o solib.o solib-svr4.o
TM_FILE= tm-macos.h

View File

@ -1,21 +0,0 @@
/* PowerMac native-dependent macros for GDB, the GNU debugger.
Copyright 1995 Free Software Foundation, Inc.
This file is part of GDB.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
/* Nothing needed, at least so far. */

View File

@ -1,27 +0,0 @@
/* Macro definitions for Power PC running MacOS.
Copyright 1995, 2000 Free Software Foundation, Inc.
This file is part of GDB.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
/* Use generic RS6000 definitions. */
#include "rs6000/tm-rs6000.h"
/* Use generic shared library machinery. */
#include "solib.h"
#define GDB_TARGET_POWERPC

View File

@ -1,78 +0,0 @@
/* OBSOLETE /* Macro definitions for running GDB on Apple Macintoshes. */
/* OBSOLETE Copyright 1994, 1995, 2001 Free Software Foundation, Inc. */
/* OBSOLETE */
/* OBSOLETE This file is part of GDB. */
/* OBSOLETE */
/* OBSOLETE This program is free software; you can redistribute it and/or modify */
/* OBSOLETE it under the terms of the GNU General Public License as published by */
/* OBSOLETE the Free Software Foundation; either version 2 of the License, or */
/* OBSOLETE (at your option) any later version. */
/* OBSOLETE */
/* OBSOLETE This program is distributed in the hope that it will be useful, */
/* OBSOLETE but WITHOUT ANY WARRANTY; without even the implied warranty of */
/* OBSOLETE MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */
/* OBSOLETE GNU General Public License for more details. */
/* OBSOLETE */
/* OBSOLETE You should have received a copy of the GNU General Public License */
/* OBSOLETE along with this program; if not, write to the Free Software */
/* OBSOLETE Foundation, Inc., 59 Temple Place - Suite 330, */
/* OBSOLETE Boston, MA 02111-1307, USA. */ */
/* OBSOLETE */
/* OBSOLETE #include "mpw.h" */
/* OBSOLETE */
/* OBSOLETE #include "fopen-bin.h" */
/* OBSOLETE */
/* OBSOLETE #include "spin.h" */
/* OBSOLETE */
/* OBSOLETE #define CANT_FORK */
/* OBSOLETE */
/* OBSOLETE /* Map these standard functions to versions that can do I/O in a console */
/* OBSOLETE window. */ */
/* OBSOLETE */
/* OBSOLETE #define printf hacked_printf */
/* OBSOLETE #define fprintf hacked_fprintf */
/* OBSOLETE #define vprintf hacked_vfprintf */
/* OBSOLETE #define fputs hacked_fputs */
/* OBSOLETE #define fputc hacked_fputc */
/* OBSOLETE #undef putc */
/* OBSOLETE #define putc hacked_putc */
/* OBSOLETE #define fflush hacked_fflush */
/* OBSOLETE */
/* OBSOLETE #define fgetc hacked_fgetc */
/* OBSOLETE */
/* OBSOLETE #define POSIX_UTIME */
/* OBSOLETE */
/* OBSOLETE /* '.' indicates drivers on the Mac, so we need a different filename. */ */
/* OBSOLETE */
/* OBSOLETE #define GDBINIT_FILENAME "_gdbinit" */
/* OBSOLETE */
/* OBSOLETE /* Commas are more common to separate dirnames in a path on Macs. */ */
/* OBSOLETE */
/* OBSOLETE #define DIRNAME_SEPARATOR ',' */
/* OBSOLETE */
/* OBSOLETE /* This is a real crufty hack. */ */
/* OBSOLETE */
/* OBSOLETE #define HAVE_TERMIO */
/* OBSOLETE */
/* OBSOLETE /* Addons to the basic MPW-supported signal list. */ */
/* OBSOLETE */
/* OBSOLETE #ifndef SIGQUIT */
/* OBSOLETE #define SIGQUIT (1<<6) */
/* OBSOLETE #endif */
/* OBSOLETE #ifndef SIGHUP */
/* OBSOLETE #define SIGHUP (1<<7) */
/* OBSOLETE #endif */
/* OBSOLETE */
/* OBSOLETE /* If __STDC__ is on, then this definition will be missing. */ */
/* OBSOLETE */
/* OBSOLETE #ifndef fileno */
/* OBSOLETE #define fileno(p) (p)->_file */
/* OBSOLETE #endif */
/* OBSOLETE */
/* OBSOLETE #ifndef R_OK */
/* OBSOLETE #define R_OK 4 */
/* OBSOLETE #endif */
/* OBSOLETE */
/* OBSOLETE extern int StandAlone; */
/* OBSOLETE */
/* OBSOLETE extern int mac_app; */

View File

@ -221,7 +221,6 @@ none-*-*) gdb_target=none ;;
ns32k-*-netbsd*) gdb_target=nbsd
configdirs="${configdirs} gdbserver" ;;
powerpc-*-macos*) gdb_target=macos ;;
powerpc-*-netbsd*) gdb_target=nbsd
configdirs="${configdirs} gdbserver" ;;
powerpc-*-aix*) gdb_target=aix ;;

View File

@ -1,5 +1,5 @@
/* Top level stuff for GDB, the GNU debugger.
Copyright 1999, 2000, 2001 Free Software Foundation, Inc.
Copyright 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
Written by Elena Zannoni <ezannoni@cygnus.com> of Cygnus Solutions.
This file is part of GDB.
@ -307,12 +307,6 @@ display_gdb_prompt (char *new_prompt)
character position to be off, since the newline we read from
the user is not accounted for. */
fputs_unfiltered (new_prompt, gdb_stdout);
/* OBSOLETE #ifdef MPW */
/* OBSOLETE *//* Move to a new line so the entered line doesn't have a prompt */
/* OBSOLETE on the front of it. */
/* OBSOLETE fputs_unfiltered ("\n", gdb_stdout); */
/* OBSOLETE #endif *//* MPW */
gdb_flush (gdb_stdout);
}
}

View File

@ -1,32 +0,0 @@
/* Definitions shared between C and Rez files. */
#define mbMain 128
#define mApple 128
#define miAbout 1
#define mFile 129
#define miFileNew 1
#define miFileOpen 2
/* 3 */
#define miFileQuit 4
#define mEdit 130
#define miEditCut 1
#define miEditCopy 2
#define miEditPaste 3
#define miEditClear 4
#define mDebug 131
#define miDebugTarget 1
/* 2 */
#define miDebugRun 3
#define miDebugContinue 4
#define miDebugStep 5
#define miDebugNext 6
#define wConsole 128

View File

@ -1,184 +0,0 @@
/* OBSOLETE /* Resource file for MacGDB. */ */
/* OBSOLETE */
/* OBSOLETE #include "SysTypes.r" */
/* OBSOLETE #include "Types.r" */
/* OBSOLETE */
/* OBSOLETE #include "mac-defs.h" */
/* OBSOLETE */
/* OBSOLETE /* Version resources. */ */
/* OBSOLETE */
/* OBSOLETE resource 'vers' (1) { */
/* OBSOLETE 0, */
/* OBSOLETE 0, */
/* OBSOLETE 0, */
/* OBSOLETE 0, */
/* OBSOLETE verUS, */
/* OBSOLETE VERSION_STRING, */
/* OBSOLETE VERSION_STRING " (C) 1986-95 FSF, Inc." */
/* OBSOLETE }; */
/* OBSOLETE */
/* OBSOLETE resource 'vers' (2, purgeable) { */
/* OBSOLETE 0, */
/* OBSOLETE 0, */
/* OBSOLETE 0, */
/* OBSOLETE 0, */
/* OBSOLETE verUs, */
/* OBSOLETE VERSION_STRING, */
/* OBSOLETE "GDB " VERSION_STRING " for MPW" */
/* OBSOLETE }; */
/* OBSOLETE */
/* OBSOLETE #ifdef WANT_CFRG */
/* OBSOLETE */
/* OBSOLETE #include "CodeFragmentTypes.r" */
/* OBSOLETE */
/* OBSOLETE resource 'cfrg' (0) { */
/* OBSOLETE { */
/* OBSOLETE kPowerPC, */
/* OBSOLETE kFullLib, */
/* OBSOLETE kNoVersionNum, kNoVersionNum, */
/* OBSOLETE 0, 0, */
/* OBSOLETE kIsApp, kOnDiskFlat, kZeroOffset, kWholeFork, */
/* OBSOLETE PROG_NAME */
/* OBSOLETE } */
/* OBSOLETE }; */
/* OBSOLETE */
/* OBSOLETE #endif /* WANT_CFRG */ */
/* OBSOLETE */
/* OBSOLETE #ifdef Macgdb /* Exclude the following from SIOWgdb which uses SIOW.r. */ */
/* OBSOLETE */
/* OBSOLETE resource 'MBAR' (128) { */
/* OBSOLETE { mApple, mFile, mEdit, mDebug }; */
/* OBSOLETE }; */
/* OBSOLETE */
/* OBSOLETE resource 'MENU' (mApple, preload) { */
/* OBSOLETE mApple, */
/* OBSOLETE textMenuProc, */
/* OBSOLETE 0x7FFFFFFD, */
/* OBSOLETE enabled, */
/* OBSOLETE apple, */
/* OBSOLETE { */
/* OBSOLETE "About...", noIcon, noKey, noMark, plain, */
/* OBSOLETE "-", noIcon, noKey, noMark, plain */
/* OBSOLETE } */
/* OBSOLETE }; */
/* OBSOLETE */
/* OBSOLETE resource 'MENU' (mFile, preload) { */
/* OBSOLETE mFile, */
/* OBSOLETE textMenuProc, */
/* OBSOLETE allEnabled, */
/* OBSOLETE enabled, */
/* OBSOLETE "File", */
/* OBSOLETE { */
/* OBSOLETE "New", noIcon, noKey, noMark, plain, */
/* OBSOLETE "Open...", noIcon, "O", noMark, plain, */
/* OBSOLETE "-", noIcon, noKey, noMark, plain, */
/* OBSOLETE "Quit", noIcon, "Q", noMark, plain */
/* OBSOLETE } */
/* OBSOLETE }; */
/* OBSOLETE */
/* OBSOLETE resource 'MENU' (mEdit, preload) { */
/* OBSOLETE mEdit, */
/* OBSOLETE textMenuProc, */
/* OBSOLETE allEnabled, */
/* OBSOLETE enabled, */
/* OBSOLETE "Edit", */
/* OBSOLETE { */
/* OBSOLETE "Undo", noIcon, "Z", noMark, plain, */
/* OBSOLETE "-", noIcon, noKey, noMark, plain, */
/* OBSOLETE "Cut", noIcon, "X", noMark, plain, */
/* OBSOLETE "Copy", noIcon, "C", noMark, plain, */
/* OBSOLETE "Paste", noIcon, "V", noMark, plain, */
/* OBSOLETE "Clear", noIcon, noKey, noMark, plain */
/* OBSOLETE } */
/* OBSOLETE }; */
/* OBSOLETE */
/* OBSOLETE resource 'MENU' (mDebug, preload) { */
/* OBSOLETE mDebug, */
/* OBSOLETE textMenuProc, */
/* OBSOLETE allEnabled, */
/* OBSOLETE enabled, */
/* OBSOLETE "Debug", */
/* OBSOLETE { */
/* OBSOLETE "Target", noIcon, "T", noMark, plain, */
/* OBSOLETE "-", noIcon, noKey, noMark, plain, */
/* OBSOLETE "Run", noIcon, "R", noMark, plain, */
/* OBSOLETE "Continue", noIcon, "K", noMark, plain, */
/* OBSOLETE "Step", noIcon, "S", noMark, plain, */
/* OBSOLETE "Next", noIcon, "N", noMark, plain */
/* OBSOLETE } */
/* OBSOLETE }; */
/* OBSOLETE */
/* OBSOLETE resource 'ALRT' (128) { */
/* OBSOLETE {40, 40, 180, 420}, */
/* OBSOLETE 128, */
/* OBSOLETE { /* array: 4 elements */ */
/* OBSOLETE /* [1] */ */
/* OBSOLETE OK, visible, sound1, */
/* OBSOLETE /* [2] */ */
/* OBSOLETE OK, visible, sound1, */
/* OBSOLETE /* [3] */ */
/* OBSOLETE OK, visible, sound1, */
/* OBSOLETE /* [4] */ */
/* OBSOLETE OK, visible, sound1 */
/* OBSOLETE } */
/* OBSOLETE }; */
/* OBSOLETE */
/* OBSOLETE resource 'DITL' (128) { */
/* OBSOLETE { /* array DITLarray: 2 elements */ */
/* OBSOLETE /* [1] */ */
/* OBSOLETE {110, 150, 128, 200}, */
/* OBSOLETE Button { */
/* OBSOLETE enabled, */
/* OBSOLETE "OK" */
/* OBSOLETE }, */
/* OBSOLETE /* [2] */ */
/* OBSOLETE {10, 10, 100, 370}, */
/* OBSOLETE StaticText { */
/* OBSOLETE disabled, */
/* OBSOLETE "GDB 4.12.3\n" */
/* OBSOLETE "Copyright © 1994 Free Software Foundation, Inc.\n" */
/* OBSOLETE }, */
/* OBSOLETE } */
/* OBSOLETE }; */
/* OBSOLETE */
/* OBSOLETE resource 'WIND' (wConsole, preload, purgeable) { */
/* OBSOLETE {40, 40, 310, 572}, */
/* OBSOLETE zoomDocProc, */
/* OBSOLETE visible, */
/* OBSOLETE goAway, */
/* OBSOLETE 0x0, */
/* OBSOLETE "GDB Console" */
/* OBSOLETE }; */
/* OBSOLETE */
/* OBSOLETE resource 'SIZE' (-1) { */
/* OBSOLETE reserved, */
/* OBSOLETE acceptSuspendResumeEvents, */
/* OBSOLETE reserved, */
/* OBSOLETE canBackground, */
/* OBSOLETE multiFinderAware, */
/* OBSOLETE backgroundAndForeground, */
/* OBSOLETE dontGetFrontClicks, */
/* OBSOLETE ignoreChildDiedEvents, */
/* OBSOLETE not32BitCompatible, */
/* OBSOLETE isHighLevelEventAware, */
/* OBSOLETE localAndRemoteHLEvents, */
/* OBSOLETE notStationeryAware, */
/* OBSOLETE dontUseTextEditServices, */
/* OBSOLETE reserved, */
/* OBSOLETE reserved, */
/* OBSOLETE reserved, */
/* OBSOLETE 5000*1024, */
/* OBSOLETE 2000*1024 */
/* OBSOLETE }; */
/* OBSOLETE */
/* OBSOLETE resource 'DLOG' (128) { */
/* OBSOLETE {40, 40, 240, 280}, */
/* OBSOLETE documentProc, */
/* OBSOLETE visible, */
/* OBSOLETE goAway, */
/* OBSOLETE 0x0, */
/* OBSOLETE 128, */
/* OBSOLETE "" */
/* OBSOLETE }; */
/* OBSOLETE */
/* OBSOLETE #endif */

View File

@ -1,404 +0,0 @@
/* Target-vector operations for controlling Mac applications, for GDB.
Copyright 1995, 1996, 1998, 1999, 2000, 2001
Free Software Foundation, Inc.
Written by Stan Shebs. Contributed by Cygnus Support.
This file is part of GDB.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without eve nthe implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
/* Note that because all the available Mac compilers are ANSI or very
close, and this is a native-only file, the code may be purely ANSI. */
#include "defs.h"
#include "frame.h" /* required by inferior.h */
#include "inferior.h"
#include "target.h"
#include "gdb_wait.h"
#include "gdbcore.h"
#include "command.h"
#include <signal.h>
#include <sys/types.h>
#include <fcntl.h>
#include "buildsym.h"
#include "gdb_string.h"
#include "gdbthread.h"
#include "gdbcmd.h"
#include "regcache.h"
#include <Processes.h>
/* We call the functions "child_..." rather than "mac_..." so no one
is tempted to try to link this with other native-only code. */
/* Forward declaration */
extern struct target_ops child_ops;
static void child_stop (void);
static void
child_fetch_inferior_registers (int r)
{
if (r < 0)
{
for (r = 0; r < NUM_REGS; r++)
child_fetch_inferior_registers (r);
}
else
{
supply_register (r, 0);
}
}
static void
child_store_inferior_registers (int r)
{
if (r < 0)
{
for (r = 0; r < NUM_REGS; r++)
child_store_inferior_registers (r);
}
else
{
read_register_gen (r, 0);
}
}
static ptid_t
child_wait (ptid_t ptid, struct target_waitstatus *ourstatus)
{
}
/* Attach to process PID, then initialize for debugging it. */
static void
child_attach (char *args, int from_tty)
{
ProcessSerialNumber psn;
ProcessInfoRec inforec;
Str31 name;
FSSpecPtr fsspec;
OSType code;
int pid;
char *exec_file;
if (!args)
error_no_arg ("process-id to attach");
pid = atoi (args);
psn.highLongOfPSN = 0;
psn.lowLongOfPSN = pid;
inforec.processInfoLength = sizeof (ProcessInfoRec);
inforec.processName = name;
inforec.processAppSpec = fsspec;
if (GetProcessInformation (&psn, &inforec) == noErr)
{
if (from_tty)
{
exec_file = (char *) get_exec_file (0);
if (exec_file)
printf_unfiltered ("Attaching to program `%s', %s\n", exec_file,
target_pid_to_str (pid_to_ptid (pid)));
else
printf_unfiltered ("Attaching to %s\n",
target_pid_to_str (pid_to_ptid (pid)));
gdb_flush (gdb_stdout);
}
/* Do we need to do anything special? */
attach_flag = 1;
inferior_ptid = pid_to_ptid (pid);
push_target (&child_ops);
}
}
static void
child_detach (char *args, int from_tty)
{
char *exec_file;
if (from_tty)
{
exec_file = get_exec_file (0);
if (exec_file == 0)
exec_file = "";
printf_unfiltered ("Detaching from program: %s %s\n", exec_file,
target_pid_to_str (inferior_ptid));
gdb_flush (gdb_stdout);
}
inferior_ptid = null_ptid;
unpush_target (&child_ops);
}
/* Print status information about what we're accessing. */
static void
child_files_info (struct target_ops *ignore)
{
printf_unfiltered ("\tUsing the running image of %s %s.\n",
attach_flag ? "attached" : "child", target_pid_to_str (inferior_ptid));
}
/* ARGSUSED */
static void
child_open (char *arg, int from_tty)
{
error ("Use the \"run\" command to start a Mac application.");
}
/* Start an inferior Mac program and sets inferior_ptid to its pid.
EXEC_FILE is the file to run.
ALLARGS is a string containing the arguments to the program.
ENV is the environment vector to pass. Errors reported with error(). */
static void
child_create_inferior (char *exec_file, char *allargs, char **env)
{
LaunchParamBlockRec launchparms;
FSSpec fsspec;
OSErr launch_err;
if (!exec_file)
{
error ("No executable specified, use `target exec'.\n");
}
launchparms.launchBlockID = extendedBlock;
launchparms.launchEPBLength = extendedBlockLen;
launchparms.launchFileFlags = 0;
launchparms.launchControlFlags = launchContinue | launchNoFileFlags;
fsspec.vRefNum = 0;
fsspec.parID = 0;
strcpy (fsspec.name + 1, exec_file);
fsspec.name[0] = strlen (exec_file);
launchparms.launchAppSpec = &fsspec;
launchparms.launchAppParameters = nil;
launch_err = LaunchApplication (&launchparms);
if (launch_err == 999 /*memFullErr */ )
{
error ("Not enough memory to launch %s\n", exec_file);
}
else if (launch_err != noErr)
{
error ("Error launching %s, code %d\n", exec_file, launch_err);
}
inferior_ptid = pid_to_ptid (launchparms.launchProcessSN.lowLongOfPSN);
/* FIXME be sure that high long of PSN is 0 */
push_target (&child_ops);
init_wait_for_inferior ();
clear_proceed_status ();
/* proceed ((CORE_ADDR) -1, TARGET_SIGNAL_0, 0); */
}
static void
child_mourn_inferior (void)
{
unpush_target (&child_ops);
generic_mourn_inferior ();
}
static void
child_stop (void)
{
}
int
child_xfer_memory (CORE_ADDR memaddr, char *myaddr, int len, int write,
struct mem_attrib *attrib,
struct target_ops *target)
{
int i;
for (i = 0; i < len; ++i)
{
if (write)
{
((char *) memaddr)[i] = myaddr[i];
}
else
{
myaddr[i] = ((char *) memaddr)[i];
}
}
return len;
}
void
child_kill_inferior (void)
{
}
void
child_resume (ptid_t ptid, int step, enum target_signal signal)
{
}
static void
child_prepare_to_store (void)
{
/* Do nothing, since we can store individual regs */
}
static int
child_can_run (void)
{
return 1;
}
static void
child_close (void)
{
}
static void
info_proc (char *args, int from_tty)
{
ProcessSerialNumber psn;
ProcessInfoRec inforec;
Str31 name;
FSSpecPtr fsspec;
OSType code;
/* Eventually use args, but not right now. */
psn.highLongOfPSN = 0;
psn.lowLongOfPSN = kNoProcess;
inforec.processInfoLength = sizeof (ProcessInfoRec);
inforec.processName = name;
inforec.processAppSpec = fsspec;
printf_filtered ("Process Name Sgnt Type PSN Loc Size FreeMem Time\n");
while (GetNextProcess (&psn) == noErr)
{
if (GetProcessInformation (&psn, &inforec) == noErr)
{
name[name[0] + 1] = '\0';
printf_filtered ("%-32.32s", name + 1);
code = inforec.processSignature;
printf_filtered (" %c%c%c%c",
(code >> 24) & 0xff,
(code >> 16) & 0xff,
(code >> 8) & 0xff,
(code >> 0) & 0xff);
code = inforec.processType;
printf_filtered (" %c%c%c%c",
(code >> 24) & 0xff,
(code >> 16) & 0xff,
(code >> 8) & 0xff,
(code >> 0) & 0xff);
if (psn.highLongOfPSN == 0)
printf_filtered (" %9d", psn.lowLongOfPSN);
else
printf_filtered (" %9d,%9d\n",
psn.highLongOfPSN, psn.lowLongOfPSN);
printf_filtered (" 0x%x", inforec.processLocation);
printf_filtered (" %9d", inforec.processSize);
printf_filtered (" %9d", inforec.processFreeMem);
printf_filtered (" %9d", inforec.processActiveTime);
printf_filtered ("\n");
}
}
}
struct target_ops child_ops;
static void
init_child_ops (void)
{
child_ops.to_shortname = "mac";
child_ops.to_longname = "MacOS application";
child_ops.to_doc = "MacOS application (started by the \"run\" command).";
child_ops.to_open = child_open;
child_ops.to_close = child_close;
child_ops.to_attach = child_attach;
child_ops.to_post_attach = NULL;
child_ops.to_require_attach = NULL; /* to_require_attach */
child_ops.to_detach = child_detach;
child_ops.to_require_detach = NULL; /* to_require_detach */
child_ops.to_resume = child_resume;
child_ops.to_wait = child_wait;
child_ops.to_post_wait = NULL; /* to_post_wait */
child_ops.to_fetch_registers = child_fetch_inferior_registers;
child_ops.to_store_registers = child_store_inferior_registers;
child_ops.to_prepare_to_store = child_prepare_to_store;
child_ops.to_xfer_memory = child_xfer_memory;
child_ops.to_files_info = child_files_info;
child_ops.to_insert_breakpoint = memory_insert_breakpoint;
child_ops.to_remove_breakpoint = memory_remove_breakpoint;
child_ops.to_terminal_init = 0;
child_ops.to_terminal_inferior = 0;
child_ops.to_terminal_ours_for_output = 0;
child_ops.to_terminal_ours = 0;
child_ops.to_terminal_info = 0;
child_ops.to_kill = child_kill_inferior;
child_ops.to_load = 0;
child_ops.to_lookup_symbol = 0;
child_ops.to_create_inferior = child_create_inferior;
child_ops.to_post_startup_inferior = NULL; /* to_post_startup_inferior */
child_ops.to_acknowledge_created_inferior = NULL; /* to_acknowledge_created_inferior */
child_ops.to_clone_and_follow_inferior = NULL; /* to_clone_and_follow_inferior */
child_ops.to_post_follow_inferior_by_clone = NULL; /* to_post_follow_inferior_by_clone */
child_ops.to_insert_fork_catchpoint = NULL;
child_ops.to_remove_fork_catchpoint = NULL;
child_ops.to_insert_vfork_catchpoint = NULL;
child_ops.to_remove_vfork_catchpoint = NULL;
child_ops.to_has_forked = NULL; /* to_has_forked */
child_ops.to_has_vforked = NULL; /* to_has_vforked */
child_ops.to_can_follow_vfork_prior_to_exec = NULL;
child_ops.to_post_follow_vfork = NULL; /* to_post_follow_vfork */
child_ops.to_insert_exec_catchpoint = NULL;
child_ops.to_remove_exec_catchpoint = NULL;
child_ops.to_has_execd = NULL;
child_ops.to_reported_exec_events_per_exec_call = NULL;
child_ops.to_has_exited = NULL;
child_ops.to_mourn_inferior = child_mourn_inferior;
child_ops.to_can_run = child_can_run;
child_ops.to_notice_signals = 0;
child_ops.to_thread_alive = 0;
child_ops.to_stop = child_stop;
child_ops.to_pid_to_exec_file = NULL; /* to_pid_to_exec_file */
child_ops.to_stratum = process_stratum;
child_ops.DONT_USE = 0;
child_ops.to_has_all_memory = 1;
child_ops.to_has_memory = 1;
child_ops.to_has_stack = 1;
child_ops.to_has_registers = 1;
child_ops.to_has_execution = 1;
child_ops.to_sections = 0;
child_ops.to_sections_end = 0;
child_ops.to_magic = OPS_MAGIC;
};
void
_initialize_mac_nat (void)
{
init_child_ops ();
add_info ("proc", info_proc,
"Show information about processes.");
}

File diff suppressed because it is too large Load Diff

View File

@ -1,81 +0,0 @@
# OBSOLETE # Configuration fragment for GDB.
# OBSOLETE
# OBSOLETE If "{host_canonical}" =~ /m68k-apple-mpw/
# OBSOLETE forward-include "{srcdir}"config:m68k:xm-mpw.h xm.h
# OBSOLETE Set siow_lib '"{Libraries}"SIOW.o'
# OBSOLETE
# OBSOLETE Else If "{host_canonical}" =~ /powerpc-apple-mpw/
# OBSOLETE forward-include "{srcdir}"config:powerpc:xm-mpw.h xm.h
# OBSOLETE Set siow_lib '"{PPCLibraries}"PPCSIOW.o'
# OBSOLETE
# OBSOLETE End If
# OBSOLETE
# OBSOLETE Set xdepfiles '"{o}"mac-xdep.c.o'
# OBSOLETE
# OBSOLETE Set enable_cflags ""
# OBSOLETE
# OBSOLETE # Make a copy of this file and give it a different name, so it
# OBSOLETE # won't be confused with GDB's serial.h.
# OBSOLETE
# OBSOLETE Duplicate -y "{CIncludes}"Serial.h MacSerial.h
# OBSOLETE
# OBSOLETE Echo "/* dummy */" >termio.h
# OBSOLETE
# OBSOLETE If "{target_canonical}" =~ /m68k-apple-macos/
# OBSOLETE forward-include "{srcdir}"config:m68k:tm-mac.h tm.h
# OBSOLETE forward-include "{srcdir}"config:m68k:tm-m68k.h 'm68k/tm-m68k.h'
# OBSOLETE Set tdepfiles '"{o}"m68k-tdep.c.o'
# OBSOLETE
# OBSOLETE Else If "{target_canonical}" =~ /powerpc-apple-macos/
# OBSOLETE forward-include "{srcdir}"config:powerpc:tm-macos.h tm.h
# OBSOLETE forward-include "{srcdir}"config:rs6000:tm-rs6000.h 'rs6000/tm-rs6000.h'
# OBSOLETE Set tdepfiles '"{o}"rs6000-tdep.c.o "{o}"xcoffread.c.o'
# OBSOLETE
# OBSOLETE Else If "{target_canonical}" =~ /i386-unknown-go32/
# OBSOLETE forward-include "{srcdir}"config:i386:tm-i386v.h tm.h
# OBSOLETE Set tdepfiles '"{o}"i386-tdep.c.o'
# OBSOLETE
# OBSOLETE Else If "{target_canonical}" =~ /mips-idt-ecoff/
# OBSOLETE forward-include "{srcdir}"config:mips:tm-embed.h tm.h
# OBSOLETE forward-include "{srcdir}"config:mips:tm-bigmips.h 'mips/tm-bigmips.h'
# OBSOLETE forward-include "{srcdir}"config:mips:tm-mips.h 'mips/tm-mips.h'
# OBSOLETE Set tdepfiles '"{o}"mips-tdep.c.o "{o}"remote-mips.c.o'
# OBSOLETE
# OBSOLETE Else If "{target_canonical}" =~ /sh-hitachi-hms/
# OBSOLETE forward-include "{srcdir}"config:sh:tm-sh.h tm.h
# OBSOLETE Set tdepfiles '"{o}"sh-tdep.c.o'
# OBSOLETE
# OBSOLETE End If
# OBSOLETE
# OBSOLETE If "{target_canonical}" =~ /m68k-apple-macos/
# OBSOLETE forward-include "{srcdir}"config:m68k:nm-macos.h nm.h
# OBSOLETE Set natdepfiles '"{o}"mac-nat.c.o'
# OBSOLETE
# OBSOLETE Else If "{target_canonical}" =~ /powerpc-apple-macos/
# OBSOLETE forward-include "{srcdir}"config:powerpc:nm-macos.h nm.h
# OBSOLETE Set natdepfiles '"{o}"mac-nat.c.o'
# OBSOLETE
# OBSOLETE Else
# OBSOLETE forward-include "{srcdir}"config:nm-empty.h nm.h
# OBSOLETE Set natdepfiles ' '
# OBSOLETE
# OBSOLETE End If
# OBSOLETE
# OBSOLETE Echo '# From mpw-config.in' > "{o}"mk.tmp
# OBSOLETE Echo "TDEPFILES = " {tdepfiles} >> "{o}"mk.tmp
# OBSOLETE Echo "XDEPFILES = " {xdepfiles} >> "{o}"mk.tmp
# OBSOLETE Echo "NATDEPFILES = " {natdepfiles} >> "{o}"mk.tmp
# OBSOLETE Echo "XM_ADD_FILES = " >> "{o}"mk.tmp
# OBSOLETE Echo "TM_ADD_FILES = " >> "{o}"mk.tmp
# OBSOLETE Echo "NAT_ADD_FILES = " >> "{o}"mk.tmp
# OBSOLETE Echo "XM_CDEPS = " >> "{o}"mk.tmp
# OBSOLETE Echo "TM_CDEPS = " >> "{o}"mk.tmp
# OBSOLETE Echo "NAT_CDEPS = " >> "{o}"mk.tmp
# OBSOLETE Echo "SIOW_LIB = " {siow_lib} >> "{o}"mk.tmp
# OBSOLETE Echo "ENABLE_CFLAGS = " {enable_cflags} >> "{o}"mk.tmp
# OBSOLETE Echo '# End from mpw-config.in' >> "{o}"mk.tmp
# OBSOLETE
# OBSOLETE Echo '/* config.h. Generated by mpw-configure. */' > "{o}"config.new
# OBSOLETE Echo '#include "mpw.h"' >> "{o}"config.new
# OBSOLETE
# OBSOLETE MoveIfChange "{o}"config.new "{o}"config.h

View File

@ -1,178 +0,0 @@
# OBSOLETE # Sed commands that finish translating the GDB Unix Makefile to MPW syntax.
# OBSOLETE
# OBSOLETE /^host_alias =/s/^/#/
# OBSOLETE /^target_alias =/s/^/#/
# OBSOLETE
# OBSOLETE /^host_makefile_frag@$/d
# OBSOLETE /^target_makefile_frag@$/d
# OBSOLETE
# OBSOLETE /@ENABLE_CFLAGS@/s/@ENABLE_CFLAGS@/{ENABLE_CFLAGS}/g
# OBSOLETE /^ENABLE_CFLAGS=/s/^/#/
# OBSOLETE
# OBSOLETE # Edit all the symbolic definitions pointing to various libraries and such.
# OBSOLETE
# OBSOLETE /^INCLUDE_DIR = /s/"{srcdir}":include/"{topsrcdir}"include:/
# OBSOLETE
# OBSOLETE /^MMALLOC_DIR = /s/::mmalloc/mmalloc:/
# OBSOLETE /^MMALLOC_SRC = /s/"{srcdir}"/"{topsrcdir}"/
# OBSOLETE /^MMALLOC =/s/=.*$/=/
# OBSOLETE /MMALLOC_CFLAGS =/s/=.*$/= -u USE_MMALLOC/
# OBSOLETE
# OBSOLETE /^BFD_DIR = /s/::bfd/bfd:/
# OBSOLETE /^BFD = /s/{BFD_DIR}:libbfd/{BFD_DIR}libbfd/
# OBSOLETE /^BFD_SRC = /s/"{srcdir}"/"{topsrcdir}"/
# OBSOLETE
# OBSOLETE /^READLINE_DIR = /s/::readline/readline:/
# OBSOLETE /^READLINE =/s/=.*$/=/
# OBSOLETE /^READLINE_SRC = /s/"{srcdir}"/"{topsrcdir}"/
# OBSOLETE
# OBSOLETE /^INCLUDE_CFLAGS = /s/$/ -i "{topsrcdir}"include:mpw: -i ::extra-include:/
# OBSOLETE
# OBSOLETE /^SER_HARDWIRE =/s/ser-unix/ser-mac/
# OBSOLETE
# OBSOLETE /^TERMCAP =/s/ =.*$/ =/
# OBSOLETE
# OBSOLETE # Whack out various autoconf vars that we don't need.
# OBSOLETE /@CONFIG_LDFLAGS@/s/@CONFIG_LDFLAGS@//g
# OBSOLETE /@HLDFLAGS@/s/@HLDFLAGS@//g
# OBSOLETE /@DEFS@/s/@DEFS@//g
# OBSOLETE /@YACC@/s/@YACC@/byacc/g
# OBSOLETE /@ENABLE_OBS@/s/@ENABLE_OBS@//g
# OBSOLETE /@ENABLE_CLIBS@/s/@ENABLE_CLIBS@//g
# OBSOLETE /@LIBS@/s/@LIBS@//g
# OBSOLETE
# OBSOLETE # Whack out autoconf hook for thread debugging.
# OBSOLETE /@THREAD_DB_OBS@/s/@THREAD_DB_OBS@//g
# OBSOLETE
# OBSOLETE # Fix up paths to include directories.
# OBSOLETE /INCLUDE_DIR/s/"{s}"{INCLUDE_DIR}/{INCLUDE_DIR}/g
# OBSOLETE /INCLUDE_DIR/s/{INCLUDE_DIR}:/{INCLUDE_DIR}/g
# OBSOLETE /INCLUDE_DIR/s/"{INCLUDE_DIR}":/"{INCLUDE_DIR}"/g
# OBSOLETE
# OBSOLETE /{BFD_DIR}/s/"{BFD_DIR}":/"{BFD_DIR}"/g
# OBSOLETE /{BFD_DIR}/s/\([ ]\){BFD_DIR}/\1::{BFD_DIR}/g
# OBSOLETE /{BFD_DIR}/s/\([ ]\)"{BFD_DIR}"/\1::"{BFD_DIR}"/g
# OBSOLETE
# OBSOLETE /{BFD_SRC}/s/"{s}"{BFD_SRC}/{BFD_SRC}/g
# OBSOLETE /{BFD_SRC}/s/{BFD_SRC}:/{BFD_SRC}/g
# OBSOLETE
# OBSOLETE /{READLINE_SRC}/s/"{s}"{READLINE_SRC}/{READLINE_SRC}/g
# OBSOLETE
# OBSOLETE /^readline_headers =/,/^$/c\
# OBSOLETE readline_headers =\
# OBSOLETE
# OBSOLETE
# OBSOLETE # This isn't really useful, and seems to cause nonsensical complaints.
# OBSOLETE /{ALLDEPFILES}/s/{ALLDEPFILES}//g
# OBSOLETE
# OBSOLETE /^copying.c \\Option-f /,/^$/d
# OBSOLETE
# OBSOLETE # Fix the syntax of bits of C code that go into version.c.
# OBSOLETE /char /s/'char .Option-x/'char */
# OBSOLETE
# OBSOLETE # Point at files in the obj dir rather than src dir.
# OBSOLETE /version/s/"{s}"version\.c/"{o}"version.c/g
# OBSOLETE /version/s/^version\.c/"{o}"version.c/
# OBSOLETE /config/s/"{s}"config\.h/"{o}"config.h/g
# OBSOLETE /config/s/^config\.h/"{o}"config.h/
# OBSOLETE /xm/s/"{s}"xm\.h/"{o}"xm.h/g
# OBSOLETE /xm/s/^xm\.h/"{o}"xm.h/
# OBSOLETE /tm/s/"{s}"tm\.h/"{o}"tm.h/g
# OBSOLETE /tm/s/^tm\.h/"{o}"tm.h/
# OBSOLETE /nm/s/"{s}"nm\.h/"{o}"nm.h/g
# OBSOLETE /nm/s/^nm\.h/"{o}"nm.h/
# OBSOLETE
# OBSOLETE /exp.tab.c/s/"{s}"\([a-z0-9]*\)-exp\.tab\.c/"{o}"\1-exp.tab.c/g
# OBSOLETE /exp.tab.c/s/^\([a-z0-9]*\)-exp\.tab\.c/"{o}"\1-exp.tab.c/
# OBSOLETE
# OBSOLETE /y.tab/s/"{s}"y.tab\.c/"{o}"y.tab.c/g
# OBSOLETE /y.tab/s/^y.tab\.c/"{o}"y.tab.c/
# OBSOLETE
# OBSOLETE /init/s/"{s}"init\.c-tmp/"{o}"init.c-tmp/g
# OBSOLETE /init/s/^init\.c-tmp/"{o}"init.c-tmp/
# OBSOLETE /init/s/"{s}"init\.c/"{o}"init.c/g
# OBSOLETE /init/s/^init\.c/"{o}"init.c/
# OBSOLETE
# OBSOLETE # Fix up the generation of version.c.
# OBSOLETE /"{o}"version.c \\Option-f Makefile/,/^$/c\
# OBSOLETE "{o}"version.c \\Option-f Makefile\
# OBSOLETE echo -n 'char *version = "' >"{o}"version.c\
# OBSOLETE echo -n "{VERSION}" >>"{o}"version.c\
# OBSOLETE echo '";' >>"{o}"version.c\
# OBSOLETE echo -n 'char *host_name = "' >>"{o}"version.c\
# OBSOLETE echo -n "{host_alias}" >>"{o}"version.c\
# OBSOLETE echo '";' >>"{o}"version.c\
# OBSOLETE echo -n 'char *target_name = "' >>"{o}"version.c\
# OBSOLETE echo -n "{target_alias}" >>"{o}"version.c\
# OBSOLETE echo '";' >>"{o}"version.c\
# OBSOLETE
# OBSOLETE
# OBSOLETE /ansidecl/s/include "{s}""ansidecl.h"/include "ansidecl.h"/
# OBSOLETE
# OBSOLETE # Open-brace in a command causes much confusion; replace with the
# OBSOLETE # result from a script.
# OBSOLETE /initialize_all_files ()/c\
# OBSOLETE Echo -n 'void initialize_all_files () ' >> "{o}"init.c-tmp\
# OBSOLETE open-brace >> "{o}"init.c-tmp
# OBSOLETE
# OBSOLETE # Replace the whole sed bit for init.c; it's simpler that way...
# OBSOLETE /echo {OBS} {TSOBS}/,/echo '}'/c\
# OBSOLETE For i in {OBS} {TSOBS}\
# OBSOLETE Set filename "`Echo {i} | sed \\Option-d\
# OBSOLETE -e '/^Onindy.c.o/d' \\Option-d\
# OBSOLETE -e '/^nindy.c.o/d' \\Option-d\
# OBSOLETE -e '/ttyflush.c.o/d' \\Option-d\
# OBSOLETE -e '/xdr_ld.c.o/d' \\Option-d\
# OBSOLETE -e '/xdr_ptrace.c.o/d' \\Option-d\
# OBSOLETE -e '/xdr_rdb.c.o/d' \\Option-d\
# OBSOLETE -e '/udr.c.o/d' \\Option-d\
# OBSOLETE -e '/udip2soc.c.o/d' \\Option-d\
# OBSOLETE -e '/udi2go32.c.o/d' \\Option-d\
# OBSOLETE -e '/version.c.o/d' \\Option-d\
# OBSOLETE -e '/[a-z0-9A-Z_]*-exp.tab.c.o/d' \\Option-d\
# OBSOLETE -e 's/\\.c\\.o/.c/' \\Option-d\
# OBSOLETE -e 's/^://'`"\
# OBSOLETE If "{filename}" != ""\
# OBSOLETE sed <"{s}""{filename}" >>"{o}"init.c-tmp -n \\Option-d\
# OBSOLETE -e '/^_initialize_[a-z_0-9A-Z]* *(/s/^\\([a-z_0-9A-Z]*\\).*/ {extern void \\1 (); \\1 ();}/p'\
# OBSOLETE End If\
# OBSOLETE End For\
# OBSOLETE Echo '}' >>"{o}"init.c-tmp
# OBSOLETE
# OBSOLETE # Fix the main compile/link command.
# OBSOLETE /{CC_LD} {INTERNAL_LDFLAGS} -o gdb/,/"{o}"init.c.o {OBS} {TSOBS} {ADD_FILES} {CLIBS} {LOADLIBES}/c\
# OBSOLETE {CC_LD} {INTERNAL_LDFLAGS} -o gdb{PROG_EXT} "{o}"init.c.o {OBS} {TSOBS} {ADD_FILES} {CLIBS} {LOADLIBES} {EXTRALIBS}\
# OBSOLETE {MAKEPEF} gdb{PROG_EXT} -o gdb {MAKEPEF_TOOL_FLAGS} {MAKEPEF_FLAGS}\
# OBSOLETE {REZ} "{s}"mac-gdb.r -o gdb -append -d PROG_NAME='"'gdb'"' -d VERSION_STRING='"'{version}'"'\
# OBSOLETE
# OBSOLETE # Replace the install actions with MPW-friendly script.
# OBSOLETE /^install \\Option-f /,/^$/c\
# OBSOLETE install \\Option-f all install-only\
# OBSOLETE \
# OBSOLETE install-only \\Option-f \
# OBSOLETE NewFolderRecursive "{bindir}"\
# OBSOLETE Duplicate -y gdb "{bindir}"gdb\
# OBSOLETE If "`Exists SiowGDB`" != ""\
# OBSOLETE Duplicate -y SiowGDB "{bindir}"SiowGDB\
# OBSOLETE End If\
# OBSOLETE
# OBSOLETE
# OBSOLETE # Don't do any recursive subdir stuff.
# OBSOLETE / subdir_do/s/{MAKE}/null-command/
# OBSOLETE
# OBSOLETE # Edit out actions that only confuse MPW Make.
# OBSOLETE /^config.status \\Option-f/,/^$/d
# OBSOLETE /^Makefile \\Option-f/,/^$/d
# OBSOLETE
# OBSOLETE # Don't test config.h dependencies.
# OBSOLETE /^"{o}"config.h \\Option-f/s/^/#/
# OBSOLETE
# OBSOLETE # Add an action to build SIOWgdb.
# OBSOLETE $a\
# OBSOLETE SIOWgdb \\Option-f {OBS} {TSOBS} {ADD_DEPS} {CDEPS} "{o}"init.c.o\
# OBSOLETE Delete -i -y SIOWgdb\
# OBSOLETE {CC_LD} {INTERNAL_LDFLAGS} -t 'APPL' -c 'gdb ' -o SIOWgdb{PROG_EXT} "{o}"init.c.o {OBS} {TSOBS} {ADD_FILES} {CLIBS} {SIOW_LIB} {LOADLIBES} {EXTRALIBS}\
# OBSOLETE {MAKEPEF} SIOWgdb{PROG_EXT} -o SIOWgdb -ft 'APPL' -fc 'gdb ' {MAKEPEF_FLAGS} \
# OBSOLETE {REZ} -o SIOWgdb "{RIncludes}"siow.r -append -d __kPrefSize=5000 -d __kMinSize=2000 -d APPNAME='"'SIOWgdb'"' \
# OBSOLETE {REZ} "{s}"mac-gdb.r -o SIOWgdb -append -d VERSION_STRING='"'{version}'"'\

View File

@ -1,386 +0,0 @@
/* OBSOLETE /* Remote serial interface for local (hardwired) serial ports for Macintosh. */
/* OBSOLETE Copyright 1994, 1995, 1996, 1998, 2000 Free Software Foundation, Inc. */
/* OBSOLETE Contributed by Cygnus Support. Written by Stan Shebs. */
/* OBSOLETE */
/* OBSOLETE This file is part of GDB. */
/* OBSOLETE */
/* OBSOLETE This program is free software; you can redistribute it and/or modify */
/* OBSOLETE it under the terms of the GNU General Public License as published by */
/* OBSOLETE the Free Software Foundation; either version 2 of the License, or */
/* OBSOLETE (at your option) any later version. */
/* OBSOLETE */
/* OBSOLETE This program is distributed in the hope that it will be useful, */
/* OBSOLETE but WITHOUT ANY WARRANTY; without even the implied warranty of */
/* OBSOLETE MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */
/* OBSOLETE GNU General Public License for more details. */
/* OBSOLETE */
/* OBSOLETE You should have received a copy of the GNU General Public License */
/* OBSOLETE along with this program; if not, write to the Free Software */
/* OBSOLETE Foundation, Inc., 59 Temple Place - Suite 330, */
/* OBSOLETE Boston, MA 02111-1307, USA. */ */
/* OBSOLETE */
/* OBSOLETE #include "defs.h" */
/* OBSOLETE #include "serial.h" */
/* OBSOLETE */
/* OBSOLETE #include <Types.h> */
/* OBSOLETE #include <Devices.h> */
/* OBSOLETE /* This is the regular Mac Serial.h, but copied to a different name */
/* OBSOLETE so as not to get confused with the GDB serial.h above. */ */
/* OBSOLETE #include "MacSerial.h" */
/* OBSOLETE */
/* OBSOLETE /* This is unused for now. We just return a placeholder. */ */
/* OBSOLETE */
/* OBSOLETE struct mac_ttystate */
/* OBSOLETE { */
/* OBSOLETE int bogus; */
/* OBSOLETE }; */
/* OBSOLETE */
/* OBSOLETE static int mac_open (serial_t scb, const char *name); */
/* OBSOLETE static void mac_raw (serial_t scb); */
/* OBSOLETE static int mac_readchar (serial_t scb, int timeout); */
/* OBSOLETE static int mac_setbaudrate (serial_t scb, int rate); */
/* OBSOLETE static int mac_write (serial_t scb, const char *str, int len); */
/* OBSOLETE static void mac_close (serial_t scb); */
/* OBSOLETE static serial_ttystate mac_get_tty_state (serial_t scb); */
/* OBSOLETE static int mac_set_tty_state (serial_t scb, serial_ttystate state); */
/* OBSOLETE static char *aptr (short p); */
/* OBSOLETE */
/* OBSOLETE short input_refnum; */
/* OBSOLETE short output_refnum; */
/* OBSOLETE */
/* OBSOLETE char *mac_input_buffer; */
/* OBSOLETE char *mac_output_buffer; */
/* OBSOLETE */
/* OBSOLETE static int */
/* OBSOLETE mac_open (serial_t scb, const char *name) */
/* OBSOLETE { */
/* OBSOLETE OSErr err; */
/* OBSOLETE */
/* OBSOLETE /* Alloc buffer space first - that way any allocation failures are */
/* OBSOLETE intercepted before the serial driver gets involved. */ */
/* OBSOLETE if (mac_input_buffer == NULL) */
/* OBSOLETE mac_input_buffer = (char *) xmalloc (4096); */
/* OBSOLETE /* Match on a name and open a port. */ */
/* OBSOLETE if (strcmp (name, "modem") == 0) */
/* OBSOLETE { */
/* OBSOLETE err = OpenDriver ("\p.AIn", &input_refnum); */
/* OBSOLETE if (err != 0) */
/* OBSOLETE { */
/* OBSOLETE return (-1); */
/* OBSOLETE } */
/* OBSOLETE err = OpenDriver ("\p.AOut", &output_refnum); */
/* OBSOLETE if (err != 0) */
/* OBSOLETE { */
/* OBSOLETE CloseDriver (input_refnum); */
/* OBSOLETE return (-1); */
/* OBSOLETE } */
/* OBSOLETE } */
/* OBSOLETE else if (strcmp (name, "printer") == 0) */
/* OBSOLETE { */
/* OBSOLETE err = OpenDriver ("\p.BIn", &input_refnum); */
/* OBSOLETE if (err != 0) */
/* OBSOLETE { */
/* OBSOLETE return (-1); */
/* OBSOLETE } */
/* OBSOLETE err = OpenDriver ("\p.BOut", &output_refnum); */
/* OBSOLETE if (err != 0) */
/* OBSOLETE { */
/* OBSOLETE CloseDriver (input_refnum); */
/* OBSOLETE return (-1); */
/* OBSOLETE } */
/* OBSOLETE /* fake */ */
/* OBSOLETE scb->fd = 1; */
/* OBSOLETE return 0; */
/* OBSOLETE } */
/* OBSOLETE else */
/* OBSOLETE { */
/* OBSOLETE error ("You must specify a valid serial port name; your choices are `modem' or `printer'."); */
/* OBSOLETE errno = ENOENT; */
/* OBSOLETE return (-1); */
/* OBSOLETE } */
/* OBSOLETE /* We got something open. */ */
/* OBSOLETE if (1 /* using custom buffer */ ) */
/* OBSOLETE SerSetBuf (input_refnum, mac_input_buffer, 4096); */
/* OBSOLETE /* Set to a GDB-preferred state. */ */
/* OBSOLETE SerReset (input_refnum, stop10 | noParity | data8 | baud9600); */
/* OBSOLETE SerReset (output_refnum, stop10 | noParity | data8 | baud9600); */
/* OBSOLETE { */
/* OBSOLETE CntrlParam cb; */
/* OBSOLETE struct SerShk *handshake; */
/* OBSOLETE */
/* OBSOLETE cb.ioCRefNum = output_refnum; */
/* OBSOLETE cb.csCode = 14; */
/* OBSOLETE handshake = (struct SerShk *) &cb.csParam[0]; */
/* OBSOLETE handshake->fXOn = 0; */
/* OBSOLETE handshake->fCTS = 0; */
/* OBSOLETE handshake->xOn = 0; */
/* OBSOLETE handshake->xOff = 0; */
/* OBSOLETE handshake->errs = 0; */
/* OBSOLETE handshake->evts = 0; */
/* OBSOLETE handshake->fInX = 0; */
/* OBSOLETE handshake->fDTR = 0; */
/* OBSOLETE err = PBControl ((ParmBlkPtr) & cb, 0); */
/* OBSOLETE if (err < 0) */
/* OBSOLETE return (-1); */
/* OBSOLETE } */
/* OBSOLETE /* fake */ */
/* OBSOLETE scb->fd = 1; */
/* OBSOLETE return 0; */
/* OBSOLETE } */
/* OBSOLETE */
/* OBSOLETE static int */
/* OBSOLETE mac_noop (serial_t scb) */
/* OBSOLETE { */
/* OBSOLETE return 0; */
/* OBSOLETE } */
/* OBSOLETE */
/* OBSOLETE static void */
/* OBSOLETE mac_raw (serial_t scb) */
/* OBSOLETE { */
/* OBSOLETE /* Always effectively in raw mode. */ */
/* OBSOLETE } */
/* OBSOLETE */
/* OBSOLETE /* Read a character with user-specified timeout. TIMEOUT is number of seconds */
/* OBSOLETE to wait, or -1 to wait forever. Use timeout of 0 to effect a poll. Returns */
/* OBSOLETE char if successful. Returns -2 if timeout expired, EOF if line dropped */
/* OBSOLETE dead, or -3 for any other error (see errno in that case). */ */
/* OBSOLETE */
/* OBSOLETE static int */
/* OBSOLETE mac_readchar (serial_t scb, int timeout) */
/* OBSOLETE { */
/* OBSOLETE int status, n; */
/* OBSOLETE /* time_t */ unsigned long start_time, now; */
/* OBSOLETE OSErr err; */
/* OBSOLETE CntrlParam cb; */
/* OBSOLETE IOParam pb; */
/* OBSOLETE */
/* OBSOLETE if (scb->bufcnt-- > 0) */
/* OBSOLETE return *scb->bufp++; */
/* OBSOLETE */
/* OBSOLETE time (&start_time); */
/* OBSOLETE */
/* OBSOLETE while (1) */
/* OBSOLETE { */
/* OBSOLETE cb.ioCRefNum = input_refnum; */
/* OBSOLETE cb.csCode = 2; */
/* OBSOLETE err = PBStatus ((ParmBlkPtr) & cb, 0); */
/* OBSOLETE if (err < 0) */
/* OBSOLETE return SERIAL_ERROR; */
/* OBSOLETE n = *((long *) &cb.csParam[0]); */
/* OBSOLETE if (n > 0) */
/* OBSOLETE { */
/* OBSOLETE pb.ioRefNum = input_refnum; */
/* OBSOLETE pb.ioBuffer = (Ptr) (scb->buf); */
/* OBSOLETE pb.ioReqCount = (n > 64 ? 64 : n); */
/* OBSOLETE err = PBRead ((ParmBlkPtr) & pb, 0); */
/* OBSOLETE if (err < 0) */
/* OBSOLETE return SERIAL_ERROR; */
/* OBSOLETE scb->bufcnt = pb.ioReqCount; */
/* OBSOLETE scb->bufcnt--; */
/* OBSOLETE scb->bufp = scb->buf; */
/* OBSOLETE return *scb->bufp++; */
/* OBSOLETE } */
/* OBSOLETE else if (timeout == 0) */
/* OBSOLETE return SERIAL_TIMEOUT; */
/* OBSOLETE else if (timeout == -1) */
/* OBSOLETE ; */
/* OBSOLETE else */
/* OBSOLETE { */
/* OBSOLETE time (&now); */
/* OBSOLETE if (now > start_time + timeout) */
/* OBSOLETE return SERIAL_TIMEOUT; */
/* OBSOLETE } */
/* OBSOLETE PROGRESS (1); */
/* OBSOLETE } */
/* OBSOLETE } */
/* OBSOLETE */
/* OBSOLETE /* mac_{get set}_tty_state() are both dummys to fill out the function */
/* OBSOLETE vector. Someday, they may do something real... */ */
/* OBSOLETE */
/* OBSOLETE static serial_ttystate */
/* OBSOLETE mac_get_tty_state (serial_t scb) */
/* OBSOLETE { */
/* OBSOLETE struct mac_ttystate *state; */
/* OBSOLETE */
/* OBSOLETE state = (struct mac_ttystate *) xmalloc (sizeof *state); */
/* OBSOLETE */
/* OBSOLETE return (serial_ttystate) state; */
/* OBSOLETE } */
/* OBSOLETE */
/* OBSOLETE static int */
/* OBSOLETE mac_set_tty_state (serial_t scb, serial_ttystate ttystate) */
/* OBSOLETE { */
/* OBSOLETE return 0; */
/* OBSOLETE } */
/* OBSOLETE */
/* OBSOLETE static int */
/* OBSOLETE mac_noflush_set_tty_state (serial_t scb, serial_ttystate new_ttystate, */
/* OBSOLETE serial_ttystate old_ttystate) */
/* OBSOLETE { */
/* OBSOLETE return 0; */
/* OBSOLETE } */
/* OBSOLETE */
/* OBSOLETE static void */
/* OBSOLETE mac_print_tty_state (serial_t scb, */
/* OBSOLETE serial_ttystate ttystate, */
/* OBSOLETE struct ui_file *stream) */
/* OBSOLETE { */
/* OBSOLETE /* Nothing to print. */ */
/* OBSOLETE return; */
/* OBSOLETE } */
/* OBSOLETE */
/* OBSOLETE /* If there is a tricky formula to relate real baud rates */
/* OBSOLETE to what the serial driver wants, we should use it. Until */
/* OBSOLETE we get one, this table will have to do. */ */
/* OBSOLETE */
/* OBSOLETE static struct */
/* OBSOLETE { */
/* OBSOLETE int real_rate; */
/* OBSOLETE int bits; */
/* OBSOLETE } */
/* OBSOLETE mac_baud_rate_table[] = */
/* OBSOLETE { */
/* OBSOLETE { */
/* OBSOLETE 57600, baud57600 */
/* OBSOLETE } */
/* OBSOLETE , */
/* OBSOLETE { */
/* OBSOLETE 38400, 1 */
/* OBSOLETE } */
/* OBSOLETE , */
/* OBSOLETE { */
/* OBSOLETE 19200, baud19200 */
/* OBSOLETE } */
/* OBSOLETE , */
/* OBSOLETE { */
/* OBSOLETE 9600, baud9600 */
/* OBSOLETE } */
/* OBSOLETE , */
/* OBSOLETE { */
/* OBSOLETE 7200, baud7200 */
/* OBSOLETE } */
/* OBSOLETE , */
/* OBSOLETE { */
/* OBSOLETE 4800, baud4800 */
/* OBSOLETE } */
/* OBSOLETE , */
/* OBSOLETE { */
/* OBSOLETE 3600, baud3600 */
/* OBSOLETE } */
/* OBSOLETE , */
/* OBSOLETE { */
/* OBSOLETE 2400, baud2400 */
/* OBSOLETE } */
/* OBSOLETE , */
/* OBSOLETE { */
/* OBSOLETE 1800, baud1800 */
/* OBSOLETE } */
/* OBSOLETE , */
/* OBSOLETE { */
/* OBSOLETE 1200, baud1200 */
/* OBSOLETE } */
/* OBSOLETE , */
/* OBSOLETE { */
/* OBSOLETE 600, baud600 */
/* OBSOLETE } */
/* OBSOLETE , */
/* OBSOLETE { */
/* OBSOLETE 300, baud300 */
/* OBSOLETE } */
/* OBSOLETE , */
/* OBSOLETE { */
/* OBSOLETE 0, 0 */
/* OBSOLETE } */
/* OBSOLETE }; */
/* OBSOLETE */
/* OBSOLETE static int */
/* OBSOLETE mac_set_baud_rate (serial_t scb, int rate) */
/* OBSOLETE { */
/* OBSOLETE int i, bits; */
/* OBSOLETE */
/* OBSOLETE for (i = 0; mac_baud_rate_table[i].real_rate != 0; ++i) */
/* OBSOLETE { */
/* OBSOLETE if (mac_baud_rate_table[i].real_rate == rate) */
/* OBSOLETE { */
/* OBSOLETE bits = mac_baud_rate_table[i].bits; */
/* OBSOLETE break; */
/* OBSOLETE } */
/* OBSOLETE } */
/* OBSOLETE SerReset (input_refnum, stop10 | noParity | data8 | bits); */
/* OBSOLETE SerReset (output_refnum, stop10 | noParity | data8 | bits); */
/* OBSOLETE } */
/* OBSOLETE */
/* OBSOLETE static int */
/* OBSOLETE mac_set_stop_bits (serial_t scb, int num) */
/* OBSOLETE { */
/* OBSOLETE return 0; */
/* OBSOLETE } */
/* OBSOLETE */
/* OBSOLETE int first_mac_write = 0; */
/* OBSOLETE */
/* OBSOLETE static int */
/* OBSOLETE mac_write (serial_t scb, const char *str, int len) */
/* OBSOLETE { */
/* OBSOLETE OSErr err; */
/* OBSOLETE IOParam pb; */
/* OBSOLETE */
/* OBSOLETE if (first_mac_write++ < 4) */
/* OBSOLETE { */
/* OBSOLETE sleep (1); */
/* OBSOLETE } */
/* OBSOLETE pb.ioRefNum = output_refnum; */
/* OBSOLETE pb.ioBuffer = (Ptr) str; */
/* OBSOLETE pb.ioReqCount = len; */
/* OBSOLETE err = PBWrite ((ParmBlkPtr) & pb, 0); */
/* OBSOLETE if (err < 0) */
/* OBSOLETE { */
/* OBSOLETE return 1; */
/* OBSOLETE } */
/* OBSOLETE return 0; */
/* OBSOLETE } */
/* OBSOLETE */
/* OBSOLETE static void */
/* OBSOLETE mac_close (serial_t scb) */
/* OBSOLETE { */
/* OBSOLETE if (input_refnum) */
/* OBSOLETE { */
/* OBSOLETE if (1 /* custom buffer */ ) */
/* OBSOLETE SerSetBuf (input_refnum, mac_input_buffer, 0); */
/* OBSOLETE CloseDriver (input_refnum); */
/* OBSOLETE input_refnum = 0; */
/* OBSOLETE } */
/* OBSOLETE if (output_refnum) */
/* OBSOLETE { */
/* OBSOLETE if (0 /* custom buffer */ ) */
/* OBSOLETE SerSetBuf (input_refnum, mac_output_buffer, 0); */
/* OBSOLETE CloseDriver (output_refnum); */
/* OBSOLETE output_refnum = 0; */
/* OBSOLETE } */
/* OBSOLETE } */
/* OBSOLETE */
/* OBSOLETE static struct serial_ops mac_ops = */
/* OBSOLETE { */
/* OBSOLETE "hardwire", */
/* OBSOLETE 0, */
/* OBSOLETE mac_open, */
/* OBSOLETE mac_close, */
/* OBSOLETE mac_readchar, */
/* OBSOLETE mac_write, */
/* OBSOLETE mac_noop, /* flush output */ */
/* OBSOLETE mac_noop, /* flush input */ */
/* OBSOLETE mac_noop, /* send break -- currently only for nindy */ */
/* OBSOLETE mac_raw, */
/* OBSOLETE mac_get_tty_state, */
/* OBSOLETE mac_set_tty_state, */
/* OBSOLETE mac_print_tty_state, */
/* OBSOLETE mac_noflush_set_tty_state, */
/* OBSOLETE mac_set_baud_rate, */
/* OBSOLETE mac_set_stop_bits, */
/* OBSOLETE mac_noop, /* wait for output to drain */ */
/* OBSOLETE }; */
/* OBSOLETE */
/* OBSOLETE void */
/* OBSOLETE _initialize_ser_mac (void) */
/* OBSOLETE { */
/* OBSOLETE serial_add_interface (&mac_ops); */
/* OBSOLETE } */

View File

@ -1,6 +1,7 @@
/* List lines of source files for GDB, the GNU debugger.
Copyright 1986, 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995,
1996, 1997, 1998, 1999, 2000, 2001 Free Software Foundation, Inc.
Copyright 1986, 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1994,
1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002
Free Software Foundation, Inc.
This file is part of GDB.
@ -626,22 +627,6 @@ done:
xfree (f);
}
}
/* OBSOLETE #ifdef MPW */
/* OBSOLETE This is a debugging hack that can go away when all combinations */
/* OBSOLETE of Mac and Unix names are handled reasonably. */
/* OBSOLETE { */
/* OBSOLETE extern int debug_openp; */
/* OBSOLETE */
/* OBSOLETE if (debug_openp) */
/* OBSOLETE { */
/* OBSOLETE printf ("openp on %s, path %s mode %d prot %d\n returned %d", */
/* OBSOLETE string, path, mode, prot, fd); */
/* OBSOLETE if (*filename_opened) */
/* OBSOLETE printf (" (filename is %s)", *filename_opened); */
/* OBSOLETE printf ("\n"); */
/* OBSOLETE } */
/* OBSOLETE } */
/* OBSOLETE #endif *//* MPW */
return fd;
}
@ -727,22 +712,6 @@ open_source_file (struct symtab *s)
if (p != s->filename)
result = openp (path, 0, p, OPEN_MODE, 0, &s->fullname);
}
/* OBSOLETE #ifdef MPW */
/* OBSOLETE if (result < 0) */
/* OBSOLETE { */
/* OBSOLETE *//* Didn't work. Try using just the MPW basename. */
/* OBSOLETE p = (char *) mpw_basename (s->filename); */
/* OBSOLETE if (p != s->filename) */
/* OBSOLETE result = openp (path, 0, p, OPEN_MODE, 0, &s->fullname); */
/* OBSOLETE } */
/* OBSOLETE if (result < 0) */
/* OBSOLETE { */
/* OBSOLETE *//* Didn't work. Try using the mixed Unix/MPW basename. */
/* OBSOLETE p = (char *) mpw_mixed_basename (s->filename); */
/* OBSOLETE if (p != s->filename) */
/* OBSOLETE result = openp (path, 0, p, OPEN_MODE, 0, &s->fullname); */
/* OBSOLETE } */
/* OBSOLETE #endif MPW */
if (result >= 0)
{

View File

@ -1,6 +1,8 @@
/* Top level stuff for GDB, the GNU debugger.
Copyright 1986, 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995,
1996, 1997, 1998, 1999, 2000, 2001 Free Software Foundation, Inc.
Copyright 1986, 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1994,
1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002
Free Software Foundation, Inc.
This file is part of GDB.
@ -890,11 +892,6 @@ gdb_readline (char *prompt_arg)
character position to be off, since the newline we read from
the user is not accounted for. */
fputs_unfiltered (prompt_arg, gdb_stdout);
/* OBSOLETE #ifdef MPW */
/* OBSOLETE Move to a new line so the entered line doesn't have a prompt */
/* OBSOLETE on the front of it. */
/* OBSOLETE fputs_unfiltered ("\n", gdb_stdout); */
/* OBSOLETE #endif *//* MPW */
gdb_flush (gdb_stdout);
}

View File

@ -1,6 +1,6 @@
/* General utility routines for GDB, the GNU debugger.
Copyright 1986, 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996,
1997, 1998, 1999, 2000, 2001
Copyright 1986, 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995,
1996, 1997, 1998, 1999, 2000, 2001, 2002
Free Software Foundation, Inc.
This file is part of GDB.
@ -1237,11 +1237,6 @@ query (char *ctlstr,...)
/* Automatically answer "yes" if input is not from a terminal. */
if (!input_from_terminal_p ())
return 1;
/* OBSOLETE #ifdef MPW */
/* OBSOLETE *//* FIXME Automatically answer "yes" if called from MacGDB. */
/* OBSOLETE if (mac_app) */
/* OBSOLETE return 1; */
/* OBSOLETE #endif *//* MPW */
while (1)
{
@ -1257,13 +1252,6 @@ query (char *ctlstr,...)
if (annotation_level > 1)
printf_filtered ("\n\032\032query\n");
/* OBSOLETE #ifdef MPW */
/* OBSOLETE *//* If not in MacGDB, move to a new line so the entered line doesn't */
/* OBSOLETE have a prompt on the front of it. */
/* OBSOLETE if (!mac_app) */
/* OBSOLETE fputs_unfiltered ("\n", gdb_stdout); */
/* OBSOLETE #endif *//* MPW */
wrap_here ("");
gdb_flush (gdb_stdout);