diff options
author | Pedro Alves <palves@redhat.com> | 2010-04-01 14:25:34 +0000 |
---|---|---|
committer | Pedro Alves <palves@redhat.com> | 2010-04-01 14:25:34 +0000 |
commit | 8b07ae33f0743a5dbad03cb4a76987f6db7fc38c (patch) | |
tree | c4fd50f0088748c74d0af003b576db1ea1f8fe3b /gdb/gdbserver/mem-break.h | |
parent | 86b17b608f08cee1e23221f28d79f9dc47352976 (diff) | |
download | gdb-8b07ae33f0743a5dbad03cb4a76987f6db7fc38c.zip gdb-8b07ae33f0743a5dbad03cb4a76987f6db7fc38c.tar.gz gdb-8b07ae33f0743a5dbad03cb4a76987f6db7fc38c.tar.bz2 |
* linux-low.c (linux_wait_1): Avoid setting need_step_over is
there's a GDB breakpoint at stop_pc. Always report a trap to GDB
if we could tell there's a GDB breakpoint at stop_pc.
(need_step_over_p): Don't do a step over if we find a GDB
breakpoint at the resume PC.
* mem-break.c (struct raw_breakpoint): New.
(enum bkpt_type): New type `gdb_breakpoint'.
(struct breakpoint): Delete the `PC', `old_data' and `inserted'
fields. New field `raw'.
(find_raw_breakpoint_at): New.
(set_raw_breakpoint_at): Handle refcounting. Create a raw
breakpoint instead.
(set_breakpoint_at): Adjust.
(delete_raw_breakpoint): New.
(release_breakpoint): New.
(delete_breakpoint): Rename to...
(delete_breakpoint_1): ... this. Add proc parameter. Use
release_breakpoint. Return ENOENT.
(delete_breakpoint): Reimplement.
(find_breakpoint_at): Delete.
(find_gdb_breakpoint_at): New.
(delete_breakpoint_at): Delete.
(set_gdb_breakpoint_at): New.
(delete_gdb_breakpoint_at): New.
(gdb_breakpoint_here): New.
(set_reinsert_breakpoint): Use release_breakpoint.
(uninsert_breakpoint): Rename to ...
(uninsert_raw_breakpoint): ... this.
(uninsert_breakpoints_at): Adjust to handle raw breakpoints.
(reinsert_raw_breakpoint): Change parameter type to
raw_breakpoint.
(reinsert_breakpoints_at): Adjust to handle raw breakpoints
instead.
(check_breakpoints): Adjust. Use release_breakpoint.
(breakpoint_here): Rewrite using find_raw_breakpoint_at.
(breakpoint_inserted_here): Ditto.
(check_mem_read): Adjust to iterate over raw breakpoints instead.
Don't trust the breakpoint's shadow if it is not inserted.
(check_mem_write): Adjust to iterate over raw breakpoints instead.
(delete_all_breakpoints): Adjust.
(free_all_breakpoints): Mark all breakpoints as uninserted, and
use delete_breakpoint_1.
* mem-break.h (breakpoints_supported): Delete declaration.
(set_gdb_breakpoint_at): Declare.
(gdb_breakpoint_here): Declare.
(delete_breakpoint_at): Delete.
(delete_gdb_breakpoint_at): Declare.
* server.h (struct raw_breakpoint): Forward declare.
(struct process_info): New field `raw_breakpoints'.
* linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
breakpoints.
Diffstat (limited to 'gdb/gdbserver/mem-break.h')
-rw-r--r-- | gdb/gdbserver/mem-break.h | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/gdb/gdbserver/mem-break.h b/gdb/gdbserver/mem-break.h index 2953d03..01087fd 100644 --- a/gdb/gdbserver/mem-break.h +++ b/gdb/gdbserver/mem-break.h @@ -25,9 +25,10 @@ /* Breakpoints are opaque. */ struct breakpoint; -/* Returns TRUE if breakpoints are supported on this target. */ +/* Create a new GDB breakpoint at WHERE. Returns -1 if breakpoints + are not supported on this target, 0 otherwise. */ -int breakpoints_supported (void); +int set_gdb_breakpoint_at (CORE_ADDR where); /* Returns TRUE if there's any breakpoint at ADDR in our tables, inserted, or not. */ @@ -38,6 +39,10 @@ int breakpoint_here (CORE_ADDR addr); int breakpoint_inserted_here (CORE_ADDR addr); +/* Returns TRUE if there's a GDB breakpoint set at ADDR. */ + +int gdb_breakpoint_here (CORE_ADDR where); + /* Create a new breakpoint at WHERE, and call HANDLER when it is hit. HANDLER should return 1 if the breakpoint should be deleted, 0 otherwise. */ @@ -45,10 +50,10 @@ int breakpoint_inserted_here (CORE_ADDR addr); struct breakpoint *set_breakpoint_at (CORE_ADDR where, int (*handler) (CORE_ADDR)); -/* Delete a breakpoint previously inserted at ADDR with - set_breakpoint_at. */ +/* Delete a GDB breakpoint previously inserted at ADDR with + set_gdb_breakpoint_at. */ -void delete_breakpoint_at (CORE_ADDR addr); +int delete_gdb_breakpoint_at (CORE_ADDR addr); /* Set a reinsert breakpoint at STOP_AT. */ |