+2015-09-11 Don Breazeal <donb@codesourcery.com>
+
+ * remote.c (remote_exec_event_p): New function.
+ (remote_insert_exec_catchpoint): New function.
+ (remote_remove_exec_catchpoint): New function.
+ (init_extended_remote_ops): Initialize extended_remote_ops
+ members to_insert_exec_catchpoint and
+ to_remove_exec_catchpoint.
+
2015-09-11 Don Breazeal <donb@codesourcery.com>
Luis Machado <lgustavo@codesourcery.com>
return packet_support (PACKET_vfork_event_feature) == PACKET_ENABLE;
}
+/* Returns true if exec events are supported. */
+
+static int
+remote_exec_event_p (struct remote_state *rs)
+{
+ return packet_support (PACKET_exec_event_feature) == PACKET_ENABLE;
+}
+
/* Insert fork catchpoint target routine. If fork events are enabled
then return success, nothing more to do. */
return 0;
}
+/* Insert exec catchpoint target routine. If exec events are
+ enabled, just return success. */
+
+static int
+remote_insert_exec_catchpoint (struct target_ops *ops, int pid)
+{
+ struct remote_state *rs = get_remote_state ();
+
+ return !remote_exec_event_p (rs);
+}
+
+/* Remove exec catchpoint target routine. Nothing to do, just
+ return success. */
+
+static int
+remote_remove_exec_catchpoint (struct target_ops *ops, int pid)
+{
+ return 0;
+}
+
/* Tokens for use by the asynchronous signal handlers for SIGINT. */
static struct async_signal_handler *async_sigint_remote_twice_token;
static struct async_signal_handler *async_sigint_remote_token;
= remote_insert_vfork_catchpoint;
extended_remote_ops.to_remove_vfork_catchpoint
= remote_remove_vfork_catchpoint;
+ extended_remote_ops.to_insert_exec_catchpoint
+ = remote_insert_exec_catchpoint;
+ extended_remote_ops.to_remove_exec_catchpoint
+ = remote_remove_exec_catchpoint;
}
static int