IAnjutaDebuggerInstruction

## IAnjutaDebuggerInstruction IAnjutaDebuggerInstruction — Debugger interface for machine instruction |

## Stability Level

Unstable, unless otherwise indicated

## Synopsis

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

    #define             IANJUTA_DEBUGGER_INSTRUCTION_ERROR
    struct              IAnjutaDebuggerInstructionALine;
    struct              IAnjutaDebuggerInstructionDisassembly;
    void                (*IAnjutaDebuggerInstructionCallback)
                                                            (const IAnjutaDebuggerInstructionDisassembly *data,
                                                             gpointer user_data,
                                                             GError *err);
    struct              IAnjutaDebuggerInstructionIface;
    GQuark              ianjuta_debugger_instruction_error_quark
                                                            (void);
    gboolean            ianjuta_debugger_instruction_disassemble
                                                            (IAnjutaDebuggerInstruction *obj,
                                                             gulong address,
                                                             guint length,
                                                             IAnjutaDebuggerInstructionCallback callback,
                                                             gpointer user_data,
                                                             GError **err);
    gboolean            ianjuta_debugger_instruction_run_from_address
                                                            (IAnjutaDebuggerInstruction *obj,
                                                             gulong address,
                                                             GError **err);
    gboolean            ianjuta_debugger_instruction_run_to_address
                                                            (IAnjutaDebuggerInstruction *obj,
                                                             gulong address,
                                                             GError **err);
    gboolean            ianjuta_debugger_instruction_step_in_instruction
                                                            (IAnjutaDebuggerInstruction *obj,
                                                             GError **err);
    gboolean            ianjuta_debugger_instruction_step_over_instruction
                                                            (IAnjutaDebuggerInstruction *obj,
                                                             GError **err);

## Description

This interface is used to debuger as machine instruction level.

## Details

### IANJUTA_DEBUGGER_INSTRUCTION_ERROR

    #define IANJUTA_DEBUGGER_INSTRUCTION_ERROR ianjuta_debugger_instruction_error_quark()

### struct IAnjutaDebuggerInstructionALine

    struct IAnjutaDebuggerInstructionALine {
    	gulong address;
    	const gchar *label;
    	const gchar *text;
    };

Defines a disassembled line

gulong `address`; | Address of the line
const gchar *`label`; | Optional label
const gchar *`text`; | Diassembled instruction on the line

### struct IAnjutaDebuggerInstructionDisassembly

    struct IAnjutaDebuggerInstructionDisassembly {
    	guint size;
    	IAnjutaDebuggerInstructionALine data[];
    };

Represents a block of diassembled instructions

guint `size`; | Number of line
IAnjutaDebuggerInstructionALine `data`[]; | Array of all lines

### IAnjutaDebuggerInstructionCallback ()

    void                (*IAnjutaDebuggerInstructionCallback)
                                                            (const IAnjutaDebuggerInstructionDisassembly *data,
                                                             gpointer user_data,
                                                             GError *err);

This callback function is used to return a IAnjutaDebuggerInstructionDisassembly.

`data` : | a IAnjutaDebuggerInstructionDisassembly object
`user_data` : | user data passed to the function
`err` : | error

### struct IAnjutaDebuggerInstructionIface

    struct IAnjutaDebuggerInstructionIface {
    	IAnjutaDebuggerIface g_iface;

    	gboolean (*disassemble) (IAnjutaDebuggerInstruction *obj, gulong address,  guint length,  IAnjutaDebuggerInstructionCallback callback,  gpointer user_data, GError **err);
    	gboolean (*run_from_address) (IAnjutaDebuggerInstruction *obj, gulong address, GError **err);
    	gboolean (*run_to_address) (IAnjutaDebuggerInstruction *obj, gulong address, GError **err);
    	gboolean (*step_in_instruction) (IAnjutaDebuggerInstruction *obj, GError **err);
    	gboolean (*step_over_instruction) (IAnjutaDebuggerInstruction *obj, GError **err);
    };

### ianjuta_debugger_instruction_error_quark ()

    GQuark              ianjuta_debugger_instruction_error_quark
                                                            (void);

### ianjuta_debugger_instruction_disassemble ()

    gboolean            ianjuta_debugger_instruction_disassemble
                                                            (IAnjutaDebuggerInstruction *obj,
                                                             gulong address,
                                                             guint length,
                                                             IAnjutaDebuggerInstructionCallback callback,
                                                             gpointer user_data,
                                                             GError **err);

Disassemble a part of the memory

`obj` : | Self
`address` : | Start address of the memory block
`length` : | Length of memory block
`callback` : | Call back with a IAnjutaDebuggerInstructionDisassembly as argument
`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_instruction_run_from_address ()

    gboolean            ianjuta_debugger_instruction_run_from_address
                                                            (IAnjutaDebuggerInstruction *obj,
                                                             gulong address,
                                                             GError **err);

Restart the program starting from address address

`obj` : | Self
`address` : | Run from this addresss
`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_instruction_run_to_address ()

    gboolean            ianjuta_debugger_instruction_run_to_address
                                                            (IAnjutaDebuggerInstruction *obj,
                                                             gulong address,
                                                             GError **err);

Start the program until it reachs the address address

`obj` : | Self
`address` : | Run to this addresss
`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_instruction_step_in_instruction ()

    gboolean            ianjuta_debugger_instruction_step_in_instruction
                                                            (IAnjutaDebuggerInstruction *obj,
                                                             GError **err);

Execute one assembler instruction in the program.

`obj` : | Self
`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_instruction_step_over_instruction ()

    gboolean            ianjuta_debugger_instruction_step_over_instruction
                                                            (IAnjutaDebuggerInstruction *obj,
                                                             GError **err);

Execute one assembler instruction in the program, if the instruction is a function call, continues until the function returns.

`obj` : | Self
`err` : | Error propagation and reporting.
Returns : | TRUE if the request succeed and the callback is called. If FALSE, the callback will not be called.