## IAnjutaDebuggerBreakpoint

IAnjutaDebuggerBreakpoint — Breakpoint Debugger interface

## Stability Level

Unstable, unless otherwise indicated

## Synopsis

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

    #define             IANJUTA_TYPE_DEBUGGER_BREAKPOINT_METHOD
    #define             IANJUTA_TYPE_DEBUGGER_BREAKPOINT_TYPE
    #define             IANJUTA_DEBUGGER_BREAKPOINT_ERROR
                        IAnjutaDebuggerBreakpoint;
                        IAnjutaDebuggerBreakpointIface;
    enum                IAnjutaDebuggerBreakpointMethod;
    enum                IAnjutaDebuggerBreakpointType;
                        IAnjutaDebuggerBreakpointItem;
    GType               ianjuta_debugger_breakpoint_type_get_type
                                                            (void);
    GQuark              ianjuta_debugger_breakpoint_error_quark
                                                            (void);
    GType               ianjuta_debugger_breakpoint_get_type
                                                            (void);
    gboolean            ianjuta_debugger_breakpoint_clear_breakpoint
                                                            (IAnjutaDebuggerBreakpoint *obj,
                                                             guint id,
                                                             IAnjutaDebuggerCallback callback,
                                                             gpointer user_data,
                                                             GError **err);
    gboolean            ianjuta_debugger_breakpoint_condition_breakpoint
                                                            (IAnjutaDebuggerBreakpoint *obj,
                                                             guint id,
                                                             const gchar *condition,
                                                             IAnjutaDebuggerCallback callback,
                                                             gpointer user_data,
                                                             GError **err);
    gboolean            ianjuta_debugger_breakpoint_enable_breakpoint
                                                            (IAnjutaDebuggerBreakpoint *obj,
                                                             guint id,
                                                             gboolean enable,
                                                             IAnjutaDebuggerCallback callback,
                                                             gpointer user_data,
                                                             GError **err);
    gboolean            ianjuta_debugger_breakpoint_ignore_breakpoint
                                                            (IAnjutaDebuggerBreakpoint *obj,
                                                             guint id,
                                                             guint ignore,
                                                             IAnjutaDebuggerCallback callback,
                                                             gpointer user_data,
                                                             GError **err);
    gint                ianjuta_debugger_breakpoint_implement_breakpoint
                                                            (IAnjutaDebuggerBreakpoint *obj,
                                                             GError **err);
    gboolean            ianjuta_debugger_breakpoint_list_breakpoint
                                                            (IAnjutaDebuggerBreakpoint *obj,
                                                             IAnjutaDebuggerCallback callback,
                                                             gpointer user_data,
                                                             GError **err);
    gboolean            ianjuta_debugger_breakpoint_set_breakpoint_at_address
                                                            (IAnjutaDebuggerBreakpoint *obj,
                                                             gulong address,
                                                             IAnjutaDebuggerCallback callback,
                                                             gpointer user_data,
                                                             GError **err);
    gboolean            ianjuta_debugger_breakpoint_set_breakpoint_at_function
                                                            (IAnjutaDebuggerBreakpoint *obj,
                                                             const gchar *file,
                                                             const gchar *function,
                                                             IAnjutaDebuggerCallback callback,
                                                             gpointer user_data,
                                                             GError **err);
    gboolean            ianjuta_debugger_breakpoint_set_breakpoint_at_line
                                                            (IAnjutaDebuggerBreakpoint *obj,
                                                             const gchar *file,
                                                             guint line,
                                                             IAnjutaDebuggerCallback callback,
                                                             gpointer user_data,
                                                             GError **err);

## Object Hierarchy

      GInterface
       +----IAnjutaDebuggerBreakpoint

## Prerequisites

IAnjutaDebuggerBreakpoint requires IAnjutaDebugger and GObject.

## Description

## Details

### IANJUTA_TYPE_DEBUGGER_BREAKPOINT_METHOD

    #define IANJUTA_TYPE_DEBUGGER_BREAKPOINT_METHOD (ianjuta_debugger_breakpoint_method_get_type())

### IANJUTA_TYPE_DEBUGGER_BREAKPOINT_TYPE

    #define IANJUTA_TYPE_DEBUGGER_BREAKPOINT_TYPE (ianjuta_debugger_breakpoint_type_get_type())

### IANJUTA_DEBUGGER_BREAKPOINT_ERROR

    #define IANJUTA_DEBUGGER_BREAKPOINT_ERROR ianjuta_debugger_breakpoint_error_quark()

### IAnjutaDebuggerBreakpoint

    typedef struct _IAnjutaDebuggerBreakpoint IAnjutaDebuggerBreakpoint;

