* gdbarch.sh: Add skip_permanent_breakpoint callback.

* gdbarch.h, gdbarch.c: Regenerate.

	* infrun.c (SKIP_PERMANENT_BREAKPOINT): Remove default definition.
	(resume): Call gdbarch_skip_permanent_breakpoint instead of
	SKIP_PERMANENT_BREAKPOINT.  Inline default case.

	* hppa-hpux-tdep.c (hppa_skip_permanent_breakpoint): Make static.
	Add REGCACHE argument.  Use it instead of read/write_register.
	(hppa_hpux_init_abi): Install hppa_skip_permanent_breakpoint.

	* config/pa/tm-hppah.h: Delete file.
	* config/pa/hppa64.mt (DEPRECATED_TM_FILE): Set to tm-hppa.h.
	* config/pa/hppahpux.mt (DEPRECATED_TM_FILE): Likewise.
This commit is contained in:
Ulrich Weigand
2007-05-07 18:20:21 +00:00
parent 3b95049e0a
commit 6d350bb576
9 changed files with 84 additions and 62 deletions

View File

@@ -237,6 +237,7 @@ struct gdbarch
gdbarch_regset_from_core_section_ftype *regset_from_core_section;
int vtable_function_descriptors;
int vbit_in_delta;
gdbarch_skip_permanent_breakpoint_ftype *skip_permanent_breakpoint;
};
@@ -364,6 +365,7 @@ struct gdbarch startup_gdbarch =
0, /* regset_from_core_section */
0, /* vtable_function_descriptors */
0, /* vbit_in_delta */
0, /* skip_permanent_breakpoint */
/* startup_gdbarch() */
};
@@ -618,6 +620,7 @@ verify_gdbarch (struct gdbarch *current_gdbarch)
/* Skip verify of regset_from_core_section, has predicate */
/* Skip verify of vtable_function_descriptors, invalid_p == 0 */
/* Skip verify of vbit_in_delta, invalid_p == 0 */
/* Skip verify of skip_permanent_breakpoint, has predicate */
buf = ui_file_xstrdup (log, &dummy);
make_cleanup (xfree, buf);
if (strlen (buf) > 0)
@@ -1458,6 +1461,12 @@ gdbarch_dump (struct gdbarch *current_gdbarch, struct ui_file *file)
fprintf_unfiltered (file,
"gdbarch_dump: single_step_through_delay = <0x%lx>\n",
(long) current_gdbarch->single_step_through_delay);
fprintf_unfiltered (file,
"gdbarch_dump: gdbarch_skip_permanent_breakpoint_p() = %d\n",
gdbarch_skip_permanent_breakpoint_p (current_gdbarch));
fprintf_unfiltered (file,
"gdbarch_dump: skip_permanent_breakpoint = <0x%lx>\n",
(long) current_gdbarch->skip_permanent_breakpoint);
#ifdef SKIP_PROLOGUE
fprintf_unfiltered (file,
"gdbarch_dump: %s # %s\n",
@@ -3641,6 +3650,30 @@ set_gdbarch_vbit_in_delta (struct gdbarch *gdbarch,
gdbarch->vbit_in_delta = vbit_in_delta;
}
int
gdbarch_skip_permanent_breakpoint_p (struct gdbarch *gdbarch)
{
gdb_assert (gdbarch != NULL);
return gdbarch->skip_permanent_breakpoint != NULL;
}
void
gdbarch_skip_permanent_breakpoint (struct gdbarch *gdbarch, struct regcache *regcache)
{
gdb_assert (gdbarch != NULL);
gdb_assert (gdbarch->skip_permanent_breakpoint != NULL);
if (gdbarch_debug >= 2)
fprintf_unfiltered (gdb_stdlog, "gdbarch_skip_permanent_breakpoint called\n");
gdbarch->skip_permanent_breakpoint (regcache);
}
void
set_gdbarch_skip_permanent_breakpoint (struct gdbarch *gdbarch,
gdbarch_skip_permanent_breakpoint_ftype skip_permanent_breakpoint)
{
gdbarch->skip_permanent_breakpoint = skip_permanent_breakpoint;
}
/* Keep a registry of per-architecture data-pointers required by GDB
modules. */