]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
* dwarf2read.c dwarfread.c exec.c infcmd.c infrun.c main.c
authorStu Grossman <grossman@cygnus>
Thu, 8 Aug 1996 02:50:22 +0000 (02:50 +0000)
committerStu Grossman <grossman@cygnus>
Thu, 8 Aug 1996 02:50:22 +0000 (02:50 +0000)
mdebugread.c os9kread.c source.c top.c utils.c:  Don't
include param.h or sys/file.h (or unistd.h in some cases).
* defs.h exec.c inflow.c remote-array.c remote-e7000.c
sparcl-tdep.c terminal.h utils.c:  Replace all occurances of
__WIN32__, WINGDB, WIN32, etc... with _WIN32.
* main.c:  Remove #ifndef WINGDB around option processing.  Fix
bug with passing argc==0 and argv==NULL to getopt.
* (main) Remove calls to access() before source_command.  Let
soure_command handle access errors.
* maint.c (maintenance_dump_me):  #ifdef out for _WIN32.
* symtab.c (operator_chars):  Make this global for wingdb.
* top.c (disconnect):  #ifdef out for _WIN32.
* (source_command):  If got an error and from_tty, then call print
error, else just return quietly.
* utils.c (fatal_dump_core):  Can't kill ourselves under windows.
Just exit.
* (pollquit notice_quit):  #ifdef out stuff that doesn't exist
under windows.

12 files changed:
gdb/ChangeLog
gdb/defs.h
gdb/dwarf2read.c
gdb/dwarfread.c
gdb/main.c
gdb/maint.c
gdb/mdebugread.c
gdb/os9kread.c
gdb/remote-array.c
gdb/sparcl-tdep.c
gdb/terminal.h
gdb/top.c

index 63a4ac171b66fbe89c2fc3de9fdadbb585b837a3..4fa8577c1d5cbf2108085382b9fdcf66363f5ef2 100644 (file)
@@ -1,3 +1,25 @@
+Wed Aug  7 17:18:37 1996  Stu Grossman  (grossman@critters.cygnus.com)
+
+       * dwarf2read.c dwarfread.c exec.c infcmd.c infrun.c main.c
+       mdebugread.c os9kread.c source.c top.c utils.c:  Don't
+       include param.h or sys/file.h (or unistd.h in some cases).
+       * defs.h exec.c inflow.c remote-array.c remote-e7000.c
+       sparcl-tdep.c terminal.h utils.c:  Replace all occurances of
+       __WIN32__, WINGDB, WIN32, etc... with _WIN32.
+       * main.c:  Remove #ifndef WINGDB around option processing.  Fix
+       bug with passing argc==0 and argv==NULL to getopt.
+       * (main) Remove calls to access() before source_command.  Let
+       soure_command handle access errors.
+       * maint.c (maintenance_dump_me):  #ifdef out for _WIN32.
+       * symtab.c (operator_chars):  Make this global for wingdb.
+       * top.c (disconnect):  #ifdef out for _WIN32.
+       * (source_command):  If got an error and from_tty, then call print
+       error, else just return quietly.
+       * utils.c (fatal_dump_core):  Can't kill ourselves under windows.
+       Just exit.
+       * (pollquit notice_quit):  #ifdef out stuff that doesn't exist
+       under windows. 
+
 Wed Aug  7 09:59:19 1996  Jeffrey A Law  (law@cygnus.com)
 
        * config/pa/tm-hppa.h (EXTRACT_RETURN_VALUE): Tweak for
index 20a401a09ab8c16be01882a5468dc5c6b26272e2..f64bda691537f860a3da671b611cd29693463703 100644 (file)
@@ -985,7 +985,7 @@ extern int use_windows;
 #endif
 
 #ifndef SLASH_P
-#if defined(__GO32__)||defined(__WIN32__)
+#if defined(__GO32__)||defined(_WIN32)
 #define SLASH_P(X) ((X)=='\\')
 #else
 #define SLASH_P(X) ((X)=='/')
@@ -993,7 +993,7 @@ extern int use_windows;
 #endif
 
 #ifndef SLASH_CHAR
-#if defined(__GO32__)||defined(__WIN32__)
+#if defined(__GO32__)||defined(_WIN32)
 #define SLASH_CHAR '\\'
 #else
 #define SLASH_CHAR '/'
@@ -1001,7 +1001,7 @@ extern int use_windows;
 #endif
 
 #ifndef SLASH_STRING
-#if defined(__GO32__)||defined(__WIN32__)
+#if defined(__GO32__)||defined(_WIN32)
 #define SLASH_STRING "\\"
 #else
 #define SLASH_STRING "/"
index 9c0e95ab2bf93c4e9006e8a08212a7440b4303bb..2ece59486ec23a34ab3e6e2ca2384acec45e53e2 100644 (file)
@@ -40,10 +40,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
 #include <string.h>
 #include <sys/types.h>
 
-#ifndef        NO_SYS_FILE
-#include <sys/file.h>
-#endif
-
 /* .debug_info header for a compilation unit 
    Because of alignment constraints, this structure has padding and cannot
    be mapped directly onto the beginning of the .debug_info section.  */