### IAnjutaDebuggerBreakpointIface

    typedef struct {
    	IAnjutaDebuggerIface g_iface;

    	gboolean (*clear_breakpoint) (IAnjutaDebuggerBreakpoint *obj, guint id,  IAnjutaDebuggerCallback callback,  gpointer user_data, GError **err);
    	gboolean (*condition_breakpoint) (IAnjutaDebuggerBreakpoint *obj, guint id,  const gchar* condition,  IAnjutaDebuggerCallback callback,  gpointer user_data, GError **err);
    	gboolean (*enable_breakpoint) (IAnjutaDebuggerBreakpoint *obj, guint id,  gboolean enable,  IAnjutaDebuggerCallback callback,  gpointer user_data, GError **err);
    	gboolean (*ignore_breakpoint) (IAnjutaDebuggerBreakpoint *obj, guint id,  guint ignore,  IAnjutaDebuggerCallback callback,  gpointer user_data, GError **err);
    	gint (*implement_breakpoint) (IAnjutaDebuggerBreakpoint *obj, GError **err);
    	gboolean (*list_breakpoint) (IAnjutaDebuggerBreakpoint *obj, IAnjutaDebuggerCallback callback,  gpointer user_data, GError **err);
    	gboolean (*set_breakpoint_at_address) (IAnjutaDebuggerBreakpoint *obj, gulong address,  IAnjutaDebuggerCallback callback,  gpointer user_data, GError **err);
    	gboolean (*set_breakpoint_at_function) (IAnjutaDebuggerBreakpoint *obj, const gchar* file,  const gchar* function,  IAnjutaDebuggerCallback callback,  gpointer user_data, GError **err);
    	gboolean (*set_breakpoint_at_line) (IAnjutaDebuggerBreakpoint *obj, const gchar* file,  guint line,  IAnjutaDebuggerCallback callback,  gpointer user_data, GError **err);
    } IAnjutaDebuggerBreakpointIface;

### enum IAnjutaDebuggerBreakpointMethod

    typedef enum {
    	IANJUTA_DEBUGGER_BREAKPOINT_SET_AT_ADDRESS = 1 << 0,
    	IANJUTA_DEBUGGER_BREAKPOINT_SET_AT_FUNCTION = 1 << 1,
    	IANJUTA_DEBUGGER_BREAKPOINT_ENABLE = 1 << 2,
    	IANJUTA_DEBUGGER_BREAKPOINT_IGNORE = 1 << 3,
    	IANJUTA_DEBUGGER_BREAKPOINT_CONDITION = 1 << 4
    } IAnjutaDebuggerBreakpointMethod;

### enum IAnjutaDebuggerBreakpointType

    typedef enum {
    	IANJUTA_DEBUGGER_BREAKPOINT_REMOVED = 1 << 0,
    	IANJUTA_DEBUGGER_BREAKPOINT_UPDATED = 1 << 17,
    	IANJUTA_DEBUGGER_BREAKPOINT_ON_LINE = 1 << 1,
    	IANJUTA_DEBUGGER_BREAKPOINT_ON_ADDRESS = 1 << 2,
    	IANJUTA_DEBUGGER_BREAKPOINT_ON_FUNCTION = 1 << 3,
    	IANJUTA_DEBUGGER_BREAKPOINT_ON_READ = 1 << 4,
    	IANJUTA_DEBUGGER_BREAKPOINT_ON_WRITE = 1 << 5,
    	IANJUTA_DEBUGGER_BREAKPOINT_WITH_ENABLE = 1 << 16,
    	IANJUTA_DEBUGGER_BREAKPOINT_WITH_IGNORE = 1 << 15,
    	IANJUTA_DEBUGGER_BREAKPOINT_WITH_TIME = 1 << 11,
    	IANJUTA_DEBUGGER_BREAKPOINT_WITH_CONDITION = 1 << 12,
    	IANJUTA_DEBUGGER_BREAKPOINT_WITH_TEMPORARY = 1 << 13
    } IAnjutaDebuggerBreakpointType;

### IAnjutaDebuggerBreakpointItem

    typedef struct {
    	gint type;
    	guint id;
    	gchar *file;
    	guint line;
    	gchar *function;
    	gulong address;
    	gboolean enable;
    	guint ignore;
    	guint times;
    	gchar *condition;
    	gboolean temporary;
    } IAnjutaDebuggerBreakpointItem;

### ianjuta_debugger_breakpoint_type_get_type ()

    GType               ianjuta_debugger_breakpoint_type_get_type
                                                            (void);

Returns : |

### ianjuta_debugger_breakpoint_error_quark ()

    GQuark              ianjuta_debugger_breakpoint_error_quark
                                                            (void);

Returns : |

### ianjuta_debugger_breakpoint_get_type ()

    GType               ianjuta_debugger_breakpoint_get_type
                                                            (void);

Returns : |

### ianjuta_debugger_breakpoint_clear_breakpoint ()

    gboolean            ianjuta_debugger_breakpoint_clear_breakpoint
                                                            (IAnjutaDebuggerBreakpoint *obj,
                                                             guint id,
                                                             IAnjutaDebuggerCallback callback,
                                                             gpointer user_data,
                                                             GError **err);

