[anjuta] debugger: Limit the number of children read by the debugger



commit d54e41ffe337e099dceac325f9665e74e7305115
Author: Sébastien Granjoux <seb sfo free fr>
Date:   Sat Jul 17 12:59:50 2010 +0200

    debugger: Limit the number of children read by the debugger

 libanjuta/interfaces/libanjuta.idl |   12 ++-
 plugins/debug-manager/command.c    |    8 +-
 plugins/debug-manager/command.h    |    2 +-
 plugins/debug-manager/debug_tree.c |  267 ++++++++++++++++++++----------------
 plugins/gdb/debugger.c             |   21 +++-
 plugins/gdb/debugger.h             |    2 +-
 plugins/gdb/plugin.c               |    4 +-
 plugins/js-debugger/plugin.c       |    3 +-
 8 files changed, 191 insertions(+), 128 deletions(-)
---
diff --git a/libanjuta/interfaces/libanjuta.idl b/libanjuta/interfaces/libanjuta.idl
index 349cc01..a9b1288 100644
--- a/libanjuta/interfaces/libanjuta.idl
+++ b/libanjuta/interfaces/libanjuta.idl
@@ -4610,18 +4610,24 @@ interface IAnjutaDebugger
 		* ianjuta_debugger_variable_list_children:
 		* @obj: Self
 		* @name: Variable name
+		* @from: Starting from this children (zero-based)
 		* @callback: Callback to call when the children have been
 		* created
 		* @user_data: User data that is passed back to the callback
 	 	* @err: Error propagation and reporting.
 		* 
-		* List and create objects for all children of a
-		* variable object.
+		* List and create objects for variable object's children.
+		* The backend can returns only a part of the children, in
+		* this case a last variable with a NULL name is added to
+		* the list given to the callback function. 
+		* If the remaining children are wanted, this
+		* function must be called again with a from argument
+		* corresponding to the first missing children.
 		*
 		* Returns: TRUE if the request succeed and the callback is
 		* called. If FALSE, the callback will not be called.
 		*/