index 798a1f9db452da19e13753cbe94f269e4025ec0a..98ceb490bc6038d19ee84199f69817b8f1fd9023 100644 (file)
@@ -54,10 +54,6 @@ other things to work on, if you get bored. :-)
 #include <fcntl.h>
 #include "gdb_string.h"
 
-#ifndef        NO_SYS_FILE
-#include <sys/file.h>
-#endif
-
 /* Some macros to provide DIE info for complaints. */
 
 #define DIE_ID (curdie!=NULL ? curdie->die_ref : 0)
index 8671c9ecde692e338464d90ad17e31259248f79d..11b5f87e875f9ea30d209bd4f832b5e8c5d71f62 100644 (file)
@@ -32,12 +32,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
 #include <ctype.h>
 
 #include "gdb_string.h"
-#ifdef HAVE_UNISTD_H
-#include <unistd.h>
-#endif
-#ifndef        NO_SYS_FILE
-#include <sys/file.h>
-#endif
 
 /* Temporary variable for SET_TOP_LEVEL.  */
 
@@ -140,7 +134,6 @@ main (argc, argv)
   current_directory = gdb_dirbuf;
 
   /* Parse arguments and options.  */
-#ifndef WINGDB
   {
     int c;
     /* When var field is 0, use flag field to record the equivalent
@@ -340,7 +333,6 @@ main (argc, argv)
       quiet = 1;
   }
 
-#endif
   gdb_init ();
 
   /* Do these (and anything which might call wrap_here or *_filtered)
@@ -435,7 +427,7 @@ GDB manual (available as on-line info or a printed manual).\n", gdb_stdout);
       strcat (homeinit, "/");
       strcat (homeinit, gdbinit);
 
-      if (!inhibit_gdbinit && access (homeinit, R_OK) == 0)
+      if (!inhibit_gdbinit)
        {
          if (!SET_TOP_LEVEL ())
            source_command (homeinit, 0);
@@ -529,7 +521,7 @@ GDB manual (available as on-line info or a printed manual).\n", gdb_stdout);
   
   if (!homedir
       || memcmp ((char *) &homebuf, (char *) &cwdbuf, sizeof (struct stat)))
-    if (!inhibit_gdbinit && access (gdbinit, R_OK) == 0)
+    if (!inhibit_gdbinit)
       {
        if (!SET_TOP_LEVEL ())
          source_command (gdbinit, 0);
@@ -591,7 +583,7 @@ GDB manual (available as on-line info or a printed manual).\n", gdb_stdout);
   /* The default command loop. 
      The WIN32 Gui calls this main to set up gdb's state, and 
      has its own command loop. */
-#if !defined (WINGDB)
+#ifndef _WIN32
   while (1)
     {
       if (!SET_TOP_LEVEL ())
index 312195cc2218870d5ffb909b7c0617058a290afd..4269d9156e88e3c03ab09d22bf274e259c874fd9 100644 (file)
@@ -88,7 +88,7 @@ maintenance_command (args, from_tty)
   help_list (maintenancelist, "maintenance ", -1, gdb_stdout);
 }
 
-
+#ifndef _WIN32
 /* ARGSUSED */
 static void
 maintenance_dump_me (args, from_tty)
@@ -101,6 +101,7 @@ maintenance_dump_me (args, from_tty)
       kill (getpid (), SIGQUIT);
     }
 }
+#endif
 
 /*  Someday we should allow demangling for things other than just
     explicit strings.  For example, we might want to be able to
@@ -307,11 +308,13 @@ to test internal functions such as the C++ demangler, etc.",
                  &maintenanceprintlist, "maintenance print ", 0,
                  &maintenancelist);
 
+#ifndef _WIN32
   add_cmd ("dump-me", class_maintenance, maintenance_dump_me,
           "Get fatal error; make debugger dump its core.\n\
 GDB sets it's handling of SIGQUIT back to SIG_DFL and then sends\n\
 itself a SIGQUIT signal.",
           &maintenancelist);
+#endif
 
   add_cmd ("demangle", class_maintenance, maintenance_demangle,
           "Demangle a C++ mangled name.\n\
index 5c23ddaf9c91885e92f8f91ade6e39f998b29ef1..a992658d26f04516aa4a60a61249ec3c2fc1566e 100644 (file)
@@ -72,8 +72,6 @@ typedef struct mips_extra_func_info {
 #include <sys/types.h>
 #endif
 
-#include <sys/param.h>
-#include <sys/file.h>
 #include "gdb_stat.h"
 #include "gdb_string.h"
 
index d79e732194226045171df93da35a704169f3159a..8614678e1799d1a11f0367550cc08693924a0e5d 100644 (file)
@@ -42,10 +42,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
 #endif
 
 #include "obstack.h"
-#include <sys/param.h>
-#ifndef        NO_SYS_FILE
-#include <sys/file.h>
-#endif
 #include "gdb_stat.h"
 #include <ctype.h>
 #include "symtab.h"
index 0ed84cade2c37db40d82752fe9ff56c48d20a4c9..42aa2dab682bd31b4d79a1ae5d7932de601c140d 100644 (file)
@@ -727,7 +727,7 @@ array_wait (pid, status)
 
   timeout = 0;         /* Don't time out -- user program is running. */
  
