aboutsummaryrefslogtreecommitdiff
path: root/gdb/gdbarch.c
diff options
context:
space:
mode:
authorAndrew Cagney <cagney@redhat.com>2002-10-02 23:28:54 +0000
committerAndrew Cagney <cagney@redhat.com>2002-10-02 23:28:54 +0000
commitc4ed33b99b6fc4657b40c3168d2392470012661b (patch)
treed2bed4d750ef2002ac96e42786504ecf4e0f8731 /gdb/gdbarch.c
parentcef4f5dd72bc84b609f3cb472e20fbfdc79c65c6 (diff)
downloadfsf-binutils-gdb-c4ed33b99b6fc4657b40c3168d2392470012661b.zip
fsf-binutils-gdb-c4ed33b99b6fc4657b40c3168d2392470012661b.tar.gz
fsf-binutils-gdb-c4ed33b99b6fc4657b40c3168d2392470012661b.tar.bz2
2002-10-02 Andrew Cagney <ac131313@redhat.com>
* infrun.c (resume): Convert #ifdef CANNOT_STEP_BREAKPOINT into C. * gdbarch.sh (CANNOT_STEP_BREAKPOINT): Add. * gdbarch.h, gdbarch.c: Re-generate.
Diffstat (limited to 'gdb/gdbarch.c')
-rw-r--r--gdb/gdbarch.c28
1 files changed, 28 insertions, 0 deletions
diff --git a/gdb/gdbarch.c b/gdb/gdbarch.c
index bc27aae..c0c4f9f 100644
--- a/gdb/gdbarch.c
+++ b/gdb/gdbarch.c
@@ -269,6 +269,7 @@ struct gdbarch
gdbarch_elf_make_msymbol_special_ftype *elf_make_msymbol_special;
gdbarch_coff_make_msymbol_special_ftype *coff_make_msymbol_special;
const char * name_of_malloc;
+ int cannot_step_breakpoint;
};
@@ -427,6 +428,7 @@ struct gdbarch startup_gdbarch =
0,
0,
"malloc",
+ 0,
/* startup_gdbarch() */
};
@@ -804,6 +806,7 @@ verify_gdbarch (struct gdbarch *gdbarch)
/* Skip verify of elf_make_msymbol_special, invalid_p == 0 */
/* 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 */
buf = ui_file_xstrdup (log, &dummy);
make_cleanup (xfree, buf);
if (strlen (buf) > 0)
@@ -993,6 +996,14 @@ gdbarch_dump (struct gdbarch *gdbarch, struct ui_file *file)
(long) current_gdbarch->cannot_fetch_register
/*CANNOT_FETCH_REGISTER ()*/);
#endif
+#ifdef CANNOT_STEP_BREAKPOINT
+ fprintf_unfiltered (file,
+ "gdbarch_dump: CANNOT_STEP_BREAKPOINT # %s\n",
+ XSTRING (CANNOT_STEP_BREAKPOINT));
+ fprintf_unfiltered (file,
+ "gdbarch_dump: CANNOT_STEP_BREAKPOINT = %d\n",
+ CANNOT_STEP_BREAKPOINT);
+#endif
#ifdef CANNOT_STORE_REGISTER
fprintf_unfiltered (file,
"gdbarch_dump: %s # %s\n",
@@ -5024,6 +5035,23 @@ set_gdbarch_name_of_malloc (struct gdbarch *gdbarch,
gdbarch->name_of_malloc = name_of_malloc;
}
+int
+gdbarch_cannot_step_breakpoint (struct gdbarch *gdbarch)
+{
+ gdb_assert (gdbarch != NULL);
+ /* Skip verify of cannot_step_breakpoint, invalid_p == 0 */
+ if (gdbarch_debug >= 2)
+ fprintf_unfiltered (gdb_stdlog, "gdbarch_cannot_step_breakpoint called\n");
+ return gdbarch->cannot_step_breakpoint;
+}
+
+void
+set_gdbarch_cannot_step_breakpoint (struct gdbarch *gdbarch,
+ int cannot_step_breakpoint)
+{
+ gdbarch->cannot_step_breakpoint = cannot_step_breakpoint;
+}
+
/* Keep a registry of per-architecture data-pointers required by GDB
modules. */