diff options
author | Michael Snyder <msnyder@vmware.com> | 2002-02-01 01:14:20 +0000 |
---|---|---|
committer | Michael Snyder <msnyder@vmware.com> | 2002-02-01 01:14:20 +0000 |
commit | d874f1e22527c1b95211222c110a137b0f50ec00 (patch) | |
tree | af6a92d511c250c81dcdc436d91cb4d6891b38ae | |
parent | 9f04af04ceb45a04093896f8f2ecbc531a5c132f (diff) | |
download | gdb-d874f1e22527c1b95211222c110a137b0f50ec00.zip gdb-d874f1e22527c1b95211222c110a137b0f50ec00.tar.gz gdb-d874f1e22527c1b95211222c110a137b0f50ec00.tar.bz2 |
2002-01-31 Michael Snyder <msnyder@redhat.com>
* symfile.h (enum overlay_debugging_state):
Define enum constant values for overlay mode.
* symfile.c (overlay_debugging): Use enums instead of literals.
(overlay_is_mapped, overlay_auto_command,
overlay_manual_command): Ditto.
-rw-r--r-- | gdb/ChangeLog | 6 | ||||
-rw-r--r-- | gdb/symfile.c | 14 | ||||
-rw-r--r-- | gdb/symfile.h | 6 |
3 files changed, 18 insertions, 8 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 9464960..b2299fe 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,5 +1,11 @@ 2002-01-31 Michael Snyder <msnyder@redhat.com> + * symfile.h (enum overlay_debugging_state): + Define enum constant values for overlay mode. + * symfile.c (overlay_debugging): Use enums instead of literals. + (overlay_is_mapped, overlay_auto_command, + overlay_manual_command): Ditto. + * breakpoint.c (insert_breakpoints, remove_breakpoint, breakpoint_here_p, breakpoint_inserted_here_p, breakpoint_thread_match, bpstat_stop_status, diff --git a/gdb/symfile.c b/gdb/symfile.c index e66db98..e77c9c2 100644 --- a/gdb/symfile.c +++ b/gdb/symfile.c @@ -2509,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 */ @@ -2566,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) @@ -2582,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; } } @@ -2897,7 +2897,7 @@ the 'overlay manual' command."); static void overlay_auto_command (char *args, int from_tty) { - overlay_debugging = -1; + overlay_debugging = ovly_auto; if (info_verbose) printf_filtered ("Automatic overlay debugging enabled."); } @@ -2909,7 +2909,7 @@ 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; if (info_verbose) printf_filtered ("Overlay debugging enabled."); } @@ -2921,7 +2921,7 @@ 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; if (info_verbose) printf_filtered ("Overlay debugging disabled."); } diff --git a/gdb/symfile.h b/gdb/symfile.h index 8af5aea..9ab8068 100644 --- a/gdb/symfile.h +++ b/gdb/symfile.h @@ -253,7 +253,11 @@ extern void find_lowest_section (bfd *, asection *, PTR); extern bfd *symfile_bfd_open (char *); /* Utility functions for overlay sections: */ -extern int overlay_debugging; +extern enum overlay_debugging_state { + ovly_off, + ovly_on, + ovly_auto +} overlay_debugging; extern int overlay_cache_invalid; /* return the "mapped" overlay section containing the PC */ |