From: Michael Snyder Date: Sun, 26 Jul 2009 01:29:42 +0000 (+0000) Subject: 2009-07-25 Michael Snyder X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=04aad1c8e0d09a8c4af4414685a8f0c94673de16;p=thirdparty%2Fbinutils-gdb.git 2009-07-25 Michael Snyder * target.h (struct target_ops): New methods to_set_checkpoint, to_unset_checkpoint, to_restore_checkpoint, to_info_checkpoints. * target.c (update_current_target): Inherit the above methods. --- diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 4fc3bd85a89..1a579a11bbe 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,9 @@ +2009-07-25 Michael Snyder + + * target.h (struct target_ops): New methods to_set_checkpoint, + to_unset_checkpoint, to_restore_checkpoint, to_info_checkpoints. + * target.c (update_current_target): Inherit the above methods. + 2009-07-25 Pedro Alves * stack.c (backtrace_command_1): Remove dead check of NULL current diff --git a/gdb/target.c b/gdb/target.c index e1c1e0b66c9..49a255a4331 100644 --- a/gdb/target.c +++ b/gdb/target.c @@ -637,6 +637,10 @@ update_current_target (void) INHERIT (to_make_corefile_notes, t); /* Do not inherit to_get_thread_local_address. */ INHERIT (to_can_execute_reverse, t); + INHERIT (to_set_checkpoint, t); + INHERIT (to_unset_checkpoint, t); + INHERIT (to_restore_checkpoint, t); + INHERIT (to_info_checkpoints, t); INHERIT (to_thread_architecture, t); /* Do not inherit to_read_description. */ INHERIT (to_get_ada_task_ptid, t); diff --git a/gdb/target.h b/gdb/target.h index c425a5bae3e..81808532cce 100644 --- a/gdb/target.h +++ b/gdb/target.h @@ -555,6 +555,18 @@ struct target_ops The default implementation always returns target_gdbarch. */ struct gdbarch *(*to_thread_architecture) (struct target_ops *, ptid_t); + /* Set a checkpoint. */ + void (*to_set_checkpoint) (char *, int); + + /* Unset a checkpoint. */ + void (*to_unset_checkpoint) (char *, int); + + /* Restore a checkpoint. */ + void (*to_restore_checkpoint) (char *, int); + + /* List checkpoints. */ + void (*to_info_checkpoints) (char *, int); + int to_magic; /* Need sub-structure for target machine related rather than comm related? */ @@ -1141,6 +1153,18 @@ extern const struct target_desc *target_read_description (struct target_ops *); #define target_get_ada_task_ptid(lwp, tid) \ (*current_target.to_get_ada_task_ptid) (lwp,tid) +/* Set a checkpoint. */ +#define target_set_checkpoint (current_target.to_set_checkpoint) + +/* Unset a checkpoint. */ +#define target_unset_checkpoint (current_target.to_unset_checkpoint) + +/* Restore a checkpoint. */ +#define target_restore_checkpoint (current_target.to_restore_checkpoint) + +/* List checkpoints. */ +#define target_info_checkpoints (current_target.to_info_checkpoints) + /* Utility implementation of searching memory. */ extern int simple_search_memory (struct target_ops* ops, CORE_ADDR start_addr,