-#if !defined(__GO32__) && !defined(__MSDOS__) && !defined(__WIN32__)
+#if !defined(__GO32__) && !defined(__MSDOS__) && !defined(_WIN32)
   tty_desc = SERIAL_FDOPEN (0);
   ttystate = SERIAL_GET_TTY_STATE (tty_desc);
   SERIAL_RAW (tty_desc);
index ed9afb82e0ae36f90b96733c62d82f84750cd278..08736aa9715bf6c4311fe1addc1205e6ebc8e416 100644 (file)
@@ -23,16 +23,10 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
 #include "target.h"
 #include "serial.h"
 #include <sys/types.h>
-#include <sys/time.h>
 
-#if defined(__GO32__) || defined(WIN32)
-#undef HAVE_SOCKETS
-#else
+#if !defined(__GO32__) && !defined(_WIN32)
 #define HAVE_SOCKETS
-#endif
-
-
-#ifdef HAVE_SOCKETS     
+#include <sys/time.h>
 #include <unistd.h>
 #include <sys/socket.h>
 #include <netinet/in.h>
index 6a3242610def8df4e4bca3510f3e8426d69deb00..7853d647227de4c272409d729ea64aabae884fd1 100644 (file)
@@ -24,19 +24,19 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
 /* If we're using autoconf, it will define HAVE_TERMIOS_H,
    HAVE_TERMIO_H and HAVE_SGTTY_H for us. One day we can rewrite
    ser-unix.c and inflow.c to inspect those names instead of
-   HAVE_TERMIOS, HAVE_TERMIO and the implicit HAVE_SGTYY (when neither
+   HAVE_TERMIOS, HAVE_TERMIO and the implicit HAVE_SGTTY (when neither
    HAVE_TERMIOS or HAVE_TERMIO is set).  Until then, make sure that
    nothing has already defined the one of the names, and do the right
    thing. */
 
 /* nothing works with go32, and the headers aren't complete */
-#if !defined (__GO32__)
+#if !defined (__GO32__) && !defined (_WIN32)
 #if !defined (HAVE_TERMIOS) && !defined(HAVE_TERMIO) && !defined(HAVE_SGTTY)
 #if defined(HAVE_TERMIOS_H)
 #define HAVE_TERMIOS
 #elif defined(HAVE_TERMIO_H)
 #define HAVE_TERMIO
-#elif defined(HAVE_SGTTY)
+#elif defined(HAVE_SGTTY_H)
 #define HAVE_SGTTY
 #endif
 #endif
@@ -46,8 +46,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
 #include <termios.h>
 #endif
 
-
-#if !defined(__GO32__) && !defined(__WIN32__) && !defined (HAVE_TERMIOS)
+#if !defined(__GO32__) && !defined(_WIN32) && !defined (HAVE_TERMIOS)
 
 /* Define a common set of macros -- BSD based -- and redefine whatever
    the system offers to make it look like that.  FIXME: serial.h and
index 49a5c97e698b4c832b2ea186bd171b301ed85015..ae072248146b3d09e880456984776f30632a9caa 100644 (file)
--- a/gdb/top.c
+++ b/gdb/top.c
@@ -48,10 +48,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
 #endif
 
 #include "gdb_string.h"
-#ifndef        NO_SYS_FILE
-#include <sys/file.h>
-#endif
-#include <sys/param.h>
 #include "gdb_stat.h"
 #include <ctype.h>
 
@@ -575,6 +571,7 @@ catch_errors (func, args, errstring, mask)
 
 /* Handler for SIGHUP.  */
 
+#ifndef _WIN32
 static void
 disconnect (signo)
 int signo;
@@ -584,6 +581,7 @@ int signo;
   signal (SIGHUP, SIG_DFL);
   kill (getpid (), SIGHUP);
 }
+#endif
 
 /* Just a little helper function for disconnect().  */
 
@@ -1895,9 +1893,11 @@ init_signals ()
      might be in memory, shared between the two).  Since we establish
      a handler for SIGQUIT, when we call exec it will set the signal
      to SIG_DFL for us.  */
+#ifndef _WIN32
   signal (SIGQUIT, do_nothing);
   if (signal (SIGHUP, do_nothing) != SIG_IGN)
     signal (SIGHUP, disconnect);
+#endif
   signal (SIGFPE, float_handler);
 
 #if defined(SIGWINCH) && defined(SIGWINCH_HANDLER)
@@ -2987,8 +2987,11 @@ source_command (args, from_tty)
   old_cleanups = make_cleanup (free, file);
 
   stream = fopen (file, FOPEN_RT);
-  if (stream == 0)
-    perror_with_name (file);
+  if (!stream)
+    if (from_tty)
+      perror_with_name (file);
+    else
+      return;
 
   make_cleanup (fclose, stream);