GDB (API)
Defines | Typedefs | Enumerations | Functions | Variables
/home/stan/gdb/src/gdb/ada-lang.c File Reference
#include "defs.h"
#include <stdio.h>
#include "gdb_string.h"
#include <ctype.h>
#include <stdarg.h>
#include "demangle.h"
#include "gdb_regex.h"
#include "frame.h"
#include "symtab.h"
#include "gdbtypes.h"
#include "gdbcmd.h"
#include "expression.h"
#include "parser-defs.h"
#include "language.h"
#include "c-lang.h"
#include "inferior.h"
#include "symfile.h"
#include "objfiles.h"
#include "breakpoint.h"
#include "gdbcore.h"
#include "hashtab.h"
#include "gdb_obstack.h"
#include "ada-lang.h"
#include "completer.h"
#include "gdb_stat.h"
#include "block.h"
#include "infcall.h"
#include "dictionary.h"
#include "exceptions.h"
#include "annotate.h"
#include "valprint.h"
#include "source.h"
#include "observer.h"
#include "vec.h"
#include "stack.h"
#include "gdb_vecs.h"
#include "typeprint.h"
#include "psymtab.h"
#include "value.h"
#include "mi/mi-common.h"
#include "arch-utils.h"
#include "cli/cli-utils.h"

Go to the source code of this file.

Defines

#define TRUNCATION_TOWARDS_ZERO   ((-5 / 2) == -2)
#define MAX_ADA_DIMENS   (sizeof(bound_name) / (2*sizeof(char *)))
#define ADA_OPERATORS
#define OP_DEFN(op, len, args, binop)   case op: *oplenp = len; *argsp = args; break;
#define OP_DEFN(op, len, args, binop)   case op: return #op;
#define OP_DEFN(op, len, args, binop)   case op: *oplenp = len; *argsp = args; break;

Typedefs

typedef CORE_ADDRada_unhandled_exception_name_addr_ftype )(void)

Enumerations

enum  ada_primitive_types {
  ada_primitive_type_int, ada_primitive_type_long, ada_primitive_type_short, ada_primitive_type_char,
  ada_primitive_type_float, ada_primitive_type_double, ada_primitive_type_void, ada_primitive_type_long_long,
  ada_primitive_type_long_double, ada_primitive_type_natural, ada_primitive_type_positive, ada_primitive_type_system_address,
  nr_ada_primitive_types
}

Functions