-		gboolean list_children (const gchar *name, IAnjutaDebuggerCallback callback, gpointer user_data);
+		gboolean list_children (const gchar *name, guint from, IAnjutaDebuggerCallback callback, gpointer user_data);
 
 		/**
 		* ianjuta_debugger_variable_evaluate:
diff --git a/plugins/debug-manager/command.c b/plugins/debug-manager/command.c
index f8f1633..d12a873 100644
--- a/plugins/debug-manager/command.c
+++ b/plugins/debug-manager/command.c
@@ -370,6 +370,7 @@ struct _DmaQueueCommand
 		struct {
 			gchar *name;
 			gchar *value;
+			guint from;
 		} var;
 		gchar **env;
 		gchar *dir;
@@ -648,6 +649,7 @@ dma_command_new (DmaDebuggerCommand cmd_type,...)
 		break;
 	case LIST_VARIABLE_CHILDREN:
 		cmd->data.var.name = g_strdup (va_arg (args, gchar *));
+		cmd->data.var.from = (va_arg (args, guint));
 		cmd->callback = va_arg (args, IAnjutaDebuggerCallback);
 		cmd->user_data = va_arg (args, gpointer);
 		break;
@@ -1028,9 +1030,9 @@ dma_queue_assign_variable (DmaDebuggerQueue *self, const gchar *name, const gcha
 }
 
 gboolean
-dma_queue_list_children (DmaDebuggerQueue *self, const gchar *name, IAnjutaDebuggerCallback callback, gpointer user_data)
+dma_queue_list_children (DmaDebuggerQueue *self, const gchar *name, guint from, IAnjutaDebuggerCallback callback, gpointer user_data)
 {
-	return dma_debugger_queue_append (self, dma_command_new (DMA_LIST_VARIABLE_CHILDREN_COMMAND, name, callback, user_data));
+	return dma_debugger_queue_append (self, dma_command_new (DMA_LIST_VARIABLE_CHILDREN_COMMAND, name, from, callback, user_data));
 }
 
 gboolean
@@ -1409,7 +1411,7 @@ dma_command_run (DmaQueueCommand *cmd, IAnjutaDebugger *debugger,
 		ret = ianjuta_debugger_variable_evaluate (IANJUTA_DEBUGGER_VARIABLE (debugger), cmd->data.var.name, callback, queue, err);
 		break;
 	case LIST_VARIABLE_CHILDREN:
-		ret = ianjuta_debugger_variable_list_children (IANJUTA_DEBUGGER_VARIABLE (debugger), cmd->data.var.name, callback, queue, err);
+		ret = ianjuta_debugger_variable_list_children (IANJUTA_DEBUGGER_VARIABLE (debugger), cmd->data.var.name, cmd->data.var.from, callback, queue, err);
 		break;
 	case CREATE_VARIABLE:
 		ret = ianjuta_debugger_variable_create (IANJUTA_DEBUGGER_VARIABLE (debugger), cmd->data.var.name, callback, queue, err);
diff --git a/plugins/debug-manager/command.h b/plugins/debug-manager/command.h
index 6465086..0688973 100644
--- a/plugins/debug-manager/command.h
+++ b/plugins/debug-manager/command.h
@@ -120,7 +120,7 @@ gboolean dma_queue_disassemble (DmaDebuggerQueue *self, gulong address, guint le
 gboolean dma_queue_delete_variable (DmaDebuggerQueue *self, const gchar *name);
 gboolean dma_queue_evaluate_variable (DmaDebuggerQueue *self, const gchar *name, IAnjutaDebuggerCallback callback, gpointer user_data);
 gboolean dma_queue_assign_variable (DmaDebuggerQueue *self, const gchar *name, const gchar *value);
-gboolean dma_queue_list_children (DmaDebuggerQueue *self, const gchar *name, IAnjutaDebuggerCallback callback, gpointer user_data);
+gboolean dma_queue_list_children (DmaDebuggerQueue *self, const gchar *name, guint from, IAnjutaDebuggerCallback callback, gpointer user_data);
 gboolean dma_queue_create_variable (DmaDebuggerQueue *self, const gchar *name, IAnjutaDebuggerCallback callback, gpointer user_data);
 gboolean dma_queue_update_variable (DmaDebuggerQueue *self, IAnjutaDebuggerCallback callback, gpointer user_data);
 
diff --git a/plugins/debug-manager/debug_tree.c b/plugins/debug-manager/debug_tree.c
index e3f7315..2b5bfd3 100644
--- a/plugins/debug-manager/debug_tree.c
+++ b/plugins/debug-manager/debug_tree.c
@@ -87,6 +87,7 @@ struct _DebugTree {
 struct _DmaVariablePacket {
 	DmaVariableData *data;
 	GtkTreeModel *model;
+	guint from;
 	GtkTreeRowReference* reference;
 	DmaDebuggerQueue *debugger;
 	DmaVariablePacket* next;
@@ -151,6 +152,22 @@ my_gtk_tree_model_foreach_child (GtkTreeModel *const model,
   }
 }
 
+static gint
+my_gtk_tree_model_child_position (GtkTreeModel *model,
+								GtkTreeIter *iter)
+{
+	GtkTreePath *path;
+	gint pos;
+	
+	path = gtk_tree_model_get_path (model, iter);
+	if (path == NULL) return -1;
+
+	for (pos = 0; gtk_tree_path_prev (path); pos++);
+	gtk_tree_path_free (path);
+
+	return pos;
+}
+
 static gboolean 
 get_current_iter (GtkTreeView *view, GtkTreeIter* iter)
 {
@@ -202,7 +219,8 @@ static DmaVariablePacket *
 dma_variable_packet_new(GtkTreeModel *model,
                      GtkTreeIter *iter,
 					 DmaDebuggerQueue *debugger,
-					 DmaVariableData *data)
+					 DmaVariableData *data,
+					 guint from)
 {
 	GtkTreePath *path;
 						 
@@ -212,6 +230,7 @@ dma_variable_packet_new(GtkTreeModel *model,
 	DmaVariablePacket *pack = g_new (DmaVariablePacket, 1);
 
 	pack->data = data;
+	pack->from = from;
 	pack->model = GTK_TREE_MODEL (model);
 	path = gtk_tree_model_get_path(model, iter); 
 	pack->reference = gtk_tree_row_reference_new (model, path);
@@ -372,7 +391,7 @@ debug_tree_remove_children (GtkTreeModel *model, DmaDebuggerQueue *debugger, Gtk
 }
 
 static void
-debug_tree_model_add_dummy (GtkTreeModel *model, GtkTreeIter *parent)
+debug_tree_model_add_dummy_children (GtkTreeModel *model, GtkTreeIter *parent)
 {
 	GtkTreeIter iter;
 
@@ -386,79 +405,76 @@ debug_tree_model_add_dummy (GtkTreeModel *model, GtkTreeIter *parent)
 }
 
 static void
-debug_tree_add_children (GtkTreeModel *model, DmaDebuggerQueue *debugger, GtkTreeIter* parent, const GList *children)
+debug_tree_add_children (GtkTreeModel *model, DmaDebuggerQueue *debugger, GtkTreeIter* parent, guint from, const GList *children)
 {
 	GList *child;
-	
-	child = g_list_first ((GList *)children);
-	
-	if (child == NULL)
-	{
-		/* Clear all children if they exist */
-		debug_tree_remove_children (model, debugger, parent, NULL);
-	}
-	else
+	GtkTreeIter iter;
+	gboolean valid;
+
+	valid = gtk_tree_model_iter_nth_child (model, &iter, parent, from);
+
+	/* Add new children */
+	for (child = g_list_first ((GList *)children); child != NULL; child = g_list_next (child))
 	{
-		GtkTreeIter iter;
-		gboolean valid_iter;
-		
-		valid_iter = gtk_tree_model_iter_children (model, &iter, parent); 
+		IAnjutaDebuggerVariableObject *var = (IAnjutaDebuggerVariableObject *)child->data;
+		DmaVariableData *data;
 		
-		for (; child != NULL; child = g_list_next (child))
+		if (!valid)
 		{
-			IAnjutaDebuggerVariableObject *var = (IAnjutaDebuggerVariableObject *)child->data;
-			DmaVariableData *data;
-			
-			if (!valid_iter)
-			{
-				/* Add new tree node */
-				gtk_tree_store_append(GTK_TREE_STORE(model), &iter, parent);
-				gtk_tree_store_set(GTK_TREE_STORE(model), &iter,
-					   TYPE_COLUMN, var->type == NULL ? UNKNOWN_TYPE : var->type,
-					   VALUE_COLUMN, var->value == NULL ? UNKNOWN_VALUE : var->value,
-					   VARIABLE_COLUMN, var->expression,
-					   ROOT_COLUMN, FALSE,
-					   DTREE_ENTRY_COLUMN, NULL,-1);
-				data = NULL;
-			}
-			else
-			{
-				/* Update tree node */
-				if (var->type != NULL)
-					gtk_tree_store_set(GTK_TREE_STORE(model), &iter, TYPE_COLUMN, var->type, -1);
-				if (var->value != NULL)
-					gtk_tree_store_set(GTK_TREE_STORE(model), &iter, VALUE_COLUMN, var->value, -1);
-				if (var->expression != NULL)
-					gtk_tree_store_set(GTK_TREE_STORE(model), &iter, VARIABLE_COLUMN, var->expression, -1);
-				gtk_tree_model_get(model, &iter, DTREE_ENTRY_COLUMN, &data, -1);	
-			}
-				
-			if (data == NULL)
-			{
-				/* Create new data */
-				data = dma_variable_data_new(var->name, TRUE);
-				gtk_tree_store_set(GTK_TREE_STORE(model), &iter, DTREE_ENTRY_COLUMN, data, -1);				
-			}
-		
-			if (var->children == 0)
-			{
-				/* Clear all children if they exist */
-				debug_tree_remove_children (model, debugger, &iter, NULL);
-			}
-			else
+			/* Add new tree node */
+			gtk_tree_store_append(GTK_TREE_STORE(model), &iter, parent);
+
+			gtk_tree_store_set(GTK_TREE_STORE(model), &iter,
+				TYPE_COLUMN, var->type == NULL ? UNKNOWN_TYPE : var->type,
+				VALUE_COLUMN, var->value == NULL ? UNKNOWN_VALUE : var->value,
+				VARIABLE_COLUMN, var->expression,
+				ROOT_COLUMN, FALSE,
+				DTREE_ENTRY_COLUMN, NULL,-1);
+			data = NULL;
+		}
+		else
+		{
+			/* Update tree node */
+			if (var->type != NULL)
+				gtk_tree_store_set(GTK_TREE_STORE(model), &iter, TYPE_COLUMN, var->type, -1);
+			if (var->value != NULL)
+				gtk_tree_store_set(GTK_TREE_STORE(model), &iter, VALUE_COLUMN, var->value, -1);
+			if (var->expression != NULL)
+				gtk_tree_store_set(GTK_TREE_STORE(model), &iter, VARIABLE_COLUMN, var->expression, -1);
+			gtk_tree_model_get(model, &iter, DTREE_ENTRY_COLUMN, &data, -1);
+
+			if (var->name == NULL)
 			{
-				/* Add dummy children */
-				debug_tree_model_add_dummy (model, &iter);
+				/* Dummy node representing additional children */
+				if (data != NULL)
+				{
+					dma_variable_data_free (data);
+					gtk_tree_store_set(GTK_TREE_STORE (model), &iter, DTREE_ENTRY_COLUMN, NULL, -1);
+					data = NULL;
+				}
 			}
-			
-			valid_iter = gtk_tree_model_iter_next (model, &iter); 
 		}
-		if (valid_iter)
+
+		if ((var->name != NULL) && (data == NULL))
 		{
-			/* Remove trailing children */
-			debug_tree_remove_children (model, debugger, parent, &iter);
+			/* Create new data */
+			data = dma_variable_data_new(var->name, TRUE);
+			gtk_tree_store_set(GTK_TREE_STORE(model), &iter, DTREE_ENTRY_COLUMN, data, -1);
 		}
-	}	
+
+		/* Clear all children if they exist */
+		debug_tree_remove_children (model, debugger, &iter, NULL);
+		if ((var->children != 0) || var->has_more || (var->name == NULL))
+		{
+			/* Add dummy children */
+			debug_tree_model_add_dummy_children (model, &iter);
+		}
+
+		valid = gtk_tree_model_iter_next (model, &iter); 
+	}
+	
+	/* Clear remaining old children */
+	if (valid) debug_tree_remove_children (model, debugger, parent, &iter);
 }
 
 /*---------------------------------------------------------------------------*/
