2011-12-06 Pedro Alves <pedro@codesourcery.com>

gdb/
	* breakpoint.c (breakpoint_restore_shadows): Rename to ...
	(breakpoint_xfer_memory): ... this.  Change prototype.  Handle
	memory writes too.
	* breakpoint.h (breakpoint_restore_shadows): Delete.
	(breakpoint_xfer_memory): Declare.
	* mem-break.c (default_memory_insert_breakpoint)
	(default_memory_remove_breakpoint): Use target_write_raw_memory.
	(memory_xfer_partial): Rename to ...
	(memory_xfer_partial_1): ... this.  Don't mask out breakpoints
	here.
	(memory_xfer_partial): New.
	(target_write_raw_memory): New.
	* target.h (target_write_raw_memory): New.

	gdb/testsuite/
	* gdb.base/break-always.exp: Test changing memory at addresses
	with breakpoints inserted.
This commit is contained in:
Pedro Alves
2011-12-06 20:03:14 +00:00
parent 31aba06f31
commit f0ba3972e9
8 changed files with 171 additions and 29 deletions

View File

@@ -60,8 +60,8 @@ default_memory_insert_breakpoint (struct gdbarch *gdbarch,
/* Write the breakpoint. */
if (val == 0)
val = target_write_memory (bp_tgt->placed_address, bp,
bp_tgt->placed_size);
val = target_write_raw_memory (bp_tgt->placed_address, bp,
bp_tgt->placed_size);
return val;
}
@@ -71,8 +71,8 @@ int
default_memory_remove_breakpoint (struct gdbarch *gdbarch,
struct bp_target_info *bp_tgt)
{
return target_write_memory (bp_tgt->placed_address, bp_tgt->shadow_contents,
bp_tgt->placed_size);
return target_write_raw_memory (bp_tgt->placed_address, bp_tgt->shadow_contents,
bp_tgt->placed_size);
}