void * grow_vect (void *vect, size_t *size, size_t min_size, int element_size)
int ada_get_field_index (const struct type *type, const char *field_name, int maybe_missing)
int ada_name_prefix_len (const char *name)
LONGEST ada_discrete_type_high_bound (struct type *type)
LONGEST ada_discrete_type_low_bound (struct type *type)
struct value * ada_get_decoded_value (struct value *value)
struct typeada_get_decoded_type (struct type *type)
enum language ada_update_initial_language (enum language lang)
char * ada_main_name (void)
char * ada_encode (const char *decoded)
char * ada_fold_name (const char *name)
const char * ada_decode (const char *encoded)
const char * ada_decode_symbol (const struct general_symbol_info *arg)
void ada_fixup_array_indexes_type (struct type *index_desc_type)
int ada_is_simple_array_type (struct type *type)
int ada_is_array_descriptor_type (struct type *type)
int ada_is_bogus_array_descriptor (struct type *type)
struct typeada_type_of_array (struct value *arr, int bounds)
struct value * ada_coerce_to_simple_array_ptr (struct value *arr)
struct value * ada_coerce_to_simple_array (struct value *arr)
struct typeada_coerce_to_simple_array_type (struct type *type)
int ada_is_constrained_packed_array_type (struct type *type)
struct value * ada_value_primitive_packed_val (struct value *obj, const gdb_byte *valaddr, long offset, int bit_offset, int bit_size, struct type *type)
struct value * ada_value_subscript (struct value *arr, int arity, struct value **ind)
int ada_array_arity (struct type *type)
struct typeada_array_element_type (struct type *type, int nindices)
int user_select_syms (struct ada_symbol_info *syms, int nsyms, int max_results)
int get_selections (int *choices, int n_choices, int max_results, int is_all_choice, char *annotation_suffix)
enum ada_renaming_category ada_parse_renaming (struct symbol *sym, const char **renamed_entity, int *len, const char **renaming_expr)
struct value * ada_convert_actual (struct value *actual, struct type *formal_type0)
struct bound_minimal_symbol ada_lookup_simple_minsym (const char *name)
int ada_lookup_symbol_list (const char *name0, const struct block *block0, domain_enum domain, struct ada_symbol_info **results)
char * ada_name_for_lookup (const char *name)
void ada_lookup_encoded_symbol (const char *name, const struct block *block, domain_enum namespace, struct ada_symbol_info *info)
struct symbolada_lookup_symbol (const char *name, const struct block *block0, domain_enum namespace, int *is_a_field_of_this)
int ada_is_ignored_field (struct type *type, int field_num)
int ada_is_tagged_type (struct type *type, int refok)
int ada_is_tag_type (struct type *type)
struct typeada_tag_type (struct value *val)
struct value * ada_value_tag (struct value *val)
struct value * ada_tag_value_at_base_address (struct value *obj)
const char * ada_tag_name (struct value *tag)
struct typeada_parent_type (struct type *type)
int ada_is_parent_field (struct type *type, int field_num)
int ada_is_wrapper_field (struct type *type, int field_num)
int ada_is_variant_part (struct type *type, int field_num)
struct typeada_variant_discrim_type (struct type *var_type, struct type *outer_type)
int ada_is_others_clause (struct type *type, int field_num)
char * ada_variant_discrim_name (struct type *type0)
int ada_scan_number (const char str[], int k, LONGEST *R, int *new_k)
int ada_in_variant (LONGEST val, struct type *type, int field_num)
struct value * ada_value_struct_elt (struct value *arg, char *name, int no_err)
int ada_which_variant_applies (struct type *var_type, struct type *outer_type, const gdb_byte *outer_valaddr)
struct value * ada_value_ind (struct value *val0)
struct symbolada_find_renaming_symbol (struct symbol *name_sym, const struct block *block)
int ada_prefer_type (struct type *type0, struct type *type1)
const char * ada_type_name (struct type *type)
struct typeada_find_parallel_type (struct type *type, const char *suffix)
struct typeada_template_to_fixed_record_type_1 (struct type *type, const gdb_byte *valaddr, CORE_ADDR address, struct value *dval0, int keep_dynamic_fields)
struct typeada_to_fixed_type (struct type *type, const gdb_byte *valaddr, CORE_ADDR address, struct value *dval, int check_tag)
struct typeada_check_typedef (struct type *type)
struct value * ada_to_fixed_value (struct value *val)
const char * ada_attribute_name (enum exp_opcode n)
int ada_is_character_type (struct type *type)
int ada_is_string_type (struct type *type)
int ada_is_aligner_type (struct type *type)
struct typeada_get_base_type (struct type *raw_type)
struct typeada_aligned_type (struct type *type)
const gdb_byteada_aligned_value_addr (struct type *type, const gdb_byte *valaddr)
const char * ada_enum_name (const char *name)
int ada_is_fixed_point_type (struct type *type)
int ada_is_system_address_type (struct type *type)
DOUBLEST ada_delta (struct type *type)
DOUBLEST ada_fixed_to_float (struct type *type, LONGEST x)
LONGEST ada_float_to_fixed (struct type *type, DOUBLEST x)
LONGEST get_int_var_value (char *name, int *flag)
int ada_is_range_type_name (const char *name)
int ada_is_modular_type (struct type *type)
ULONGEST ada_modulus (struct type *type)
void ada_find_printable_frame (struct frame_info *fi)
void create_ada_exception_catchpoint (struct gdbarch *gdbarch, enum ada_exception_catchpoint_kind ex_kind, char *excep_string, char *cond_string, int tempflag, int disabled, int from_tty)
void _initialize_ada_language (void)

Variables

struct ada_opname_map ada_opname_table []
struct language_defn ada_language_defn
initialize_file_ftype _initialize_ada_language

Define Documentation

#define ADA_OPERATORS
Value:
OP_DEFN (OP_VAR_VALUE, 4, 0, 0) \
    OP_DEFN (BINOP_IN_BOUNDS, 3, 2, 0) \
    OP_DEFN (TERNOP_IN_RANGE, 1, 3, 0) \
    OP_DEFN (OP_ATR_FIRST, 1, 2, 0) \
    OP_DEFN (OP_ATR_LAST, 1, 2, 0) \
    OP_DEFN (OP_ATR_LENGTH, 1, 2, 0) \
    OP_DEFN (OP_ATR_IMAGE, 1, 2, 0) \
    OP_DEFN (OP_ATR_MAX, 1, 3, 0) \
    OP_DEFN (OP_ATR_MIN, 1, 3, 0) \
    OP_DEFN (OP_ATR_MODULUS, 1, 1, 0) \
    OP_DEFN (OP_ATR_POS, 1, 2, 0) \
    OP_DEFN (OP_ATR_SIZE, 1, 1, 0) \
    OP_DEFN (OP_ATR_TAG, 1, 1, 0) \
    OP_DEFN (OP_ATR_VAL, 1, 2, 0) \
    OP_DEFN (UNOP_QUAL, 3, 1, 0) \
    OP_DEFN (UNOP_IN_RANGE, 3, 1, 0) \
    OP_DEFN (OP_OTHERS, 1, 1, 0) \
    OP_DEFN (OP_POSITIONAL, 3, 1, 0) \
    OP_DEFN (OP_DISCRETE_RANGE, 1, 2, 0)

