Next: , Up: Assembler Programs   [Contents][Index]


5.1 Basic Datatypes

A program handle refers to a memory representation of an assembler program.

Data type: qsmm_prg_t

This is a type for a program handle. It is a pointer, so variables of this type can be NULL. The functions qsmm_node_disasm, qsmm_parse_asm_source_buf, qsmm_parse_asm_source_stream, and qsmm_parse_asm_source_file allocate a new program handle. The function qsmm_prg_destroy frees an existing program handle. You can pass a program handle to API functions taking an argument of qsmm_prg_t type until freeing the handle.

Use the following function to destroy a memory representation of an assembler program.

Function: void qsmm_prg_destroy (qsmm_prg_t prg)

This function destroys a memory representation of an assembler program specified by a handle prg. You must not use the handle after the destruction of this memory representation. If prg is NULL, the function has no effect.

QSMM provides limited capabilities for working with assembler instructions contained in a memory representation of an assembler program. An instruction handle refers to an assembler instruction.

Data type: qsmm_instr_t

This is a type for an instruction handle. It is a pointer, so variables of this type can be NULL. The functions qsmm_get_prg_instr and qsmm_get_instr_nested (see Inspecting an Assembler Program) return the handle of an existing instruction.