@@ -505,7 +521,7 @@ gdb_var_list_children (const GList *children, gpointer user_data, GError *err)
 		return;
 	}
 
-	debug_tree_add_children (pack->model, pack->debugger, &iter, children);
+	debug_tree_add_children (pack->model, pack->debugger, &iter, pack->from, children);
 		  
 	dma_variable_packet_free (pack);
 }
@@ -554,28 +570,16 @@ gdb_var_create (IAnjutaDebuggerVariableObject *variable, gpointer user_data, GEr
 					   VALUE_COLUMN, variable->value, -1);
 	
 
-	if ((variable->children == -1) || variable->has_more)
-	{
-		/* Find the number of children */
-		DmaVariablePacket *pack_child =
-                  dma_variable_packet_new(pack->model, &iter, pack->debugger, data);
-
-		dma_queue_list_children (
-				pack_child->debugger,
-				variable->name,
-				(IAnjutaDebuggerCallback)gdb_var_list_children,
-				pack_child);
-	}
-	else if (variable->children > 0)
+	if ((variable->children == 0) && !variable->has_more)
 	{
-		debug_tree_model_add_dummy (pack->model, &iter);
+		debug_tree_remove_children (pack->model, pack->debugger, &iter, NULL);
 	}
 	else
 	{
-		debug_tree_remove_children (pack->model, pack->debugger, &iter, NULL);
+		debug_tree_model_add_dummy_children (pack->model, &iter);
 	}
