![]() |
![]() |
![]() |
Anjuta Developers Reference Manual | ![]() |
---|---|---|---|---|
Top | Description |
#include <libanjuta/interfaces/ianjuta-debugger-variable.h> #define IANJUTA_DEBUGGER_VARIABLE_ERROR void (*IAnjutaDebuggerVariableCallback) (const IAnjutaDebuggerVariableObject *data
,gpointer user_data
,GError *err
); struct IAnjutaDebuggerVariableIface; struct IAnjutaDebuggerVariableObject; gboolean ianjuta_debugger_variable_assign (IAnjutaDebuggerVariable *obj
,const gchar *name
,const gchar *value
,GError **err
); gboolean ianjuta_debugger_variable_create (IAnjutaDebuggerVariable *obj
,const gchar *expression
,IAnjutaDebuggerVariableCallback callback
,gpointer user_data
,GError **err
); gboolean ianjuta_debugger_variable_destroy (IAnjutaDebuggerVariable *obj
,const gchar *name
,GError **err
); GQuark ianjuta_debugger_variable_error_quark (void
); gboolean ianjuta_debugger_variable_evaluate (IAnjutaDebuggerVariable *obj
,const gchar *name
,IAnjutaDebuggerGCharCallback callback
,gpointer user_data
,GError **err
); gboolean ianjuta_debugger_variable_list_children (IAnjutaDebuggerVariable *obj
,const gchar *name
,guint from
,IAnjutaDebuggerGListCallback callback
,gpointer user_data
,GError **err
); gboolean ianjuta_debugger_variable_update (IAnjutaDebuggerVariable *obj
,IAnjutaDebuggerGListCallback callback
,gpointer user_data
,GError **err
);
This interface is used to examine and change values of expression. It is based on the MI2 variable object interface of gdb. A variable needs to be created before being able to get or set its value and list its children.
#define IANJUTA_DEBUGGER_VARIABLE_ERROR ianjuta_debugger_variable_error_quark()
void (*IAnjutaDebuggerVariableCallback) (const IAnjutaDebuggerVariableObject *data
,gpointer user_data
,GError *err
);
This callback function is used to return a IAnjutaDebuggerVariableObject.
|
a IAnjutaDebuggerVariableObject object |
|
user data passed to the function |
struct IAnjutaDebuggerVariableIface { IAnjutaDebuggerIface g_iface; gboolean (*assign) (IAnjutaDebuggerVariable *obj, const gchar *name, const gchar *value, GError **err); gboolean (*create) (IAnjutaDebuggerVariable *obj, const gchar *expression, IAnjutaDebuggerVariableCallback callback, gpointer user_data, GError **err); gboolean (*destroy) (IAnjutaDebuggerVariable *obj, const gchar *name, GError **err); gboolean (*evaluate) (IAnjutaDebuggerVariable *obj, const gchar *name, IAnjutaDebuggerGCharCallback callback, gpointer user_data, GError **err); gboolean (*list_children) (IAnjutaDebuggerVariable *obj, const gchar *name, guint from, IAnjutaDebuggerGListCallback callback, gpointer user_data, GError **err); gboolean (*update) (IAnjutaDebuggerVariable *obj, IAnjutaDebuggerGListCallback callback, gpointer user_data, GError **err); };
struct IAnjutaDebuggerVariableObject { gchar *name; gchar *expression; gchar *type; gchar *value; gboolean changed; gboolean exited; gboolean deleted; gint children; gboolean has_more; };
Defines a variable object.
gchar * |
unique variable object name created by backend |
gchar * |
corresponding variable name or expression |
gchar * |
variable type |
gchar * |
variable value |
gboolean |
TRUE if the variable has changed |
gboolean |
TRUE if the variable is outside current scope |
gboolean |
TRUE if the variable has been removed |
gint |
Number of variable children, -1 if unknown |
gboolean |
TRUE if the children value is wrong |
gboolean ianjuta_debugger_variable_assign (IAnjutaDebuggerVariable *obj
,const gchar *name
,const gchar *value
,GError **err
);
Set the value of one variable or child object.
|
Self |
|
Variable name |
|
Variable value |
|
Error propagation and reporting. |
Returns : |
TRUE if the request succeed and the callback is called. If FALSE, the callback will not be called. |
gboolean ianjuta_debugger_variable_create (IAnjutaDebuggerVariable *obj
,const gchar *expression
,IAnjutaDebuggerVariableCallback callback
,gpointer user_data
,GError **err
);
Create a new variable object in the current thread and frame.
|
Self |
|
Variable expression |
|
Callback to call when the variable has been created |
|
User data that is passed back to the callback |
|
Error propagation and reporting. |
Returns : |
TRUE if the request succeed and the callback is called. If FALSE, the callback will not be called. |
gboolean ianjuta_debugger_variable_destroy (IAnjutaDebuggerVariable *obj
,const gchar *name
,GError **err
);
Delete a previously created variable or child object including its own children.
|
Self |
|
Variable name |
|
Error propagation and reporting. |
Returns : |
TRUE if the request succeed and the callback is called. If FALSE, the callback will not be called. |
gboolean ianjuta_debugger_variable_evaluate (IAnjutaDebuggerVariable *obj
,const gchar *name
,IAnjutaDebuggerGCharCallback callback
,gpointer user_data
,GError **err
);
Get the value of one variable or child object.
|
Self |
|
Variable name |
|
Callback to call with the variable value |
|
User data that is passed back to the callback |
|
Error propagation and reporting. |
Returns : |
TRUE if the request succeed and the callback is called. If FALSE, the callback will not be called. |
gboolean ianjuta_debugger_variable_list_children (IAnjutaDebuggerVariable *obj
,const gchar *name
,guint from
,IAnjutaDebuggerGListCallback callback
,gpointer user_data
,GError **err
);
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.
|
Self |
|
Variable name |
|
Starting from this children (zero-based) |
|
Callback to call when the children have been created with a list of variable objects |
|
User data that is passed back to the callback |
|
Error propagation and reporting. |
Returns : |
TRUE if the request succeed and the callback is called. If FALSE, the callback will not be called. |
gboolean ianjuta_debugger_variable_update (IAnjutaDebuggerVariable *obj
,IAnjutaDebuggerGListCallback callback
,gpointer user_data
,GError **err
);
List all changed variable objects since the last call.
|
Self |
|
Callback to call with the list of all changed variable names |
|
User data that is passed back to the callback |
|
Error propagation and reporting. |
Returns : |
TRUE if the request succeed and the callback is called. If FALSE, the callback will not be called. |