aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorDouglas B Rupp <rupp@gnat.com>2009-07-30 00:51:58 +0000
committerDouglas Rupp <rupp@gcc.gnu.org>2009-07-30 00:51:58 +0000
commit5ea8f97799dcf2fd4cbc7848f1d5665d507ef597 (patch)
tree018c111ad743e45050c3d9fbde4fcd975195fecf /gcc
parent9b2a5ef70cb61f8a91fb7268cc36172180e0d3cd (diff)
downloadgcc-5ea8f97799dcf2fd4cbc7848f1d5665d507ef597.zip
gcc-5ea8f97799dcf2fd4cbc7848f1d5665d507ef597.tar.gz
gcc-5ea8f97799dcf2fd4cbc7848f1d5665d507ef597.tar.bz2
alpha.c (alpha_start_function): Handle VMS_DEBUG_MAIN_POINTER
* config/alpha/alpha.c (alpha_start_function): Handle VMS_DEBUG_MAIN_POINTER * config/alpha/vms.h (VMS_DEBUG_MAIN_POINTER): Define new macro. * doc/invoke.texi: Document -mdebug-main switch. From-SVN: r150235
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog7
-rw-r--r--gcc/config/alpha/alpha.c11
-rw-r--r--gcc/config/alpha/vms.h5
-rw-r--r--gcc/doc/invoke.texi9
4 files changed, 29 insertions, 3 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index d61bf2d..0b69427 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,10 @@
+2009-07-29 Douglas B Rupp <rupp@gnat.com>
+
+ * config/alpha/alpha.c (alpha_start_function):
+ Handle VMS_DEBUG_MAIN_POINTER
+ * config/alpha/vms.h (VMS_DEBUG_MAIN_POINTER): Define new macro.
+ * doc/invoke.texi: Document -mdebug-main switch.
+
2009-07-29 Richard Henderson <rth@redhat.com>
* cgraph.c (cgraph_set_call_stmt_including_clones): Tidy.
diff --git a/gcc/config/alpha/alpha.c b/gcc/config/alpha/alpha.c
index 6a7076d..a9f5fba 100644
--- a/gcc/config/alpha/alpha.c
+++ b/gcc/config/alpha/alpha.c
@@ -7837,6 +7837,17 @@ alpha_start_function (FILE *file, const char *fnname,
TREE_ASM_WRITTEN (name_tree) = 1;
}
+#if TARGET_ABI_OPEN_VMS
+ if (vms_debug_main
+ && strncmp (vms_debug_main, fnname, strlen (vms_debug_main)) == 0)
+ {
+ targetm.asm_out.globalize_label (asm_out_file, VMS_DEBUG_MAIN_POINTER);
+ ASM_OUTPUT_DEF (asm_out_file, VMS_DEBUG_MAIN_POINTER, fnname);
+ switch_to_section (text_section);
+ vms_debug_main = NULL;
+ }
+#endif
+
alpha_fnname = fnname;
sa_size = alpha_sa_size ();
diff --git a/gcc/config/alpha/vms.h b/gcc/config/alpha/vms.h
index 4f043a5..d7a6389 100644
--- a/gcc/config/alpha/vms.h
+++ b/gcc/config/alpha/vms.h
@@ -1,5 +1,6 @@
/* Output variables, constants and external declarations, for GNU compiler.
- Copyright (C) 1996, 1997, 1998, 2000, 2001, 2002, 2004, 2005, 2007, 2008
+ Copyright (C) 1996, 1997, 1998, 2000, 2001, 2002, 2004, 2005, 2007, 2008,
+ 2009
Free Software Foundation, Inc.
This file is part of GCC.
@@ -50,6 +51,8 @@ along with GCC; see the file COPYING3. If not see
#undef TARGET_VERSION
#define TARGET_VERSION fprintf (stderr, " (%s)", TARGET_NAME);
+#define VMS_DEBUG_MAIN_POINTER "TRANSFER$BREAK$GO"
+
#undef PCC_STATIC_STRUCT_RETURN
/* "long" is 32 bits, but 64 bits for Ada. */
diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi
index cbef029..c256dde 100644
--- a/gcc/doc/invoke.texi
+++ b/gcc/doc/invoke.texi
@@ -534,7 +534,7 @@ Objective-C and Objective-C++ Dialects}.
-mmemory-latency=@var{time}}
@emph{DEC Alpha/VMS Options}
-@gccoptlist{-mvms-return-codes}
+@gccoptlist{-mvms-return-codes -mdebug-main=@var{prefix}}
@emph{FR30 Options}
@gccoptlist{-msmall-model -mno-lsim}
@@ -10582,8 +10582,13 @@ These @samp{-m} options are defined for the DEC Alpha/VMS implementations:
@table @gcctabopt
@item -mvms-return-codes
@opindex mvms-return-codes
-Return VMS condition codes from main. The default is to return POSIX
+Return VMS condition codes from main. The default is to return POSIX
style condition (e.g.@: error) codes.
+
+@item -mdebug-main=@var{prefix}
+@opindex mdebug-main=@var{prefix}
+Flag the first routine whose name starts with @var{prefix} as the main
+routine for the debugger.
@end table
@node FR30 Options