Definition at line 12287 of file ada-lang.c.

#define MAX_ADA_DIMENS   (sizeof(bound_name) / (2*sizeof(char *)))

Definition at line 1433 of file ada-lang.c.

#define OP_DEFN (   op,
  len,
  args,
  binop 
)    case op: *oplenp = len; *argsp = args; break;
#define OP_DEFN (   op,
  len,
  args,
  binop 
)    case op: return #op;
#define OP_DEFN (   op,
  len,
  args,
  binop 
)    case op: *oplenp = len; *argsp = args; break;
#define TRUNCATION_TOWARDS_ZERO   ((-5 / 2) == -2)

Definition at line 74 of file ada-lang.c.


Typedef Documentation

Definition at line 10993 of file ada-lang.c.


Enumeration Type Documentation

Enumerator:
ada_primitive_type_int 
ada_primitive_type_long 
ada_primitive_type_short 
ada_primitive_type_char 
ada_primitive_type_float 
ada_primitive_type_double 
ada_primitive_type_void 
ada_primitive_type_long_long 
ada_primitive_type_long_double 
ada_primitive_type_natural 
ada_primitive_type_positive 
ada_primitive_type_system_address 
nr_ada_primitive_types 

Definition at line 12671 of file ada-lang.c.


Function Documentation

void _initialize_ada_language ( void  )

Definition at line 12907 of file ada-lang.c.

struct type* ada_aligned_type ( struct type type) [read]

Definition at line 8670 of file ada-lang.c.

const gdb_byte* ada_aligned_value_addr ( struct type type,
const gdb_byte valaddr 
)

Definition at line 8683 of file ada-lang.c.

int ada_array_arity ( struct type type)

Definition at line 2678 of file ada-lang.c.

struct type* ada_array_element_type ( struct type type,
int  nindices 
) [read]

Definition at line 2706 of file ada-lang.c.

const char* ada_attribute_name ( enum exp_opcode  n)

Definition at line 8478 of file ada-lang.c.

struct type* ada_check_typedef ( struct type type) [read]

Definition at line 8384 of file ada-lang.c.

struct value* ada_coerce_to_simple_array ( struct value *  arr) [read]

Definition at line 1935 of file ada-lang.c.

struct value* ada_coerce_to_simple_array_ptr ( struct value *  arr) [read]

Definition at line 1914 of file ada-lang.c.

struct type* ada_coerce_to_simple_array_type ( struct type type) [read]

Definition at line 1957 of file ada-lang.c.

struct value* ada_convert_actual ( struct value *  actual,
struct type formal_type0 
) [read]

Definition at line 4103 of file ada-lang.c.

const char* ada_decode ( const char *  encoded)

Definition at line 1036 of file ada-lang.c.

Definition at line 1300 of file ada-lang.c.

DOUBLEST ada_delta ( struct type type)

Definition at line 10665 of file ada-lang.c.

Definition at line 687 of file ada-lang.c.

Definition at line 707 of file ada-lang.c.

char* ada_encode ( const char *  decoded)

Definition at line 869 of file ada-lang.c.

const char* ada_enum_name ( const char *  name)

Definition at line 8699 of file ada-lang.c.

struct type* ada_find_parallel_type ( struct type type,
const char *  suffix 
) [read]

Definition at line 7480 of file ada-lang.c.

void ada_find_printable_frame ( struct frame_info *  fi)

Definition at line 11225 of file ada-lang.c.

struct symbol* ada_find_renaming_symbol ( struct symbol name_sym,
const struct block block 
) [read]

Definition at line 7290 of file ada-lang.c.

DOUBLEST ada_fixed_to_float ( struct type type,
LONGEST  x 
)

Definition at line 10711 of file ada-lang.c.

void ada_fixup_array_indexes_type ( struct type index_desc_type)

Definition at line 1393 of file ada-lang.c.

LONGEST ada_float_to_fixed ( struct type type,
DOUBLEST  x 
)

