This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[PATCH 05/12] always define VMS_DEBUGGING_INFO
- From: tbsaunde+gcc at tbsaunde dot org
- To: gcc-patches at gcc dot gnu dot org
- Date: Mon, 9 Nov 2015 11:47:42 -0500
- Subject: [PATCH 05/12] always define VMS_DEBUGGING_INFO
- Authentication-results: sourceware.org; auth=none
- References: <1447087669-14039-1-git-send-email-tbsaunde+gcc at tbsaunde dot org>
From: Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
gcc/ChangeLog:
2015-11-09 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
* defaults.h (VMS_DEBUGGING_INFO): New default definition.
* doc/tm.texi: Regenerate.
* doc/tm.texi.in: Adjust.
* dwarf2out.c (output_file_names): Likewise.
(add_name_and_src_coords_attributes): Likewise.
* dwarf2out.h: Likewise.
* toplev.c (process_options): Likewise.
* vmsdbgout.c: Likewise.
---
gcc/defaults.h | 8 ++++++--
gcc/doc/tm.texi | 2 +-
gcc/doc/tm.texi.in | 2 +-
gcc/dwarf2out.c | 8 ++++----
gcc/dwarf2out.h | 2 --
gcc/toplev.c | 6 +++---
gcc/vmsdbgout.c | 2 +-
7 files changed, 16 insertions(+), 14 deletions(-)
diff --git a/gcc/defaults.h b/gcc/defaults.h
index b518863..0de7899 100644
--- a/gcc/defaults.h
+++ b/gcc/defaults.h
@@ -922,12 +922,16 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
#define XCOFF_DEBUGGING_INFO 0
#endif
+#ifndef VMS_DEBUGGING_INFO
+#define VMS_DEBUGGING_INFO 0
+#endif
+
/* If more than one debugging type is supported, you must define
PREFERRED_DEBUGGING_TYPE to choose the default. */
#if 1 < (defined (DBX_DEBUGGING_INFO) + (SDB_DEBUGGING_INFO) \
+ defined (DWARF2_DEBUGGING_INFO) + (XCOFF_DEBUGGING_INFO) \
- + defined (VMS_DEBUGGING_INFO))
+ + (VMS_DEBUGGING_INFO))
#ifndef PREFERRED_DEBUGGING_TYPE
#error You must define PREFERRED_DEBUGGING_TYPE
#endif /* no PREFERRED_DEBUGGING_TYPE */
@@ -943,7 +947,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
#elif defined DWARF2_DEBUGGING_INFO || defined DWARF2_LINENO_DEBUGGING_INFO
#define PREFERRED_DEBUGGING_TYPE DWARF2_DEBUG
-#elif defined VMS_DEBUGGING_INFO
+#elif VMS_DEBUGGING_INFO
#define PREFERRED_DEBUGGING_TYPE VMS_AND_DWARF2_DEBUG
#elif XCOFF_DEBUGGING_INFO
diff --git a/gcc/doc/tm.texi b/gcc/doc/tm.texi
index 0399248..b3b684a 100644
--- a/gcc/doc/tm.texi
+++ b/gcc/doc/tm.texi
@@ -9720,7 +9720,7 @@ number @var{line} of the current source file to the stdio stream
Here are macros for VMS debug format.
@defmac VMS_DEBUGGING_INFO
-Define this macro if GCC should produce debugging output for VMS
+Define this macro to 1 if GCC should produce debugging output for VMS
in response to the @option{-g} option. The default behavior for VMS
is to generate minimal debug info for a traceback in the absence of
@option{-g} unless explicitly overridden with @option{-g0}. This
diff --git a/gcc/doc/tm.texi.in b/gcc/doc/tm.texi.in
index 84e8383..0f0a4f2 100644
--- a/gcc/doc/tm.texi.in
+++ b/gcc/doc/tm.texi.in
@@ -7113,7 +7113,7 @@ number @var{line} of the current source file to the stdio stream
Here are macros for VMS debug format.
@defmac VMS_DEBUGGING_INFO
-Define this macro if GCC should produce debugging output for VMS
+Define this macro to 1 if GCC should produce debugging output for VMS
in response to the @option{-g} option. The default behavior for VMS
is to generate minimal debug info for a traceback in the absence of
@option{-g} unless explicitly overridden with @option{-g0}. This
diff --git a/gcc/dwarf2out.c b/gcc/dwarf2out.c
index 072e485..88c931c 100644
--- a/gcc/dwarf2out.c
+++ b/gcc/dwarf2out.c
@@ -101,7 +101,7 @@ static void dwarf2out_decl (tree);
#define HAVE_XCOFF_DWARF_EXTRAS 0
#endif
-#ifdef VMS_DEBUGGING_INFO
+#if VMS_DEBUGGING_INFO
int vms_file_stats_name (const char *, long long *, long *, char *, int *);
/* Define this macro to be a nonzero value if the directory specifications
@@ -10229,7 +10229,7 @@ output_file_names (void)
int file_idx = backmap[i];
int dir_idx = dirs[files[file_idx].dir_idx].dir_idx;
-#ifdef VMS_DEBUGGING_INFO
+#if VMS_DEBUGGING_INFO
#define MAX_VMS_VERSION_LEN 6 /* ";32768" */
/* Setting these fields can lead to debugger miscomparisons,
@@ -17319,7 +17319,7 @@ add_name_and_src_coords_attributes (dw_die_ref die, tree decl)
add_linkage_name (die, decl);
}
-#ifdef VMS_DEBUGGING_INFO
+#if VMS_DEBUGGING_INFO
/* Get the function's name, as described by its RTL. This may be different
from the DECL_NAME name used in the source file. */
if (TREE_CODE (decl) == FUNCTION_DECL && TREE_ASM_WRITTEN (decl))
@@ -17331,7 +17331,7 @@ add_name_and_src_coords_attributes (dw_die_ref die, tree decl)
#endif /* VMS_DEBUGGING_INFO */
}
-#ifdef VMS_DEBUGGING_INFO
+#if VMS_DEBUGGING_INFO
/* Output the debug main pointer die for VMS */
void
diff --git a/gcc/dwarf2out.h b/gcc/dwarf2out.h
index 4fe3527..d344508 100644
--- a/gcc/dwarf2out.h
+++ b/gcc/dwarf2out.h
@@ -257,9 +257,7 @@ extern void debug_dwarf_loc_descr (dw_loc_descr_ref);
extern void debug (die_struct &ref);
extern void debug (die_struct *ptr);
extern void dwarf2out_set_demangle_name_func (const char *(*) (const char *));
-#ifdef VMS_DEBUGGING_INFO
extern void dwarf2out_vms_debug_main_pointer (void);
-#endif
enum array_descr_ordering
{
diff --git a/gcc/toplev.c b/gcc/toplev.c
index 420ae3d..15b8e54 100644
--- a/gcc/toplev.c
+++ b/gcc/toplev.c
@@ -1380,10 +1380,10 @@ process_options (void)
else if (write_symbols == DWARF2_DEBUG)
debug_hooks = &dwarf2_debug_hooks;
#endif
-#ifdef VMS_DEBUGGING_INFO
- else if (write_symbols == VMS_DEBUG || write_symbols == VMS_AND_DWARF2_DEBUG)
+ else if (VMS_DEBUGGING_INFO
+ && (write_symbols == VMS_DEBUG
+ || write_symbols == VMS_AND_DWARF2_DEBUG))
debug_hooks = &vmsdbg_debug_hooks;
-#endif
#ifdef DWARF2_LINENO_DEBUGGING_INFO
else if (write_symbols == DWARF2_DEBUG)
debug_hooks = &dwarf2_lineno_debug_hooks;
diff --git a/gcc/vmsdbgout.c b/gcc/vmsdbgout.c
index d41d4b2..6dd6878 100644
--- a/gcc/vmsdbgout.c
+++ b/gcc/vmsdbgout.c
@@ -24,7 +24,7 @@ along with GCC; see the file COPYING3. If not see
#include "coretypes.h"
#include "tm.h"
-#ifdef VMS_DEBUGGING_INFO
+#if VMS_DEBUGGING_INFO
#include "alias.h"
#include "tree.h"
#include "varasm.h"
--
2.5.0.rc1.5.gc07173f