* gdb/s390-nat.c (s390_register_u_addr): Pass proper arguments to
[deliverable/binutils-gdb.git] / gas / as.c
index 425829e19106ba004ba46de41258b23269f1ab09..d5922b07d1aca0a6d9c39a08db4c0080d895ac59 100644 (file)
--- a/gas/as.c
+++ b/gas/as.c
@@ -1,5 +1,6 @@
 /* as.c - GAS main program.
-   Copyright (C) 1987, 1990, 91, 92, 93, 94, 95, 96, 97, 98, 99, 2000
+   Copyright 1987, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998,
+   1999, 2000, 2001
    Free Software Foundation, Inc.
 
    This file is part of GAS, the GNU Assembler.
@@ -40,6 +41,7 @@
 #include "output-file.h"
 #include "sb.h"
 #include "macro.h"
+#include "dwarf2dbg.h"
 
 #ifdef HAVE_ITBL_CPU
 #include "itbl-ops.h"
@@ -68,7 +70,7 @@ static char *listing_filename = NULL;
 
 /* Type of debugging to generate.  */
 
-enum debug_info_type debug_type = DEBUG_NONE;
+enum debug_info_type debug_type = DEBUG_UNSPECIFIED;
 
 /* Maximum level of macro nesting.  */
 int max_macro_nest = 100;
@@ -206,7 +208,7 @@ print_version_id ()
 
 #ifdef BFD_ASSEMBLER
   fprintf (stderr, _("GNU assembler version %s (%s) using BFD version %s"),
-          VERSION, TARGET_ALIAS, BFD_VERSION);
+          VERSION, TARGET_ALIAS, BFD_VERSION_STRING);
 #else
   fprintf (stderr, _("GNU assembler version %s (%s)"), VERSION, TARGET_ALIAS);
 #endif
@@ -230,7 +232,6 @@ Options:\n\
                          m      include macro expansions\n\
                          n      omit forms processing\n\
                          s      include symbols\n\
-                         L      include line debug statistics (if applicable)\n\
                          =FILE  list to FILE (must be last sub-option)\n"));
 
   fprintf (stream, _("\
@@ -264,6 +265,8 @@ Options:\n\
   fprintf (stream, _("\
   --help                  show this message and exit\n"));
   fprintf (stream, _("\
+  --target-help           show target specific options\n"));
+  fprintf (stream, _("\
   -I DIR                  add DIR to search list for .include directives\n"));
   fprintf (stream, _("\
   -J                      don't warn about signed overflow\n"));
@@ -398,7 +401,7 @@ parse_args (pargc, pargv)
 #define OPTION_LISTING_LHS_WIDTH (OPTION_STD_BASE + 9)
     {"listing-lhs-width", required_argument, NULL, OPTION_LISTING_LHS_WIDTH},
 #define OPTION_LISTING_LHS_WIDTH2 (OPTION_STD_BASE + 10)
-    {"listing-lhs-width", required_argument, NULL, OPTION_LISTING_LHS_WIDTH2},
+    {"listing-lhs-width2", required_argument, NULL, OPTION_LISTING_LHS_WIDTH2},
 #define OPTION_LISTING_RHS_WIDTH (OPTION_STD_BASE + 11)
     {"listing-rhs-width", required_argument, NULL, OPTION_LISTING_RHS_WIDTH},
 #define OPTION_LISTING_CONT_LINES (OPTION_STD_BASE + 12)
@@ -416,8 +419,12 @@ parse_args (pargc, pargv)
     {"no-warn", no_argument, NULL, 'W'},
 #define OPTION_WARN (OPTION_STD_BASE + 18)
     {"warn", no_argument, NULL, OPTION_WARN},
-#define OPTION_WARN_FATAL (OPTION_STD_BASE + 19)
+#define OPTION_TARGET_HELP (OPTION_STD_BASE + 19)
+    {"target-help", no_argument, NULL, OPTION_TARGET_HELP},
+#define OPTION_WARN_FATAL (OPTION_STD_BASE + 20)
     {"fatal-warnings", no_argument, NULL, OPTION_WARN_FATAL}
+    /* When you add options here, check that they do not collide with
+       OPTION_MD_BASE.  See as.h.  */
   };
 
   /* Construct the option lists from the standard list and the target
@@ -492,6 +499,10 @@ parse_args (pargc, pargv)
          new_argv[new_argc] = NULL;
          break;
 
+       case OPTION_TARGET_HELP:
+          md_show_usage (stdout);
+          exit (EXIT_SUCCESS);
+
        case OPTION_HELP:
          show_usage (stdout);
          exit (EXIT_SUCCESS);
@@ -513,8 +524,8 @@ parse_args (pargc, pargv)
 
        case OPTION_VERSION:
          /* This output is intended to follow the GNU standards document.  */
-         printf (_("GNU assembler %s\n"), VERSION);
-         printf (_("Copyright 2000 Free Software Foundation, Inc.\n"));
+         printf (_("GNU assembler %s\n"), BFD_VERSION_STRING);
+         printf (_("Copyright 2001 Free Software Foundation, Inc.\n"));
          printf (_("\
 This program is free software; you may redistribute it under the terms of\n\
 the GNU General Public License.  This program has absolutely no warranty.\n"));
@@ -576,7 +587,7 @@ the GNU General Public License.  This program has absolutely no warranty.\n"));
 
            if (optarg == NULL)
              {
-               as_warn (_("No file name following -t option\n"));
+               as_warn (_("no file name following -t option"));
                break;
              }
 
@@ -591,11 +602,8 @@ the GNU General Public License.  This program has absolutely no warranty.\n"));
               internal table.  */
            itbl_files->name = xstrdup (optarg);
            if (itbl_parse (itbl_files->name) != 0)
-             {
-               fprintf (stderr, _("Failed to read instruction table %s\n"),
-                        itbl_files->name);
-               exit (EXIT_SUCCESS);
-             }
+             as_fatal (_("failed to read instruction table %s\n"),
+                       itbl_files->name);
          }
          break;
 
@@ -758,6 +766,8 @@ the GNU General Public License.  This program has absolutely no warranty.\n"));
 
 static long start_time;
 
+int main PARAMS ((int, char **));
+
 int
 main (argc, argv)
      int argc;
@@ -771,6 +781,9 @@ main (argc, argv)
 
 #if defined (HAVE_SETLOCALE) && defined (HAVE_LC_MESSAGES)
   setlocale (LC_MESSAGES, "");
+#endif
+#if defined (HAVE_SETLOCALE)
+  setlocale (LC_CTYPE, "");
 #endif
   bindtextdomain (PACKAGE, LOCALEDIR);
   textdomain (PACKAGE);
@@ -875,6 +888,10 @@ main (argc, argv)
   md_end ();
 #endif
 
+  /* If we've been collecting dwarf2 .debug_line info, either for
+     assembly debugging or on behalf of the compiler, emit it now.  */
+  dwarf2_finish ();
+
   if (seen_at_least_1_file ()
       && (flag_always_generate_output || had_errors () == 0))
     keep_it = 1;
This page took 0.024894 seconds and 4 git commands to generate.