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;
};
0,
0,
"malloc",
+ 0,
/* startup_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)
(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",
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. */
#endif
#endif
+/* Default (value) for non- multi-arch platforms. */
+#if (!GDB_MULTI_ARCH) && !defined (CANNOT_STEP_BREAKPOINT)
+#define CANNOT_STEP_BREAKPOINT (0)
+#endif
+
+extern int gdbarch_cannot_step_breakpoint (struct gdbarch *gdbarch);
+extern void set_gdbarch_cannot_step_breakpoint (struct gdbarch *gdbarch, int cannot_step_breakpoint);
+#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (CANNOT_STEP_BREAKPOINT)
+#error "Non multi-arch definition of CANNOT_STEP_BREAKPOINT"
+#endif
+#if GDB_MULTI_ARCH
+#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (CANNOT_STEP_BREAKPOINT)
+#define CANNOT_STEP_BREAKPOINT (gdbarch_cannot_step_breakpoint (current_gdbarch))
+#endif
+#endif
+
extern struct gdbarch_tdep *gdbarch_tdep (struct gdbarch *gdbarch);
f:2:ELF_MAKE_MSYMBOL_SPECIAL:void:elf_make_msymbol_special:asymbol *sym, struct minimal_symbol *msym:sym, msym:::default_elf_make_msymbol_special::0
f:2:COFF_MAKE_MSYMBOL_SPECIAL:void:coff_make_msymbol_special:int val, struct minimal_symbol *msym:val, msym:::default_coff_make_msymbol_special::0
v::NAME_OF_MALLOC:const char *:name_of_malloc::::"malloc":"malloc"::0
+v::CANNOT_STEP_BREAKPOINT:int:cannot_step_breakpoint::::0:0::0
EOF
}
resume_ptid = inferior_ptid;
}
-#ifdef CANNOT_STEP_BREAKPOINT
- /* Most targets can step a breakpoint instruction, thus executing it
- normally. But if this one cannot, just continue and we will hit
- it anyway. */
- if (step && breakpoints_inserted && breakpoint_here_p (read_pc ()))
- step = 0;
-#endif
+ if (CANNOT_STEP_BREAKPOINT)
+ {
+ /* Most targets can step a breakpoint instruction, thus
+ executing it normally. But if this one cannot, just
+ continue and we will hit it anyway. */
+ if (step && breakpoints_inserted && breakpoint_here_p (read_pc ()))
+ step = 0;
+ }
target_resume (resume_ptid, step, sig);
}