diff options
author | Pedro Alves <palves@redhat.com> | 2011-12-06 20:03:14 +0000 |
---|---|---|
committer | Pedro Alves <palves@redhat.com> | 2011-12-06 20:03:14 +0000 |
commit | f0ba3972e968a8f328d2d465bbd1218e228fbf2a (patch) | |
tree | daeb62e5fc8f74947ee31f0f14a3bcccd14f2006 /gdb/breakpoint.h | |
parent | 31aba06f31d348be54adb50195af858baff6256f (diff) | |
download | gdb-f0ba3972e968a8f328d2d465bbd1218e228fbf2a.zip gdb-f0ba3972e968a8f328d2d465bbd1218e228fbf2a.tar.gz gdb-f0ba3972e968a8f328d2d465bbd1218e228fbf2a.tar.bz2 |
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.
Diffstat (limited to 'gdb/breakpoint.h')
-rw-r--r-- | gdb/breakpoint.h | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/gdb/breakpoint.h b/gdb/breakpoint.h index ead3930..ddf1881 100644 --- a/gdb/breakpoint.h +++ b/gdb/breakpoint.h @@ -1296,10 +1296,17 @@ extern int deprecated_remove_raw_breakpoint (struct gdbarch *, void *); target. */ int watchpoints_triggered (struct target_waitstatus *); -/* Update BUF, which is LEN bytes read from the target address MEMADDR, - by replacing any memory breakpoints with their shadowed contents. */ -void breakpoint_restore_shadows (gdb_byte *buf, ULONGEST memaddr, - LONGEST len); +/* Helper for transparent breakpoint hiding for memory read and write + routines. + + Update one of READBUF or WRITEBUF with either the shadows + (READBUF), or the breakpoint instructions (WRITEBUF) of inserted + breakpoints at the memory range defined by MEMADDR and extending + for LEN bytes. If writing, then WRITEBUF is a copy of WRITEBUF_ORG + on entry.*/ +extern void breakpoint_xfer_memory (gdb_byte *readbuf, gdb_byte *writebuf, + const gdb_byte *writebuf_org, + ULONGEST memaddr, LONGEST len); extern int breakpoints_always_inserted_mode (void); |