-	
-	
+
+
 	/* Request value and/or children if they are missing
 	 * reusing same packet if possible */
 	if (variable->value == NULL)
@@ -601,23 +605,68 @@ on_treeview_row_expanded       (GtkTreeView     *treeview,
                                  gpointer         user_data)
 {
 	DebugTree *tree = (DebugTree *)user_data;
-	GtkTreeModel *const model = gtk_tree_view_get_model (treeview);
-	DmaVariableData *data;
-									 
-	gtk_tree_model_get (model, iter, DTREE_ENTRY_COLUMN, &data, -1);
 
-	if ((data != NULL) && (data->name != NULL) && (tree->debugger != NULL))
+	if (tree->debugger != NULL)
 	{
-		DmaVariablePacket *pack;
-					
-		pack = dma_variable_packet_new(model, iter, tree->debugger, data);
-		dma_queue_list_children (
-						tree->debugger,
-						data->name,
-						(IAnjutaDebuggerCallback)gdb_var_list_children,
-						pack);
+		GtkTreeModel *const model = gtk_tree_view_get_model (treeview);
+		DmaVariableData *data;
+
+		gtk_tree_model_get (model, iter, DTREE_ENTRY_COLUMN, &data, -1);
+
+		if ((data != NULL) && (data->name != NULL))
+		{
+			/* Expand variable node */
+			GtkTreeIter child;
+			
+			if (gtk_tree_model_iter_children (model, &child, iter))
+			{
+				DmaVariableData *child_data;
+				
+				gtk_tree_model_get (model, &child, DTREE_ENTRY_COLUMN, &child_data, -1);
+				if ((child_data == NULL) || (child_data->name == NULL))
+				{
+					/* Dummy children, get the real children */
+					DmaVariablePacket *pack;
+
+					pack = dma_variable_packet_new(model, iter, tree->debugger, data, 0);
+					dma_queue_list_children (
+								tree->debugger,
+								data->name,
+								0, 
+								(IAnjutaDebuggerCallback)gdb_var_list_children,
+								pack);
+				}
+			}
+		}
+		else
+		{
+			/* Dummy node representing additional children */
+			GtkTreeIter parent;
+
+			if (gtk_tree_model_iter_parent (model, &parent, iter))
+			{
+				gtk_tree_model_get (model, &parent, DTREE_ENTRY_COLUMN, &data, -1);
+				if ((data != NULL) && (data->name != NULL))
+				{
+					DmaVariablePacket *pack;
+					guint from;
+					gint pos;
+
+					pos = my_gtk_tree_model_child_position (model, iter);
+					from = pos < 0 ? 0 : pos;
+
+					pack = dma_variable_packet_new(model, &parent, tree->debugger, data, from);
+					dma_queue_list_children (
+									tree->debugger,
+									data->name,
+									from,
+									(IAnjutaDebuggerCallback)gdb_var_list_children,
+									pack);
+				}
+			}
+		}
 	}
-								 
+ 
 	return;
 }
 