Clear a breakpoint put by any set functions. The Id of the breakpoint is given in the callback of the set functions.

`obj` : | Self
`id` : | Breakpoint identification number
`callback` : | Callback to call when the breakpoint has been cleared
`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_breakpoint_condition_breakpoint ()

    gboolean            ianjuta_debugger_breakpoint_condition_breakpoint
                                                            (IAnjutaDebuggerBreakpoint *obj,
                                                             guint id,
                                                             const gchar *condition,
                                                             IAnjutaDebuggerCallback callback,
                                                             gpointer user_data,
                                                             GError **err);

Add a condition, evaluate in the program context, on the breakpoint, the program will stop when it reachs the breakpoint only if the condition is true. This function is optional.

`obj` : | Self
`id` : | Breakpoint identification number
`condition` : | expression that has to be true
`callback` : | Callback to call when the breakpoint has been changed
`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_breakpoint_enable_breakpoint ()

    gboolean            ianjuta_debugger_breakpoint_enable_breakpoint
                                                            (IAnjutaDebuggerBreakpoint *obj,
                                                             guint id,
                                                             gboolean enable,
                                                             IAnjutaDebuggerCallback callback,
                                                             gpointer user_data,
                                                             GError **err);

Enable of disable a breakpoint. This function is optional.

`obj` : | Self
`id` : | Breakpoint identification number
`enable` : | TRUE to enable the breakpoint, FALSE to disable it
`callback` : | Callback to call when the breakpoint has been changed
`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_breakpoint_ignore_breakpoint ()

    gboolean            ianjuta_debugger_breakpoint_ignore_breakpoint
                                                            (IAnjutaDebuggerBreakpoint *obj,
                                                             guint id,
                                                             guint ignore,
                                                             IAnjutaDebuggerCallback callback,
                                                             gpointer user_data,
                                                             GError **err);

This allow to ignore the breakpoint a number of time before stopping. This function is optional.

`obj` : | Self
`id` : | Breakpoint identification number
`ignore` : | Number of time a breakpoint must be ignored
`callback` : | Callback to call when the breakpoint has been changed
`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_breakpoint_implement_breakpoint ()

    gint                ianjuta_debugger_breakpoint_implement_breakpoint
                                                            (IAnjutaDebuggerBreakpoint *obj,
                                                             GError **err);

Return all implemented methods.

`obj` : | Self
`err` : | Error propagation and reporting.
Returns : | A OR of IAnjutaDebuggerBreakpointMethod corresponding to all implemented optional methods.

### ianjuta_debugger_breakpoint_list_breakpoint ()

    gboolean            ianjuta_debugger_breakpoint_list_breakpoint
                                                            (IAnjutaDebuggerBreakpoint *obj,
                                                             IAnjutaDebuggerCallback callback,
                                                             gpointer user_data,
                                                             GError **err);

List all breakpoints set in the debugger. It is useful to know how many time a breakpoint has been hit.

`obj` : | Self
`callback` : | Callback to call with the list of breakpoints
`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_breakpoint_set_breakpoint_at_address ()

    gboolean            ianjuta_debugger_breakpoint_set_breakpoint_at_address
                                                            (IAnjutaDebuggerBreakpoint *obj,
                                                             gulong address,
                                                             IAnjutaDebuggerCallback callback,
                                                             gpointer user_data,
                                                             GError **err);

Set a breakpoint at the specified address. This function is optional.

`obj` : | Self
`address` : | Address of the breakpoint
`callback` : | Callback to call when the breakpoint has been set
`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_breakpoint_set_breakpoint_at_function ()

    gboolean            ianjuta_debugger_breakpoint_set_breakpoint_at_function
                                                            (IAnjutaDebuggerBreakpoint *obj,
                                                             const gchar *file,
                                                             const gchar *function,
                                                             IAnjutaDebuggerCallback callback,
                                                             gpointer user_data,
                                                             GError **err);

Set a breakpoint at the beginning of the specified function. This function is optional.

`obj` : | Self
`file` : | File containing the breakpoint
`function` : | Function name where the breakpoint is put
`callback` : | Callback to call when the breakpoint has been set
`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_breakpoint_set_breakpoint_at_line ()

    gboolean            ianjuta_debugger_breakpoint_set_breakpoint_at_line
                                                            (IAnjutaDebuggerBreakpoint *obj,
                                                             const gchar *file,
                                                             guint line,
                                                             IAnjutaDebuggerCallback callback,
                                                             gpointer user_data,
                                                             GError **err);

Set a breakpoint at the specified line in the file.

`obj` : | Self
`file` : | File containing the breakpoint
`line` : | Line number where is the breakpoint
`callback` : | Callback to call when the breakpoint has been set
`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.