summaryrefslogtreecommitdiff
path: root/gdb/gdbarch.c
diff options
context:
space:
mode:
authorMarko Mlinar <markom@opencores.org>2002-10-09 11:59:54 +0000
committerMarko Mlinar <markom@opencores.org>2002-10-09 11:59:54 +0000
commit114c59d0c6686a22dcb7d6690792aa6549fcdcf9 (patch)
treeaeaf5888a04e3c818a27bb22bc4126b7f3b54314 /gdb/gdbarch.c
parent42d58b32f215e2dc33c8c621a3e337b4afadd1cd (diff)
downloadgdb-114c59d0c6686a22dcb7d6690792aa6549fcdcf9.tar.gz
Convert #ifdef HAVE_NONSTEPPABLE_WATCHPOINT into C
Diffstat (limited to 'gdb/gdbarch.c')
-rw-r--r--gdb/gdbarch.c27
1 files changed, 27 insertions, 0 deletions
diff --git a/gdb/gdbarch.c b/gdb/gdbarch.c
index c0c4f9f0f0d..bca10438beb 100644
--- a/gdb/gdbarch.c
+++ b/gdb/gdbarch.c
@@ -270,6 +270,7 @@ struct gdbarch
gdbarch_coff_make_msymbol_special_ftype *coff_make_msymbol_special;
const char * name_of_malloc;
int cannot_step_breakpoint;
+ int have_nonsteppable_watchpoint;
};
@@ -807,6 +808,7 @@ verify_gdbarch (struct gdbarch *gdbarch)
/* Skip verify of coff_make_msymbol_special, invalid_p == 0 */
/* Skip verify of name_of_malloc, invalid_p == 0 */
/* Skip verify of cannot_step_breakpoint, invalid_p == 0 */
+ /* Skip verify of have_nonsteppable_watchpoint, invalid_p == 0 */
buf = ui_file_xstrdup (log, &dummy);
make_cleanup (xfree, buf);
if (strlen (buf) > 0)
@@ -1383,6 +1385,14 @@ gdbarch_dump (struct gdbarch *gdbarch, struct ui_file *file)
(long) current_gdbarch->get_saved_register
/*GET_SAVED_REGISTER ()*/);
#endif
+#ifdef HAVE_STEPPABLE_WATCHPOINT
+ fprintf_unfiltered (file,
+ "gdbarch_dump: HAVE_STEPPABLE_WATCHPOINT # %s\n",
+ XSTRING (HAVE_STEPPABLE_WATCHPOINT));
+ fprintf_unfiltered (file,
+ "gdbarch_dump: HAVE_STEPPABLE_WATCHPOINT = %d\n",
+ HAVE_STEPPABLE_WATCHPOINT);
+#endif
#ifdef INIT_EXTRA_FRAME_INFO
#if GDB_MULTI_ARCH
/* Macro might contain `[{}]' when not multi-arch */
@@ -5052,6 +5062,23 @@ set_gdbarch_cannot_step_breakpoint (struct gdbarch *gdbarch,
gdbarch->cannot_step_breakpoint = cannot_step_breakpoint;
}
+int
+gdbarch_have_nonsteppable_watchpoint (struct gdbarch *gdbarch)
+{
+ gdb_assert (gdbarch != NULL);
+ /* Skip verify of have_nonsteppable_watchpoint, invalid_p == 0 */
+ if (gdbarch_debug >= 2)
+ fprintf_unfiltered (gdb_stdlog, "gdbarch_have_nonsteppable_watchpoint called\n");
+ return gdbarch->have_nonsteppable_watchpoint;
+}
+
+void
+set_gdbarch_have_nonsteppable_watchpoint (struct gdbarch *gdbarch,
+ int have_nonsteppable_watchpoint)
+{
+ gdbarch->have_nonsteppable_watchpoint = have_nonsteppable_watchpoint;
+}
+
/* Keep a registry of per-architecture data-pointers required by GDB
modules. */