@@ -668,7 +717,7 @@ on_debug_tree_value_changed (GtkCellRendererText *cell,
 		{
 			/* Variable is valid */
 			dma_queue_assign_variable (tree->debugger, item->name, text);
-			tran = dma_variable_packet_new(model, &iter, tree->debugger, item);
+			tran = dma_variable_packet_new(model, &iter, tree->debugger, item, 0);
 			dma_queue_evaluate_variable (
 					tree->debugger,
 					item->name,
@@ -879,7 +928,7 @@ debug_tree_add_dummy (DebugTree *tree, GtkTreeIter *parent)
 {
 	GtkTreeModel* model = gtk_tree_view_get_model (GTK_TREE_VIEW(tree->view));
 
-	debug_tree_model_add_dummy (model, parent);
+	debug_tree_model_add_dummy_children (model, parent);
 }
 
 /* Get a IAnjutaVariable as argument in order to use the same function without
@@ -913,7 +962,7 @@ debug_tree_add_watch (DebugTree *tree, const IAnjutaDebuggerVariableObject* var,
 				/* Need to create variable before to get value */
 				DmaVariablePacket *pack;
 		
-				pack = dma_variable_packet_new(model, &iter, tree->debugger, data);
+				pack = dma_variable_packet_new(model, &iter, tree->debugger, data, 0);
 				dma_queue_create_variable (
 						tree->debugger,
 						var->expression,
@@ -928,25 +977,13 @@ debug_tree_add_watch (DebugTree *tree, const IAnjutaDebuggerVariableObject* var,
 					/* Get value */
 					DmaVariablePacket *pack =
 					
-					pack = dma_variable_packet_new(model, &iter, tree->debugger, data);
+					pack = dma_variable_packet_new(model, &iter, tree->debugger, data, 0);
 					dma_queue_evaluate_variable (
 							tree->debugger,
 							var->name,
 							(IAnjutaDebuggerCallback)gdb_var_evaluate_expression,
 							pack);
 				}
-				if ((var->children == -1) || var->has_more)
-				{
-					/* Get number of children */
-					DmaVariablePacket *pack =
-					
-					pack = dma_variable_packet_new(model, &iter, tree->debugger, data);
-					dma_queue_list_children (
-							tree->debugger,
-							var->name,
-							(IAnjutaDebuggerCallback)gdb_var_list_children,
-							pack);
-				}
 			}
 		}
 	}
@@ -1060,7 +1097,7 @@ debug_tree_update_real (GtkTreeModel *model, DmaDebuggerQueue *debugger, GtkTree
 			DmaVariablePacket *pack;
 		
 			gtk_tree_model_get (model, iter, VARIABLE_COLUMN, &exp, -1);
-			pack = dma_variable_packet_new(model, iter, debugger, data);
+			pack = dma_variable_packet_new(model, iter, debugger, data, 0);
 			dma_queue_create_variable (
 					debugger,
 					exp,
@@ -1073,7 +1110,7 @@ debug_tree_update_real (GtkTreeModel *model, DmaDebuggerQueue *debugger, GtkTree
 	}	
 	else if (force || (data->auto_update && data->changed))
 	{
-		DmaVariablePacket *pack = dma_variable_packet_new(model, iter, debugger, data);
+		DmaVariablePacket *pack = dma_variable_packet_new(model, iter, debugger, data, 0);
 		refresh = data->modified != (data->changed != FALSE);
 		data->modified = (data->changed != FALSE);
 		dma_queue_evaluate_variable (
diff --git a/plugins/gdb/debugger.c b/plugins/gdb/debugger.c
index 78aa581..cc5c191 100644
--- a/plugins/gdb/debugger.c
+++ b/plugins/gdb/debugger.c
@@ -57,6 +57,8 @@
 #define GDB_PROMPT  "(gdb)"
 #define FILE_BUFFER_SIZE 1024
 #define GDB_PATH "gdb"
+#define MAX_CHILDREN		25		/* Limit the number of variable children
+									 * returned by debugger */
 #define SUMMARY_MAX_LENGTH   90	 /* Should be smaller than 4K to be displayed
 				  * in GtkCellRendererCell */
 
@@ -3983,6 +3985,21 @@ gdb_var_list_children (Debugger *debugger,
 
 			list = g_list_prepend (list, var);
 		}
+
+		literal = gdbmi_value_hash_lookup (mi_results, "has_more");
+		if (literal && (*gdbmi_value_literal_get(literal) == '1'))
+		{
+			/* Add a dummy children to represent additional children */
+			IAnjutaDebuggerVariableObject *var;
+			
+			var = g_new0 (IAnjutaDebuggerVariableObject, 1);
+			var->expression = _("more children");
+			var->type = "";
+			var->value = "";
+			var->has_more = TRUE;
+			list = g_list_prepend (list, var);
+		}
+		
 		list = g_list_reverse (list);
 	}
 
@@ -3991,7 +4008,7 @@ gdb_var_list_children (Debugger *debugger,
 	g_list_free (list);
 }
 
-void debugger_list_variable_children (Debugger *debugger, const gchar* name, IAnjutaDebuggerCallback callback, gpointer user_data)
+void debugger_list_variable_children (Debugger *debugger, const gchar* name, guint from, IAnjutaDebuggerCallback callback, gpointer user_data)
 {
 	gchar *buff;
 	
@@ -3999,7 +4016,7 @@ void debugger_list_variable_children (Debugger *debugger, const gchar* name, IAn
 
 	g_return_if_fail (IS_DEBUGGER (debugger));
 
-	buff = g_strdup_printf ("-var-list-children --all-values %s", name);
+	buff = g_strdup_printf ("-var-list-children --all-values %s %d %d", name, from, from + MAX_CHILDREN);
 	debugger_queue_command (debugger, buff, 0, gdb_var_list_children, callback, user_data);
 	g_free (buff);
 }
diff --git a/plugins/gdb/debugger.h b/plugins/gdb/debugger.h
index 7946340..daf893b 100644
--- a/plugins/gdb/debugger.h
+++ b/plugins/gdb/debugger.h
@@ -194,7 +194,7 @@ void debugger_set_log (Debugger *debugger, IAnjutaMessageView *view);
 void debugger_delete_variable (Debugger *debugger, const gchar *name);
 void debugger_evaluate_variable (Debugger *debugger, const gchar *name, IAnjutaDebuggerCallback callback, gpointer user_data);
 void debugger_assign_variable (Debugger *debugger, const gchar *name, const gchar *value);
-void debugger_list_variable_children (Debugger *debugger, const gchar* name, IAnjutaDebuggerCallback callback, gpointer user_data);
+void debugger_list_variable_children (Debugger *debugger, const gchar* name, guint from, IAnjutaDebuggerCallback callback, gpointer user_data);
 void debugger_create_variable (Debugger *debugger, const gchar *name, IAnjutaDebuggerCallback callback, gpointer user_data);
 void debugger_update_variable (Debugger *debugger, IAnjutaDebuggerCallback callback, gpointer user_data);
 
diff --git a/plugins/gdb/plugin.c b/plugins/gdb/plugin.c
index 312dabc..290498c 100644
--- a/plugins/gdb/plugin.c
+++ b/plugins/gdb/plugin.c
@@ -1187,11 +1187,11 @@ idebugger_variable_assign (IAnjutaDebuggerVariable *plugin, const gchar *name, c
 }
 
 static gboolean
-idebugger_variable_list_children (IAnjutaDebuggerVariable *plugin, const gchar *name, IAnjutaDebuggerCallback callback , gpointer user_data, GError **error)
+idebugger_variable_list_children (IAnjutaDebuggerVariable *plugin, const gchar *name, guint from, IAnjutaDebuggerCallback callback , gpointer user_data, GError **error)
 {
 	GdbPlugin *gdb = ANJUTA_PLUGIN_GDB (plugin);
 
-	debugger_list_variable_children (gdb->debugger, name, callback, user_data);
+	debugger_list_variable_children (gdb->debugger, name, from, callback, user_data);
 
 	return TRUE;
 }
diff --git a/plugins/js-debugger/plugin.c b/plugins/js-debugger/plugin.c
index 3ef596a..e7604fe 100644
--- a/plugins/js-debugger/plugin.c
+++ b/plugins/js-debugger/plugin.c
@@ -665,11 +665,12 @@ idebugger_variable_assign (IAnjutaDebuggerVariable *plugin, const gchar *name, c
 }
 
 static gboolean
-idebugger_variable_list_children (IAnjutaDebuggerVariable *plugin, const gchar *name, IAnjutaDebuggerCallback callback , gpointer user_data, GError **error)
+idebugger_variable_list_children (IAnjutaDebuggerVariable *plugin, const gchar *name, guint from, IAnjutaDebuggerCallback callback , gpointer user_data, GError **error)
 {
 	puts (name);
 	DEBUG_PRINT ("%s", "variable_list_children: Implemented");
 	JSDbg *self = ANJUTA_PLUGIN_JSDBG (plugin);
+	/* from argument is not used as this function always return all the children */
 	debugger_js_variable_list_children (self->debugger, callback, name, user_data);
 	return TRUE;
 }



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]