Fix -Wuh and -Wnhu options so that they work.
[deliverable/binutils-gdb.git] / gdb / symfile.c
index ca864dd9c4aac0e32bf66237d566a5404c2f17d6..914315054897796b201910c5d42f7d6b6a335a54 100644 (file)
@@ -53,7 +53,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
 #endif
 
 #ifdef HPUXHPPA
-extern int hpread_pxdb_check PARAMS ((bfd *, char *));
 
 /* Some HP-UX related globals to clear when a new "main"
    symbol file is loaded. HP-specific.  */
@@ -143,6 +142,14 @@ static int simple_read_overlay_table PARAMS ((void));
 
 static int simple_overlay_update_1 PARAMS ((struct obj_section *));
 
+static void add_filename_language PARAMS ((char *ext, enum language lang));
+
+static void set_ext_lang_command PARAMS ((char *args, int from_tty));
+
+static void info_ext_lang_command PARAMS ((char *args, int from_tty));
+
+static void init_filename_language_table PARAMS ((void));
+
 void _initialize_symfile PARAMS ((void));
 
 /* List of all available sym_fns.  On gdb startup, each object file reader
@@ -699,52 +706,6 @@ symbol_file_add (name, from_tty, addr, mainline, mapped, readnow, user_loaded, i
 
   abfd = symfile_bfd_open (name);
 
-#if 0
-#ifdef GDB_TARGET_IS_HPPA 
-{
-  /********* TARGET SPECIFIC CODE (HACK!) **********
-   *
-   * The following code is HP-specific.  The "right" way of
-   * doing this is unknown, but we bet would involve a target-
-   * specific pre-file-load check using a generic mechanism.
-   */
- /* elz: I moved this code from inside the symfile_bfd_open function
-    this way we don't have to worry about recursion. 
-    I also have taken out the call to pxdb from within the check
-    for pxdb processing. Seemed two logically unrelated things, 
-    and I needed a pure checking later on anyway. 
- */
-
-      if( hpread_pxdb_needed( abfd )) 
-      {
-          /*
-           * This file has not been pre-processed. 
-           * Preprocess now 
-           */
-
-         if (hpread_call_pxdb(name))
-         {
-          /* The
-           * call above has used "system" to pre-process
-           * the on-disk file, so we now need to close
-           * and re-open the file.
-           */
-          bfd_close (abfd);    /* This also closes 'desc', */
-                                /* hence the recursion.     */
-          abfd = symfile_bfd_open( name );
-         }
-        else /* we fail miserably without pxdb!!!*/
-             /* the warning to the user has already been given
-                from within the call_pxdb function 
-             */
-         error("Command ignored.\n");
-      }
-}
- /*************** END HACK ********************/
-#endif
-#endif /* 0 */
-
-
   if ((have_full_symbols () || have_partial_symbols ())
       && mainline
       && from_tty
@@ -886,7 +847,7 @@ symbol_file_command (args, from_tty)
        {
          nomem (0);
        }
-      cleanups = make_cleanup ((make_cleanup_func) freeargv, (char *) argv);
+      cleanups = make_cleanup_freeargv (argv);
       while (*argv != NULL)
        {
          if (STREQ (*argv, "-mapped"))
@@ -1037,43 +998,6 @@ symfile_bfd_open (name)
       error ("\"%s\": can't read symbols: %s.", name,
             bfd_errmsg (bfd_get_error ()));
     }
-
-#ifdef HPUXHPPA
-  {
-  /********* TARGET SPECIFIC CODE (HACK!) **********
-   *
-   * The following code is HP-specific.  The "right" way of
-   * doing this is unknown, but we bet would involve a target-
-   * specific pre-file-load check using a generic mechanism.
-   */
-  static prevent_recursion = 0;  /* Needed for hack below!  HP-specific */
-  
-  if( prevent_recursion == 0 ) {
-      if( hpread_pxdb_needed (sym_bfd, name)) {
-          /*
-           * This file has not been pre-processed. 
-           * Preprocess now 
-           */
-
-         if (hpread_call_pxdb(name))
-         {
-          /* The
-           * call above has used "system" to pre-process
-           * the on-disk file, so we now need to close
-           * and re-open the file.
-           */
-          bfd_close (sym_bfd); /* This also closes 'desc', */
-                                /* hence the recursion.     */
-          prevent_recursion++;
-          sym_bfd = symfile_bfd_open( name );
-          prevent_recursion--;
-         }
-      }
-  }
-}
- /*************** END HACK ********************/
-#endif
-
   return (sym_bfd);
 }
 
@@ -1725,10 +1649,8 @@ init_filename_language_table ()
       add_filename_language (".cpp",   language_cplus);
       add_filename_language (".cxx",   language_cplus);
       add_filename_language (".c++",   language_cplus);
-  /* start-sanitize-java */
       add_filename_language (".java",  language_java);
       add_filename_language (".class", language_java);
-  /* end-sanitize-java */
       add_filename_language (".ch",    language_chill);
       add_filename_language (".c186",  language_chill);
       add_filename_language (".c286",  language_chill);
@@ -2620,13 +2542,13 @@ list_overlays_command (args, from_tty)
          name = bfd_section_name (objfile->obfd, osect->the_bfd_section);
 
          printf_filtered ("Section %s, loaded at ", name);
-         print_address_numeric (lma, 1, stdout);
+         print_address_numeric (lma, 1, gdb_stdout);
          puts_filtered (" - ");
-         print_address_numeric (lma + size, 1, stdout);
+         print_address_numeric (lma + size, 1, gdb_stdout);
          printf_filtered (", mapped at ");
-         print_address_numeric (vma, 1, stdout);
+         print_address_numeric (vma, 1, gdb_stdout);
          puts_filtered (" - ");
-         print_address_numeric (vma + size, 1, stdout);
+         print_address_numeric (vma + size, 1, gdb_stdout);
          puts_filtered ("\n");
 
          nmapped ++;
This page took 0.024557 seconds and 4 git commands to generate.