From 30657ee33dd334a375a7aaf5f76f45ffddd0c189 Mon Sep 17 00:00:00 2001 From: Richard Kenner Date: Tue, 24 Sep 1996 07:28:50 -0400 Subject: [PATCH] (PREFERRED_DEBUGGING_TYPE): If no debugging formats are supported, set to NO_DEBUG. (PREFERRED_DEBUGGING_TYPE): If no debugging formats are supported, set to NO_DEBUG. (main): Don't do setting of PREFERRED_DEBUGGING_TYPE here. From-SVN: r12829 --- gcc/toplev.c | 54 +++++++++++++++++++++++++++++----------------------- 1 file changed, 30 insertions(+), 24 deletions(-) diff --git a/gcc/toplev.c b/gcc/toplev.c index bd4b3bdf863..3373f7625b6 100644 --- a/gcc/toplev.c +++ b/gcc/toplev.c @@ -93,6 +93,36 @@ vms_fopen (fname, type) #define DEFAULT_GDB_EXTENSIONS 1 #endif +/* If more than one debugging type is supported, you must define + PREFERRED_DEBUGGING_TYPE to choose a format in a system-dependent way. + + This is one long line cause VAXC can't handle a \-newline. */ +#if 1 < (defined (DBX_DEBUGGING_INFO) + defined (SDB_DEBUGGING_INFO) + defined (DWARF_DEBUGGING_INFO) + defined (XCOFF_DEBUGGING_INFO)) +#ifndef PREFERRED_DEBUGGING_TYPE +You Lose! You must define PREFERRED_DEBUGGING_TYPE! +#endif /* no PREFERRED_DEBUGGING_TYPE */ +#else /* Only one debugging format supported. Define PREFERRED_DEBUGGING_TYPE + so the following code needn't care. */ +#ifdef DBX_DEBUGGING_INFO +#define PREFERRED_DEBUGGING_TYPE DBX_DEBUG +#endif +#ifdef SDB_DEBUGGING_INFO +#define PREFERRED_DEBUGGING_TYPE SDB_DEBUG +#endif +#ifdef DWARF_DEBUGGING_INFO +#define PREFERRED_DEBUGGING_TYPE DWARF_DEBUG +#endif +#ifdef XCOFF_DEBUGGING_INFO +#define PREFERRED_DEBUGGING_TYPE XCOFF_DEBUG +#endif +#endif /* More than one debugger format enabled. */ + +/* If still not defined, must have been because no debugging formats + are supported. */ +#ifndef PREFERRED_DEBUGGING_TYPE +#define PREFERRED_DEBUGGING_TYPE NO_DEBUG +#endif + extern int rtx_equal_function_value_matters; #if ! (defined (VMS) || defined (OS2)) @@ -3781,30 +3811,6 @@ main (argc, argv, envp) } else if (str[0] == 'g') { - /* If more than one debugging type is supported, - you must define PREFERRED_DEBUGGING_TYPE - to choose a format in a system-dependent way. */ - /* This is one long line cause VAXC can't handle a \-newline. */ -#if 1 < (defined (DBX_DEBUGGING_INFO) + defined (SDB_DEBUGGING_INFO) + defined (DWARF_DEBUGGING_INFO) + defined (XCOFF_DEBUGGING_INFO)) -#ifndef PREFERRED_DEBUGGING_TYPE -You Lose! You must define PREFERRED_DEBUGGING_TYPE! -#endif /* no PREFERRED_DEBUGGING_TYPE */ -#else /* Only one debugging format supported. Define PREFERRED_DEBUGGING_TYPE - so the following code needn't care. */ -#ifdef DBX_DEBUGGING_INFO -#define PREFERRED_DEBUGGING_TYPE DBX_DEBUG -#endif -#ifdef SDB_DEBUGGING_INFO -#define PREFERRED_DEBUGGING_TYPE SDB_DEBUG -#endif -#ifdef DWARF_DEBUGGING_INFO -#define PREFERRED_DEBUGGING_TYPE DWARF_DEBUG -#endif -#ifdef XCOFF_DEBUGGING_INFO -#define PREFERRED_DEBUGGING_TYPE XCOFF_DEBUG -#endif -#endif /* More than one debugger format enabled. */ - char *p = str + 1; char *q; unsigned len; -- 2.30.2