* gdbarch.sh (memory_insert_breakpoint, memory_remove_breakpoint): Add

gdbarch as parameter.

	* gdbarch.{c,h}: Regenerate.

	* ppc-tdep.h (ppc_linux_memory_remove_breakpoint): Add gdbarch as
	parameter.
	* mem-break.c (default_memory_insert_breakpoint)
	(default_memory_remove_breakpoint): Likewise.
	* target.h (default_memory_remove_breakpoint)
	(default_memory_insert_breakpoint): Likewise.

	* ppc-linux-tdep.c (ppc_linux_memory_remove_breakpoint): Add gdbarch as
	parameter. Replace current_gdbarch by gdbarch.
	* m32r-tdep.c (m32r_memory_insert_breakpoint)
	(m32r_memory_remove_breakpoint): Likewise.
This commit is contained in:
Markus Deuling
2008-02-20 14:31:40 +00:00
parent 7f6ef0c0b8
commit ae4b228419
10 changed files with 48 additions and 22 deletions

View File

@@ -79,7 +79,8 @@ m32r_frame_align (struct gdbarch *gdbarch, CORE_ADDR sp)
The following functions take care of this behavior. */
static int
m32r_memory_insert_breakpoint (struct bp_target_info *bp_tgt)
m32r_memory_insert_breakpoint (struct gdbarch *gdbarch,
struct bp_target_info *bp_tgt)
{
CORE_ADDR addr = bp_tgt->placed_address;
int val;
@@ -95,7 +96,7 @@ m32r_memory_insert_breakpoint (struct bp_target_info *bp_tgt)
bp_tgt->placed_size = bp_tgt->shadow_len = 4;
/* Determine appropriate breakpoint contents and size for this address. */
if (gdbarch_byte_order (current_gdbarch) == BFD_ENDIAN_BIG)
if (gdbarch_byte_order (gdbarch) == BFD_ENDIAN_BIG)
{
if ((addr & 3) == 0)
{
@@ -136,7 +137,8 @@ m32r_memory_insert_breakpoint (struct bp_target_info *bp_tgt)
}
static int
m32r_memory_remove_breakpoint (struct bp_target_info *bp_tgt)
m32r_memory_remove_breakpoint (struct gdbarch *gdbarch,
struct bp_target_info *bp_tgt)
{
CORE_ADDR addr = bp_tgt->placed_address;
int val;
@@ -149,7 +151,7 @@ m32r_memory_remove_breakpoint (struct bp_target_info *bp_tgt)
buf[3] = contents_cache[3];
/* Remove parallel bit. */
if (gdbarch_byte_order (current_gdbarch) == BFD_ENDIAN_BIG)
if (gdbarch_byte_order (gdbarch) == BFD_ENDIAN_BIG)
{
if ((buf[0] & 0x80) == 0 && (buf[2] & 0x80) != 0)
buf[2] &= 0x7f;