X-Git-Url: http://git.efficios.com/?a=blobdiff_plain;f=gdb%2Fstop-gdb.c;h=ee84609664c51c04b43df8652193eb410c0b2924;hb=a847613f7489967c9bf31c82fab3fb44e5d9d7e2;hp=8f22bf9195788463dffcd4cdb4eb246576d890b1;hpb=1996fae84682e8ddd146215dd2959ad1ec924c09;p=deliverable%2Fbinutils-gdb.git diff --git a/gdb/stop-gdb.c b/gdb/stop-gdb.c index 8f22bf9195..ee84609664 100644 --- a/gdb/stop-gdb.c +++ b/gdb/stop-gdb.c @@ -1,33 +1,34 @@ /* A client to make GDB return to command level in Mach 3. - Copyright (C) 1992, 1993 Free Software Foundation, Inc. + Copyright 1992, 1993, 1994, 2000 Free Software Foundation, Inc. -This file is part of GDB. + 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 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. + 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. */ + 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. */ /* Authors: Jukka Virtanen and Peter Stout . A simple client to make GDB (versions 4.4 and later) on Mach 3 return to the command level when it is waiting for the inferior to stop. - + Actions: Lookup the send right to the GDB message port from the - NetMsgServer. + NetMsgServer. - Send an asynchronous message with msgh_id - GDB_MESSAGE_ID_STOP to that port. - */ + Send an asynchronous message with msgh_id + GDB_MESSAGE_ID_STOP to that port. + */ #include @@ -40,9 +41,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include void -main (argc, argv) - int argc; - char **argv; +main (int argc, char **argv) { kern_return_t kr; mach_msg_header_t msg; @@ -66,7 +65,7 @@ main (argc, argv) else host = (char *) ""; - name = malloc (strlen (argv[1]) + sizeof(GDB_NAME_PREFIX)); + name = malloc (strlen (argv[1]) + sizeof (GDB_NAME_PREFIX)); if (name == NULL) { fprintf (stderr, "Unable to allocate memory for name."); @@ -86,8 +85,8 @@ main (argc, argv) if (kr != KERN_SUCCESS) { fprintf (stderr, "Unable to lookup the GDB service port: %s.\n", - mach_error_string(kr)); - exit(1); + mach_error_string (kr)); + exit (1); } /* Code generated by mig stub generator, with minor cleanups :-) @@ -96,10 +95,10 @@ main (argc, argv) msg.msgh_bits = MACH_MSGH_BITS (MACH_MSG_TYPE_COPY_SEND, 0); msg.msgh_remote_port = gdb_port; - msg.msgh_local_port = MACH_PORT_NULL; - msg.msgh_size = sizeof(msg); - msg.msgh_seqno = 0; - msg.msgh_id = GDB_MESSAGE_ID_STOP; + msg.msgh_local_port = MACH_PORT_NULL; + msg.msgh_size = sizeof (msg); + msg.msgh_seqno = 0; + msg.msgh_id = GDB_MESSAGE_ID_STOP; kr = mach_msg_send (&msg); if (kr != KERN_SUCCESS)