## IAnjutaDebuggerRegister

IAnjutaDebuggerRegister — Register interface for debuggers

## Stability Level

Unstable, unless otherwise indicated

## Synopsis

    #include <libanjuta/interfaces/ianjuta-debugger-register.h>

    #define             IANJUTA_DEBUGGER_REGISTER_ERROR
    struct              IAnjutaDebuggerRegisterData;
    struct              IAnjutaDebuggerRegisterIface;
    GQuark              ianjuta_debugger_register_error_quark
                                                            (void);
    gboolean            ianjuta_debugger_register_list_register
                                                            (IAnjutaDebuggerRegister *obj,
                                                             IAnjutaDebuggerGListCallback callback,
                                                             gpointer user_data,
                                                             GError **err);
    gboolean            ianjuta_debugger_register_update_register
                                                            (IAnjutaDebuggerRegister *obj,
                                                             IAnjutaDebuggerGListCallback callback,
                                                             gpointer user_data,
                                                             GError **err);
    gboolean            ianjuta_debugger_register_write_register
                                                            (IAnjutaDebuggerRegister *obj,
                                                             IAnjutaDebuggerRegisterData *value,
                                                             GError **err);

## Description

This interface is used to examine and change values of CPU registers.

## Details

### IANJUTA_DEBUGGER_REGISTER_ERROR

    #define IANJUTA_DEBUGGER_REGISTER_ERROR ianjuta_debugger_register_error_quark()

### struct IAnjutaDebuggerRegisterData

    struct IAnjutaDebuggerRegisterData {
    	guint num;
    	gchar *name;
    	gchar *value;
    };

Defines a register data.

guint `num`; | register identifier
gchar *`name`; | register name
gchar *`value`; | register value

### struct IAnjutaDebuggerRegisterIface

    struct IAnjutaDebuggerRegisterIface {
    	IAnjutaDebuggerIface g_iface;

    	gboolean (*list_register) (IAnjutaDebuggerRegister *obj, IAnjutaDebuggerGListCallback callback,  gpointer user_data, GError **err);
    	gboolean (*update_register) (IAnjutaDebuggerRegister *obj, IAnjutaDebuggerGListCallback callback,  gpointer user_data, GError **err);
    	gboolean (*write_register) (IAnjutaDebuggerRegister *obj, IAnjutaDebuggerRegisterData *value, GError **err);
    };

### ianjuta_debugger_register_error_quark ()

    GQuark              ianjuta_debugger_register_error_quark
                                                            (void);

### ianjuta_debugger_register_list_register ()

    gboolean            ianjuta_debugger_register_list_register
                                                            (IAnjutaDebuggerRegister *obj,
                                                             IAnjutaDebuggerGListCallback callback,
                                                             gpointer user_data,
                                                             GError **err);

List all registers of the target. This function can be called without a program loaded, the value field of register structure is not filled.

`obj` : | Self
`callback` : | Callback to call with the IAnjutaDebuggerRegisterData list
`user_data` : | User data that is passed back to the callback
`err` : | Error propagation and reporting.
Returns : | TRUE if the request succeed and the callback is called. If FALSE, the callback will not be called.

### ianjuta_debugger_register_update_register ()

    gboolean            ianjuta_debugger_register_update_register
                                                            (IAnjutaDebuggerRegister *obj,
                                                             IAnjutaDebuggerGListCallback callback,
                                                             gpointer user_data,
                                                             GError **err);

Return all modified registers since the last call. Only the num and value field are used.

`obj` : | Self
`callback` : | Callback call with the list of all modified IAnjutaDebuggerRegisterData
`user_data` : | User data that is passed back to the callback
`err` : | Error propagation and reporting.
Returns : | TRUE if the request succeed and the callback is called. If FALSE, the callback will not be called.

### ianjuta_debugger_register_write_register ()

    gboolean            ianjuta_debugger_register_write_register
                                                            (IAnjutaDebuggerRegister *obj,
                                                             IAnjutaDebuggerRegisterData *value,
                                                             GError **err);

Change the value of one register. Only the num and value field are used.

`obj` : | Self
`value` : | Modified register with a new value
`err` : | Error propagation and reporting.
Returns : | TRUE if the request succeed.