/* 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.
/* 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);
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);
unsigned long write_count,
unsigned long time_count)
{
-#ifdef UI_OUT
ui_out_text (uiout, "Transfer rate: ");
if (time_count > 0)
{
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.
/* 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 */
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)
(*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;
}
}
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.");
}
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.");
}
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.");
}
"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.");