aboutsummaryrefslogtreecommitdiff
path: root/gdb/target.c
diff options
context:
space:
mode:
authorMichael Snyder <msnyder@vmware.com>2009-11-20 17:23:38 +0000
committerMichael Snyder <msnyder@vmware.com>2009-11-20 17:23:38 +0000
commit6b04bdb74a44bebb3d4931de23ae39b0315d06b6 (patch)
tree3eb64a81055abe07f9ba9e86b529138002b04390 /gdb/target.c
parentc29aca4a95885ab0b01c346590afa685cf121919 (diff)
downloadgdb-6b04bdb74a44bebb3d4931de23ae39b0315d06b6.zip
gdb-6b04bdb74a44bebb3d4931de23ae39b0315d06b6.tar.gz
gdb-6b04bdb74a44bebb3d4931de23ae39b0315d06b6.tar.bz2
2009-10-25 Michael Snyder <msnyder@vmware.com>
* target.h (struct target_ops): New methods to_get_bookmark and to_goto_bookmark. (target_get_bookmark): New macro. (target_goto_bookmark): New macro. * target.c (dummy_get_bookmark): New function, default implementation. (dummy_goto_bookmark): New function, default implementation. (update_current_target): Inherit new methods. * record.c (record_get_bookmark): New function. (record_goto_bookmark): New function. (init_record_ops): Set to_get_bookmark and to_goto_bookmark methods. * reverse.c (struct bookmark): New type. (save_bookmark_command): New function (command). (delete_bookmark_command): New function (command). (goto_bookmark_command): New function (command). (bookmarks_info): New function (command). (_initialize_reverse): Add new bookmark commands. * command.h (enum command_class): Add class_bookmark. * NEWS: Mention bookmark commands.
Diffstat (limited to 'gdb/target.c')
-rw-r--r--gdb/target.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/gdb/target.c b/gdb/target.c
index a5bf53f..a6f08c8 100644
--- a/gdb/target.c
+++ b/gdb/target.c
@@ -674,6 +674,8 @@ update_current_target (void)
INHERIT (to_async_mask, t);
INHERIT (to_find_memory_regions, t);
INHERIT (to_make_corefile_notes, t);
+ INHERIT (to_get_bookmark, t);
+ INHERIT (to_goto_bookmark, t);
/* Do not inherit to_get_thread_local_address. */
INHERIT (to_can_execute_reverse, t);
INHERIT (to_thread_architecture, t);
@@ -2774,6 +2776,21 @@ dummy_make_corefile_notes (bfd *ignore1, int *ignore2)
return NULL;
}
+/* Error-catcher for target_get_bookmark. */
+static gdb_byte *
+dummy_get_bookmark (char *ignore1, int ignore2)
+{
+ tcomplain ();
+ return NULL;
+}
+
+/* Error-catcher for target_goto_bookmark. */
+static void
+dummy_goto_bookmark (gdb_byte *ignore, int from_tty)
+{
+ tcomplain ();
+}
+
/* Set up the handful of non-empty slots needed by the dummy target
vector. */
@@ -2794,6 +2811,8 @@ init_dummy_target (void)
dummy_target.to_stratum = dummy_stratum;
dummy_target.to_find_memory_regions = dummy_find_memory_regions;
dummy_target.to_make_corefile_notes = dummy_make_corefile_notes;
+ dummy_target.to_get_bookmark = dummy_get_bookmark;
+ dummy_target.to_goto_bookmark = dummy_goto_bookmark;
dummy_target.to_xfer_partial = default_xfer_partial;
dummy_target.to_has_all_memory = (int (*) (struct target_ops *)) return_zero;
dummy_target.to_has_memory = (int (*) (struct target_ops *)) return_zero;