Definition at line 10720 of file ada-lang.c.

char* ada_fold_name ( const char *  name)

Definition at line 921 of file ada-lang.c.

struct type* ada_get_base_type ( struct type raw_type) [read]

Definition at line 8622 of file ada-lang.c.

struct type* ada_get_decoded_type ( struct type type) [read]

Definition at line 771 of file ada-lang.c.

struct value* ada_get_decoded_value ( struct value *  value) [read]

Definition at line 746 of file ada-lang.c.

int ada_get_field_index ( const struct type type,
const char *  field_name,
int  maybe_missing 
)

Definition at line 504 of file ada-lang.c.

int ada_in_variant ( LONGEST  val,
struct type type,
int  field_num 
)

Definition at line 6561 of file ada-lang.c.

int ada_is_aligner_type ( struct type type)

Definition at line 8606 of file ada-lang.c.

Definition at line 1798 of file ada-lang.c.

Definition at line 1816 of file ada-lang.c.

int ada_is_character_type ( struct type type)

Definition at line 8549 of file ada-lang.c.

Definition at line 1986 of file ada-lang.c.

int ada_is_fixed_point_type ( struct type type)

Definition at line 10646 of file ada-lang.c.

int ada_is_ignored_field ( struct type type,
int  field_num 
)

Definition at line 6049 of file ada-lang.c.

int ada_is_modular_type ( struct type type)

Definition at line 10940 of file ada-lang.c.

int ada_is_others_clause ( struct type type,
int  field_num 
)

Definition at line 6453 of file ada-lang.c.

int ada_is_parent_field ( struct type type,
int  field_num 
)

Definition at line 6393 of file ada-lang.c.

int ada_is_range_type_name ( const char *  name)

Definition at line 10929 of file ada-lang.c.

int ada_is_simple_array_type ( struct type type)

Definition at line 1784 of file ada-lang.c.

int ada_is_string_type ( struct type type)

Definition at line 8573 of file ada-lang.c.

int ada_is_system_address_type ( struct type type)

Definition at line 10654 of file ada-lang.c.

int ada_is_tag_type ( struct type type)

Definition at line 6098 of file ada-lang.c.

int ada_is_tagged_type ( struct type type,
int  refok 
)

Definition at line 6090 of file ada-lang.c.

int ada_is_variant_part ( struct type type,
int  field_num 
)

Definition at line 6425 of file ada-lang.c.

int ada_is_wrapper_field ( struct type type,
int  field_num 
)

Definition at line 6409 of file ada-lang.c.

void ada_lookup_encoded_symbol ( const char *  name,
const struct block block,
domain_enum  namespace,
struct ada_symbol_info info 
)

Definition at line 5297 of file ada-lang.c.

struct bound_minimal_symbol ada_lookup_simple_minsym ( const char *  name) [read]

Definition at line 4415 of file ada-lang.c.

struct symbol* ada_lookup_symbol ( const char *  name,
const struct block block0,
domain_enum  namespace,
int is_a_field_of_this 
) [read]

Definition at line 5322 of file ada-lang.c.

int ada_lookup_symbol_list ( const char *  name0,
const struct block block0,
domain_enum  domain,
struct ada_symbol_info **  results 
)

Definition at line 5239 of file ada-lang.c.

char* ada_main_name ( void  )

Definition at line 801 of file ada-lang.c.

ULONGEST ada_modulus ( struct type type)

Definition at line 10952 of file ada-lang.c.

char* ada_name_for_lookup ( const char *  name)

Definition at line 5273 of file ada-lang.c.

int ada_name_prefix_len ( const char *  name)

Definition at line 524 of file ada-lang.c.

struct type* ada_parent_type ( struct type type) [read]

Definition at line 6362 of file ada-lang.c.

enum ada_renaming_category ada_parse_renaming ( struct symbol sym,
const char **  renamed_entity,
int len,
const char **  renaming_expr 
)

Definition at line 3931 of file ada-lang.c.

int ada_prefer_type ( struct type type0,
struct type type1 
)

Definition at line 7371 of file ada-lang.c.

int ada_scan_number ( const char  str[],
int  k,
LONGEST R,
int new_k 
)

Definition at line 6519 of file ada-lang.c.

const char* ada_tag_name ( struct value *  tag)

Definition at line 6331 of file ada-lang.c.

struct type* ada_tag_type ( struct value *  val) [read]

Definition at line 6114 of file ada-lang.c.

struct value* ada_tag_value_at_base_address ( struct value *  obj) [read]

Definition at line 6178 of file ada-lang.c.

