static struct value *ada_value_primitive_field (struct value *, int, int,
struct type *);
-static int find_struct_field (char *, struct type *, int,
+static int find_struct_field (const char *, struct type *, int,
struct type **, int *, int *, int *, int *);
static struct value *ada_to_fixed_value_create (struct type *, CORE_ADDR,
/* Fixup each field of INDEX_DESC_TYPE. */
for (i = 0; i < TYPE_NFIELDS (index_desc_type); i++)
{
- char *name = TYPE_FIELD_NAME (index_desc_type, i);
+ const char *name = TYPE_FIELD_NAME (index_desc_type, i);
struct type *raw_type = ada_check_typedef (ada_find_any_type (name));
if (raw_type)
static long
decode_packed_array_bitsize (struct type *type)
{
- char *raw_name;
- char *tail;
+ const char *raw_name;
+ const char *tail;
long bits;
/* Access to arrays implemented as fat pointers are encoded as a typedef
static struct type *
decode_constrained_packed_array_type (struct type *type)
{
- char *raw_name = ada_type_name (ada_check_typedef (type));
+ const char *raw_name = ada_type_name (ada_check_typedef (type));
char *name;
- char *tail;
+ const char *tail;
struct type *shadow_type;
long bits;
such symbols by their trailing number (__N or $N). */
static int
-encoded_ordered_before (char *N0, char *N1)
+encoded_ordered_before (const char *N0, const char *N1)
{
if (N1 == NULL)
return 0;
{
struct type *type0 = SYMBOL_TYPE (sym0);
struct type *type1 = SYMBOL_TYPE (sym1);
- char *name0 = SYMBOL_LINKAGE_NAME (sym0);
- char *name1 = SYMBOL_LINKAGE_NAME (sym1);
+ const char *name0 = SYMBOL_LINKAGE_NAME (sym0);
+ const char *name1 = SYMBOL_LINKAGE_NAME (sym1);
int len0 = strlen (name0);
return
static int
is_nondebugging_type (struct type *type)
{
- char *name = ada_type_name (type);
+ const char *name = ada_type_name (type);
return (name != NULL && strcmp (name, "<variable, no debug info>") == 0);
}
suffix). */
for (i = 0; i < TYPE_NFIELDS (type1); i++)
{
- char *name_1 = TYPE_FIELD_NAME (type1, i);
- char *name_2 = TYPE_FIELD_NAME (type2, i);
+ const char *name_1 = TYPE_FIELD_NAME (type1, i);
+ const char *name_2 = TYPE_FIELD_NAME (type2, i);
int len_1 = strlen (name_1);
int len_2 = strlen (name_2);
not visible from FUNCTION_NAME. */
static int
-old_renaming_is_invisible (const struct symbol *sym, char *function_name)
+old_renaming_is_invisible (const struct symbol *sym, const char *function_name)
{
char *scope;
int nsyms, const struct block *current_block)
{
struct symbol *current_function;
- char *current_function_name;
+ const char *current_function_name;
int i;
int is_new_style_renaming;
static int
ada_is_dispatch_table_ptr_type (struct type *type)
{
- char *name;
+ const char *name;
if (TYPE_CODE (type) != TYPE_CODE_PTR)
return 0;
Returns 1 if found, 0 otherwise. */
static int
-find_struct_field (char *name, struct type *type, int offset,
+find_struct_field (const char *name, struct type *type, int offset,
struct type **field_type_p,
int *byte_offset_p, int *bit_offset_p, int *bit_size_p,
int *index_p)
{
int bit_pos = TYPE_FIELD_BITPOS (type, i);
int fld_offset = offset + bit_pos / 8;
- char *t_field_name = TYPE_FIELD_NAME (type, i);
+ const char *t_field_name = TYPE_FIELD_NAME (type, i);
if (t_field_name == NULL)
continue;
type = ada_check_typedef (type);
for (i = 0; i < TYPE_NFIELDS (type); i += 1)
{
- char *t_field_name = TYPE_FIELD_NAME (type, i);
+ const char *t_field_name = TYPE_FIELD_NAME (type, i);
if (t_field_name == NULL)
continue;
for (i = 0; i < TYPE_NFIELDS (type); i += 1)
{
- char *t_field_name = TYPE_FIELD_NAME (type, i);
+ const char *t_field_name = TYPE_FIELD_NAME (type, i);
struct type *t;
int disp;
NOT wrapped in a struct, since the compiler sometimes
generates these for unchecked variant types. Revisit
if the compiler changes this practice. */
- char *v_field_name = TYPE_FIELD_NAME (field_type, j);
+ const char *v_field_name = TYPE_FIELD_NAME (field_type, j);
disp = 0;
if (v_field_name != NULL
&& field_name_match (v_field_name, name))
qualified. This means we need to prepend the function name
as well as adding the ``___XR'' suffix to build the name of
the associated renaming symbol. */
- char *function_name = SYMBOL_LINKAGE_NAME (function_sym);
+ const char *function_name = SYMBOL_LINKAGE_NAME (function_sym);
/* Function names sometimes contain suffixes used
for instance to qualify nested subprograms. When building
the XR type name, we need to make sure that this suffix is
/* The name of TYPE, which is either its TYPE_NAME, or, if that is
null, its TYPE_TAG_NAME. Null if TYPE is null. */
-char *
+const char *
ada_type_name (struct type *type)
{
if (type == NULL)
result = TYPE_DESCRIPTIVE_TYPE (type);
while (result != NULL)
{
- char *result_name = ada_type_name (result);
+ const char *result_name = ada_type_name (result);
if (result_name == NULL)
{
struct type *
ada_find_parallel_type (struct type *type, const char *suffix)
{
- char *name, *typename = ada_type_name (type);
+ char *name;
+ const char *typename = ada_type_name (type);
int len;
if (typename == NULL)
If there is, then it provides the actual size of our type. */
else if (ada_type_name (fixed_record_type) != NULL)
{
- char *name = ada_type_name (fixed_record_type);
+ const char *name = ada_type_name (fixed_record_type);
char *xvz_name = alloca (strlen (name) + 7 /* "___XVZ\0" */);
int xvz_found = 0;
LONGEST size;
return type;
else
{
- char *name = TYPE_TAG_NAME (type);
+ const char *name = TYPE_TAG_NAME (type);
struct type *type1 = ada_find_any_type (name);
if (type1 == NULL)
else
{
int ind;
- char *name;
+ const char *name;
switch (op)
{
else if (discrete_type_p (type_arg))
{
struct type *range_type;
- char *name = ada_type_name (type_arg);
+ const char *name = ada_type_name (type_arg);
range_type = NULL;
if (name != NULL && TYPE_CODE (type_arg) != TYPE_CODE_ENUM)
static struct type *
to_fixed_range_type (struct type *raw_type, struct value *dval)
{
- char *name;
+ const char *name;
struct type *base_type;
char *subtype_info;
int
ada_modulus_from_name (struct type *type, ULONGEST *modulus)
{
- char *name = ada_type_name (type);
- char *suffix;
+ const char *name = ada_type_name (type);
+ const char *suffix;
int k;
LONGEST U;
is_known_support_routine (struct frame_info *frame)
{
struct symtab_and_line sal;
- char *func_name;
+ const char *func_name;
enum language func_lang;
int i;
while (fi != NULL)
{
- char *func_name;
+ const char *func_name;
enum language func_lang;
find_frame_funname (fi, &func_name, &func_lang, NULL);