* alpha-opc.c (alpha_opcodes): Fix thinko in ret pseudo
[deliverable/binutils-gdb.git] / gdb / symfile.c
index 7043b8023d41bb13cb7366f2cbf08db014c11e1a..ebdd62baff7c766c0b610e21ba7adcc6dd35a924 100644 (file)
@@ -1,6 +1,8 @@
 /* Generic symbol file reading for the GNU debugger, GDB.
-   Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
-   2000, 2001 Free Software Foundation, Inc.
+
+   Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998,
+   1999, 2000, 2001, 2002 Free Software Foundation, Inc.
+
    Contributed by Cygnus Support, using pieces from other GDB modules.
 
    This file is part of GDB.
@@ -1222,14 +1224,8 @@ load_section_callback (bfd *abfd, asection *asec, void *data)
 
          /* Is this really necessary?  I guess it gives the user something
             to look at during a long download.  */
-#ifdef UI_OUT
          ui_out_message (uiout, 0, "Loading section %s, size 0x%s lma 0x%s\n",
                          sect_name, paddr_nz (size), paddr_nz (lma));
-#else
-         fprintf_unfiltered (gdb_stdout,
-                             "Loading section %s, size 0x%s lma 0x%s\n",
-                             sect_name, paddr_nz (size), paddr_nz (lma));
-#endif
 
          bfd_get_section_contents (abfd, asec, buffer, 0, size);
 
@@ -1355,17 +1351,11 @@ generic_load (char *args, int from_tty)
   end_time = time (NULL);
 
   entry = bfd_get_start_address (loadfile_bfd);
-#ifdef UI_OUT
   ui_out_text (uiout, "Start address ");
   ui_out_field_fmt (uiout, "address", "0x%s", paddr_nz (entry));
   ui_out_text (uiout, ", load size ");
   ui_out_field_fmt (uiout, "load-size", "%lu", cbdata.data_count);
   ui_out_text (uiout, "\n");
-#else
-  fprintf_unfiltered (gdb_stdout,
-                     "Start address 0x%s, load size %lu\n",
-                     paddr_nz (entry), cbdata.data_count);
-#endif
   /* We were doing this in remote-mips.c, I suspect it is right
      for other targets too.  */
   write_pc (entry);
@@ -1402,7 +1392,6 @@ print_transfer_performance (struct ui_file *stream,
                            unsigned long write_count,
                            unsigned long time_count)
 {
-#ifdef UI_OUT
   ui_out_text (uiout, "Transfer rate: ");
   if (time_count > 0)
     {
@@ -1422,16 +1411,6 @@ print_transfer_performance (struct ui_file *stream,
       ui_out_text (uiout, " bytes/write");
     }
   ui_out_text (uiout, ".\n");
-#else
-  fprintf_unfiltered (stream, "Transfer rate: ");
-  if (time_count > 0)
-    fprintf_unfiltered (stream, "%lu bits/sec", (data_count * 8) / time_count);
-  else
-    fprintf_unfiltered (stream, "%lu bits in <1 sec", (data_count * 8));
-  if (write_count > 0)
-    fprintf_unfiltered (stream, ", %lu bytes/write", data_count / write_count);
-  fprintf_unfiltered (stream, ".\n");
-#endif
 }
 
 /* This function allows the addition of incrementally linked object files.
@@ -2530,7 +2509,7 @@ init_psymbol_list (struct objfile *objfile, int total_symbols)
 
 /* Overlay debugging state: */
 
-int overlay_debugging = 0;     /* 0 == off, 1 == manual, -1 == auto */
+enum overlay_debugging_state overlay_debugging = ovly_off;
 int overlay_cache_invalid = 0; /* True if need to refresh mapped state */
 
 /* Target vector for refreshing overlay mapped state */
@@ -2587,9 +2566,9 @@ overlay_is_mapped (struct obj_section *osect)
   switch (overlay_debugging)
     {
     default:
-    case 0:
+    case ovly_off:
       return 0;                        /* overlay debugging off */
-    case -1:                   /* overlay debugging automatic */
+    case ovly_auto:            /* overlay debugging automatic */
       /* Unles there is a target_overlay_update function, 
          there's really nothing useful to do here (can't really go auto)  */
       if (target_overlay_update)
@@ -2603,7 +2582,7 @@ overlay_is_mapped (struct obj_section *osect)
            (*target_overlay_update) (osect);
        }
       /* fall thru to manual case */
-    case 1:                    /* overlay debugging manual */
+    case ovly_on:              /* overlay debugging manual */
       return osect->ovly_mapped == 1;
     }
 }
@@ -2918,7 +2897,8 @@ the 'overlay manual' command.");
 static void
 overlay_auto_command (char *args, int from_tty)
 {
-  overlay_debugging = -1;
+  overlay_debugging = ovly_auto;
+  enable_overlay_breakpoints ();
   if (info_verbose)
     printf_filtered ("Automatic overlay debugging enabled.");
 }
@@ -2930,7 +2910,8 @@ overlay_auto_command (char *args, int from_tty)
 static void
 overlay_manual_command (char *args, int from_tty)
 {
-  overlay_debugging = 1;
+  overlay_debugging = ovly_on;
+  disable_overlay_breakpoints ();
   if (info_verbose)
     printf_filtered ("Overlay debugging enabled.");
 }
@@ -2942,7 +2923,8 @@ overlay_manual_command (char *args, int from_tty)
 static void
 overlay_off_command (char *args, int from_tty)
 {
-  overlay_debugging = 0;
+  overlay_debugging = ovly_off;
+  disable_overlay_breakpoints ();
   if (info_verbose)
     printf_filtered ("Overlay debugging disabled.");
 }
@@ -3295,7 +3277,7 @@ for access from GDB.", &cmdlist);
                   "Set mapping between filename extension and source language.\n\
 Usage: set extension-language .foo bar",
                   &setlist);
-  c->function.cfunc = set_ext_lang_command;
+  set_cmd_cfunc (c, set_ext_lang_command);
 
   add_info ("extensions", info_ext_lang_command,
            "All filename extensions associated with a source language.");
This page took 0.025644 seconds and 4 git commands to generate.