aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRob Bradford <rob@o-hand.com>2008-04-04 15:44:34 +0000
committerrob <rob@aea7fca7-3721-49c4-ace3-ac8c44b998bb>2008-04-04 15:44:34 +0000
commit347a590e1c663f55817e3ff20f174b0c5a97eee7 (patch)
tree12685eb5fcce2d5197cb79d706079f27c4e9510a
parent33fad004217f963c437005cc3f28b1759de06464 (diff)
downloadanjuta-poky-347a590e1c663f55817e3ff20f174b0c5a97eee7.tar.gz
anjuta-poky-347a590e1c663f55817e3ff20f174b0c5a97eee7.tar.bz2
anjuta-poky-347a590e1c663f55817e3ff20f174b0c5a97eee7.zip
2008-04-04 Rob Bradford <rob@openedhand.com>
* src/beaver-target.c: (beaver_target_class_init), (beaver_target_remote_debug_stop), (_beaver_target_remote_debug_stop): * src/beaver-target.h: Add functionality to the target to allow stopping of the remote gdbserver.
-rw-r--r--ChangeLog9
-rw-r--r--src/beaver-target.c17
-rw-r--r--src/beaver-target.h3
3 files changed, 28 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index e99d4be..f7b8746 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,14 @@
2008-04-04 Rob Bradford <rob@openedhand.com>
+ * src/beaver-target.c: (beaver_target_class_init),
+ (beaver_target_remote_debug_stop),
+ (_beaver_target_remote_debug_stop):
+ * src/beaver-target.h:
+ Add functionality to the target to allow stopping of the remote
+ gdbserver.
+
+2008-04-04 Rob Bradford <rob@openedhand.com>
+
* src/beaver-target.c: (beaver_target_dispose),
(beaver_target_class_init), (beaver_target_init),
(beaver_target_remote_debug), (_beaver_target_run_remote),
diff --git a/src/beaver-target.c b/src/beaver-target.c
index d0b9ba1..dac84f8 100644
--- a/src/beaver-target.c
+++ b/src/beaver-target.c
@@ -74,6 +74,8 @@ static gboolean _beaver_target_run_remote (BeaverTarget *target, gchar *cmd,
GError **out_err);
static gboolean _beaver_target_remote_debug (BeaverTarget *target, gchar *cmd,
gchar *cmd_args, GError **out_err);
+static gboolean _beaver_target_remote_debug_stop (BeaverTarget *target,
+ GError **out_err);
static void
beaver_target_get_property (GObject *object, guint property_id,
@@ -148,6 +150,7 @@ beaver_target_class_init (BeaverTargetClass *klass)
klass->run_remote_v = _beaver_target_run_remote_v;
klass->run_remote = _beaver_target_run_remote;
klass->remote_debug = _beaver_target_remote_debug;
+ klass->remote_debug_stop = _beaver_target_remote_debug_stop;
signals[STATE_CHANGED] = g_signal_new ("state-changed",
G_OBJECT_CLASS_TYPE (object_class),
@@ -236,6 +239,12 @@ beaver_target_remote_debug (BeaverTarget *target, gchar *cmd, gchar *cmd_args,
return BEAVER_TARGET_GET_CLASS (target)->remote_debug (target, cmd, cmd_args, error);
}
+gboolean
+beaver_target_remote_debug_stop (BeaverTarget *target, GError **error)
+{
+ return BEAVER_TARGET_GET_CLASS (target)->remote_debug_stop (target, error);
+}
+
/* default implementations */
static gboolean
_beaver_target_run_remote (BeaverTarget *target, gchar *cmd, GError **out_err)
@@ -400,6 +409,14 @@ _beaver_target_remote_debug (BeaverTarget *target, gchar *cmd, gchar *cmd_args,
}
}
+static gboolean
+_beaver_target_remote_debug_stop (BeaverTarget *target, GError **out_err)
+{
+ gchar *args[] = { "killall gdbserver", NULL };
+
+ return beaver_target_run_remote_v (target, args, NULL);
+}
+
static void
launcher_child_exited_cb (AnjutaLauncher *launcher, gint child_pid,
gint status, gulong time, gpointer userdata)
diff --git a/src/beaver-target.h b/src/beaver-target.h
index 6fa8ab2..9e549e9 100644
--- a/src/beaver-target.h
+++ b/src/beaver-target.h
@@ -77,6 +77,7 @@ typedef struct {
GError **error);
gboolean (* remote_debug) (BeaverTarget *target, gchar *cmd, gchar *args,
GError **error);
+ gboolean (* remote_debug_stop) (BeaverTarget *target, GError **error);
} BeaverTargetClass;
GType beaver_target_get_type (void);
@@ -89,7 +90,7 @@ gboolean beaver_target_run_remote_v (BeaverTarget *target, gchar **in_args,
GError **error);
gboolean beaver_target_remote_debug (BeaverTarget *target, gchar *cmd,
gchar *args, GError **error);
-
+gboolean beaver_target_remote_debug_stop (BeaverTarget *target, GError **error);
G_END_DECLS
#endif /* _BEAVER_TARGET */