aboutsummaryrefslogtreecommitdiff
path: root/gdb
diff options
context:
space:
mode:
Diffstat (limited to 'gdb')
-rw-r--r--gdb/ChangeLog22
-rw-r--r--gdb/defs.h6
-rw-r--r--gdb/dwarf2read.c4
-rw-r--r--gdb/dwarfread.c4
-rw-r--r--gdb/main.c14
-rw-r--r--gdb/maint.c5
-rw-r--r--gdb/mdebugread.c2
-rw-r--r--gdb/os9kread.c4
-rw-r--r--gdb/remote-array.c2
-rw-r--r--gdb/sparcl-tdep.c10
-rw-r--r--gdb/terminal.h9
-rw-r--r--gdb/top.c15
12 files changed, 48 insertions, 49 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 63a4ac1..4fa8577 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -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
diff --git a/gdb/defs.h b/gdb/defs.h
index 20a401a..f64bda6 100644
--- a/gdb/defs.h
+++ b/gdb/defs.h
@@ -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 "/"
diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c
index 9c0e95a..2ece594 100644
--- a/gdb/dwarf2read.c
+++ b/gdb/dwarf2read.c
@@ -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. */
diff --git a/gdb/dwarfread.c b/gdb/dwarfread.c
index 798a1f9..98ceb49 100644
--- a/gdb/dwarfread.c
+++ b/gdb/dwarfread.c
@@ -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)
diff --git a/gdb/main.c b/gdb/main.c
index 8671c9e..11b5f87 100644
--- a/gdb/main.c
+++ b/gdb/main.c
@@ -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 ())
diff --git a/gdb/maint.c b/gdb/maint.c
index 312195c..4269d91 100644
--- a/gdb/maint.c
+++ b/gdb/maint.c
@@ -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\
diff --git a/gdb/mdebugread.c b/gdb/mdebugread.c
index 5c23dda..a992658 100644
--- a/gdb/mdebugread.c
+++ b/gdb/mdebugread.c
@@ -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"
diff --git a/gdb/os9kread.c b/gdb/os9kread.c
index d79e732..8614678 100644
--- a/gdb/os9kread.c
+++ b/gdb/os9kread.c
@@ -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"
diff --git a/gdb/remote-array.c b/gdb/remote-array.c
index 0ed84ca..42aa2da 100644
--- a/gdb/remote-array.c
+++ b/gdb/remote-array.c
@@ -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);
diff --git a/gdb/sparcl-tdep.c b/gdb/sparcl-tdep.c
index ed9afb8..08736aa 100644
--- a/gdb/sparcl-tdep.c
+++ b/gdb/sparcl-tdep.c
@@ -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>
diff --git a/gdb/terminal.h b/gdb/terminal.h
index 6a32426..7853d64 100644
--- a/gdb/terminal.h
+++ b/gdb/terminal.h
@@ -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
diff --git a/gdb/top.c b/gdb/top.c
index 49a5c97..ae07224 100644
--- 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);