aboutsummaryrefslogtreecommitdiff
path: root/gdb/main.c
diff options
context:
space:
mode:
authorGeoffrey Noer <noer@cygnus>1998-11-13 08:16:08 +0000
committerGeoffrey Noer <noer@cygnus>1998-11-13 08:16:08 +0000
commitd836385e11733f46b1a0b6e7c142e7317488ff36 (patch)
tree71a8ae722497db31a5864033835d6283232bd1bd /gdb/main.c
parent7c1c728ee2fe1b65446a9210b3040cba54899c5d (diff)
downloadgdb-d836385e11733f46b1a0b6e7c142e7317488ff36.zip
gdb-d836385e11733f46b1a0b6e7c142e7317488ff36.tar.gz
gdb-d836385e11733f46b1a0b6e7c142e7317488ff36.tar.bz2
Fri Nov 13 00:15:08 1998 Geoffrey Noer <noer@cygnus.com>
Changes to account for name change from cygwin32 to cygwin and clean up Win32-related ifdefs. * configure.tgt: check for cygwin* instead of cygwin32. New cygwin gdb_target variable loses the "32". * configure.host: check for cygwin* instead of cygwin32. New cygwin gdb_host variable loses the "32". * configure.in: test __CYGWIN__ instead of __CYGWIN32__, rename gdb_cv_os_cygwin32 variable to drop the "32". Call AM_EXEEXT instead of AC_EXEEXT since that isn't in a released autoconf yet. * configure: regenerate. * main.c: drop "32" from cygwin_ funcs, include sys/cygwin.h where cygwin path conv protos live, instead of adding a proto here for them here. * {main.c, ser-tcp.c, ser-unix.c, top.c}: check __CYGWIN__ instead of __CYGWIN32__. * source.c: thoughout, check _WIN32 instead of WIN32. * config/i386/cygwin32.mh: delete. * config/i386/cygwin.mh: new file, was cygwin32.mh. * config/i386/cygwin32.mt: delete. * config/i386/cygwin.mt: new file, was cygwin32.mt. * config/i386/tm-cygwin32.h: delete. * config/i386/tm-cygwin.h: new file, was tm-cygwin32.h. * config/i386/xm-cygwin32.h: delete. * config/i386/xm-cygwin.h: new file, was xm-cygwin32.h. * config/i386/xm-windows.h: #include xm-cygwin.h now. * config/powerpc/cygwin32.mh: delete. * config/powerpc/cygwin.mh: new file, was cygwin32.mh. * config/powerpc/cygwin32.mt: delete. * config/powerpc/cygwin.mt: new file, was cygwin32.mt. * config/powerpc/tm-cygwin32.h: delete. * config/powerpc/tm-cygwin.h: new file, was tm-cygwin32.h. * config/powerpc/xm-cygwin32.h: delete. * config/powerpc/xm-cygwin.h: new file, was xm-cygwin32.h. * rdi-share/aclocal.m4: regenerate with aclocal. * rdi-share/configure: regenerate with autoconf. * rdi-share/{host.h, hostchan.c, hostchan.h, serdrv.c, * serpardr.c, unixcomm.c}: check __CYGWIN__ instead of __CYGWIN32__.
Diffstat (limited to 'gdb/main.c')
-rw-r--r--gdb/main.c23
1 files changed, 10 insertions, 13 deletions
diff --git a/gdb/main.c b/gdb/main.c
index 57353df..b8b0837 100644
--- a/gdb/main.c
+++ b/gdb/main.c
@@ -56,14 +56,11 @@ int display_space;
static void print_gdb_help PARAMS ((GDB_FILE *));
extern void gdb_init PARAMS ((char *));
-#ifdef __CYGWIN32__
+#ifdef __CYGWIN__
#include <windows.h> /* for MAX_PATH */
-extern void cygwin32_conv_to_posix_path (const char *, char *);
+#include <sys/cygwin.h> /* for cygwin_conv_to_posix_path */
#endif
-extern void (*pre_add_symbol_hook) PARAMS ((char *));
-extern void (*post_add_symbol_hook) PARAMS ((void));
-
int
main (argc, argv)
int argc;
@@ -180,7 +177,9 @@ main (argc, argv)
{"version", no_argument, &print_version, 1},
{"x", required_argument, 0, 'x'},
/* start-sanitize-gdbtk */
+#ifdef GDBTK
{"tclcommand", required_argument, 0, 'z'},
+#endif
/* end-sanitize-gdbtk */
{"directory", required_argument, 0, 'd'},
{"cd", required_argument, 0, 11},
@@ -257,6 +256,7 @@ main (argc, argv)
}
break;
/* start-sanitize-gdbtk */
+#ifdef GDBTK
case 'z':
{
extern int gdbtk_test PARAMS ((char *));
@@ -268,6 +268,7 @@ main (argc, argv)
}
break;
}
+#endif /* GDBTK */
/* end-sanitize-gdbtk */
case 'd':
dirarg[ndir++] = optarg;
@@ -397,17 +398,17 @@ main (argc, argv)
*before* all the command line arguments are processed; it sets
global parameters, which are independent of what file you are
debugging or what directory you are in. */
-#ifdef __CYGWIN32__
+#ifdef __CYGWIN__
{
char * tmp = getenv ("HOME");
if (tmp != NULL)
{
homedir = (char *) alloca (MAX_PATH+1);
- cygwin32_conv_to_posix_path (tmp, homedir);
- } else {
- homedir = NULL;
+ cygwin_conv_to_posix_path (tmp, homedir);
}
+ else
+ homedir = NULL;
}
#else
homedir = getenv ("HOME");
@@ -464,12 +465,8 @@ main (argc, argv)
it, better only print one error message. */
if (!SET_TOP_LEVEL ())
{
- if (pre_add_symbol_hook)
- pre_add_symbol_hook (symarg);
exec_file_command (execarg, !batch);
symbol_file_command (symarg, 0);
- if (post_add_symbol_hook)
- post_add_symbol_hook ();
}
}
else