struct type* ada_template_to_fixed_record_type_1 ( struct type type,
const gdb_byte valaddr,
CORE_ADDR  address,
struct value *  dval0,
int  keep_dynamic_fields 
) [read]

Definition at line 7588 of file ada-lang.c.

struct type* ada_to_fixed_type ( struct type type,
const gdb_byte valaddr,
CORE_ADDR  address,
struct value *  dval,
int  check_tag 
) [read]

Definition at line 8278 of file ada-lang.c.

struct value* ada_to_fixed_value ( struct value *  val) [read]

Definition at line 8445 of file ada-lang.c.

const char* ada_type_name ( struct type type)

Definition at line 7404 of file ada-lang.c.

struct type* ada_type_of_array ( struct value *  arr,
int  bounds 
) [read]

Definition at line 1835 of file ada-lang.c.

Definition at line 787 of file ada-lang.c.

struct value* ada_value_ind ( struct value *  val0) [read]

Definition at line 7182 of file ada-lang.c.

struct value* ada_value_primitive_packed_val ( struct value *  obj,
const gdb_byte valaddr,
long  offset,
int  bit_offset,
int  bit_size,
struct type type 
) [read]

Definition at line 2271 of file ada-lang.c.

struct value* ada_value_struct_elt ( struct value *  arg,
char *  name,
int  no_err 
) [read]

Definition at line 6861 of file ada-lang.c.

struct value* ada_value_subscript ( struct value *  arr,
int  arity,
struct value **  ind 
) [read]

Definition at line 2590 of file ada-lang.c.

struct value* ada_value_tag ( struct value *  val) [read]

Definition at line 6131 of file ada-lang.c.

char* ada_variant_discrim_name ( struct type type0)

Definition at line 6465 of file ada-lang.c.

struct type* ada_variant_discrim_type ( struct type var_type,
struct type outer_type 
) [read]

Definition at line 6441 of file ada-lang.c.

int ada_which_variant_applies ( struct type var_type,
struct type outer_type,
const gdb_byte outer_valaddr 
)

Definition at line 7112 of file ada-lang.c.

void create_ada_exception_catchpoint ( struct gdbarch *  gdbarch,
enum ada_exception_catchpoint_kind  ex_kind,
char *  excep_string,
char *  cond_string,
int  tempflag,
int  disabled,
int  from_tty 
)

Definition at line 12184 of file ada-lang.c.

LONGEST get_int_var_value ( char *  name,
int flag 
)

Definition at line 10802 of file ada-lang.c.

int get_selections ( int choices,
int  n_choices,
int  max_results,
int  is_all_choice,
char *  annotation_suffix 
)

Definition at line 3644 of file ada-lang.c.

void* grow_vect ( void *  vect,
size_t *  size,
size_t  min_size,
int  element_size 
)

Definition at line 466 of file ada-lang.c.

int user_select_syms ( struct ada_symbol_info syms,
int  nsyms,
int  max_results 
)

Definition at line 3527 of file ada-lang.c.


Variable Documentation

Definition at line 12799 of file ada-lang.c.

Initial value:
 {
  {"Oadd", "\"+\"", BINOP_ADD},
  {"Osubtract", "\"-\"", BINOP_SUB},
  {"Omultiply", "\"*\"", BINOP_MUL},
  {"Odivide", "\"/\"", BINOP_DIV},
  {"Omod", "\"mod\"", BINOP_MOD},
  {"Orem", "\"rem\"", BINOP_REM},
  {"Oexpon", "\"**\"", BINOP_EXP},
  {"Olt", "\"<\"", BINOP_LESS},
  {"Ole", "\"<=\"", BINOP_LEQ},
  {"Ogt", "\">\"", BINOP_GTR},
  {"Oge", "\">=\"", BINOP_GEQ},
  {"Oeq", "\"=\"", BINOP_EQUAL},
  {"One", "\"/=\"", BINOP_NOTEQUAL},
  {"Oand", "\"and\"", BINOP_BITWISE_AND},
  {"Oor", "\"or\"", BINOP_BITWISE_IOR},
  {"Oxor", "\"xor\"", BINOP_BITWISE_XOR},
  {"Oconcat", "\"&\"", BINOP_CONCAT},
  {"Oabs", "\"abs\"", UNOP_ABS},
  {"Onot", "\"not\"", UNOP_LOGICAL_NOT},
  {"Oadd", "\"+\"", UNOP_PLUS},
  {"Osubtract", "\"-\"", UNOP_NEG},
  {NULL, NULL}
}

Definition at line 840 of file ada-lang.c.

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Defines