2002-07-18 Elena Zannoni <ezannoni@redhat.com>

* stabsread.c: Make os9k sections of the code obsolete,
	for real this time.
	* stabsread.h: Make os9k sections of the code obsolete.
This commit is contained in:
Elena Zannoni 2002-07-18 17:22:50 +00:00
parent 09ec9b38d6
commit cdecafbee8
3 changed files with 131 additions and 84 deletions

View File

@ -1,3 +1,9 @@
2002-07-18 Elena Zannoni <ezannoni@redhat.com>
* stabsread.c: Make os9k sections of the code obsolete,
for real this time.
* stabsread.h: Make os9k sections of the code obsolete.
2002-07-18 Michal Ludvig <mludvig@suse.cz> 2002-07-18 Michal Ludvig <mludvig@suse.cz>
* linux-low.c (regsets_store_inferior_registers): Add free() * linux-low.c (regsets_store_inferior_registers): Add free()

View File

@ -256,34 +256,36 @@ static struct symbol *current_symbol = NULL;
*(pp) = next_symbol_text (objfile); \ *(pp) = next_symbol_text (objfile); \
} while (0) } while (0)
/* FIXME: These probably should be our own types (like rs6000_builtin_type #if 0 /* OBSOLETE OS9K */
has its own types) rather than builtin_type_*. */ // OBSOLETE /* FIXME: These probably should be our own types (like rs6000_builtin_type
static struct type **os9k_type_vector[] = // OBSOLETE has its own types) rather than builtin_type_*. */
{ // OBSOLETE static struct type **os9k_type_vector[] =
0, // OBSOLETE {
&builtin_type_int, // OBSOLETE 0,
&builtin_type_char, // OBSOLETE &builtin_type_int,
&builtin_type_long, // OBSOLETE &builtin_type_char,
&builtin_type_short, // OBSOLETE &builtin_type_long,
&builtin_type_unsigned_char, // OBSOLETE &builtin_type_short,
&builtin_type_unsigned_short, // OBSOLETE &builtin_type_unsigned_char,
&builtin_type_unsigned_long, // OBSOLETE &builtin_type_unsigned_short,
&builtin_type_unsigned_int, // OBSOLETE &builtin_type_unsigned_long,
&builtin_type_float, // OBSOLETE &builtin_type_unsigned_int,
&builtin_type_double, // OBSOLETE &builtin_type_float,
&builtin_type_void, // OBSOLETE &builtin_type_double,
&builtin_type_long_double // OBSOLETE &builtin_type_void,
}; // OBSOLETE &builtin_type_long_double
// OBSOLETE };
static void os9k_init_type_vector (struct type **); // OBSOLETE
// OBSOLETE static void os9k_init_type_vector (struct type **);
static void // OBSOLETE
os9k_init_type_vector (struct type **tv) // OBSOLETE static void
{ // OBSOLETE os9k_init_type_vector (struct type **tv)
unsigned int i; // OBSOLETE {
for (i = 0; i < sizeof (os9k_type_vector) / sizeof (struct type **); i++) // OBSOLETE unsigned int i;
tv[i] = (os9k_type_vector[i] == 0 ? 0 : *(os9k_type_vector[i])); // OBSOLETE for (i = 0; i < sizeof (os9k_type_vector) / sizeof (struct type **); i++)
} // OBSOLETE tv[i] = (os9k_type_vector[i] == 0 ? 0 : *(os9k_type_vector[i]));
// OBSOLETE }
#endif /* OBSOLETE OS9K */
/* Look up a dbx type-number pair. Return the address of the slot /* Look up a dbx type-number pair. Return the address of the slot
where the type for that number-pair is stored. where the type for that number-pair is stored.
@ -351,9 +353,11 @@ Invalid symbol data: type number (%d,%d) out of range at symtab pos %d.",
memset (&type_vector[old_len], 0, memset (&type_vector[old_len], 0,
(type_vector_length - old_len) * sizeof (struct type *)); (type_vector_length - old_len) * sizeof (struct type *));
if (os9k_stabs) #if 0 /* OBSOLETE OS9K */
/* Deal with OS9000 fundamental types. */ // OBSOLETE if (os9k_stabs)
os9k_init_type_vector (type_vector); // OBSOLETE /* Deal with OS9000 fundamental types. */
// OBSOLETE os9k_init_type_vector (type_vector);
#endif /* OBSOLETE OS9K */
} }
return (&type_vector[index]); return (&type_vector[index]);
} }
@ -2052,9 +2056,11 @@ define_symbol (CORE_ADDR valu, char *string, int desc, int type,
} }
#endif #endif
SYMBOL_NAMESPACE (sym) = VAR_NAMESPACE; SYMBOL_NAMESPACE (sym) = VAR_NAMESPACE;
if (os9k_stabs) #if 0 /* OBSOLETE OS9K */
add_symbol_to_list (sym, &global_symbols); // OBSOLETE if (os9k_stabs)
else // OBSOLETE add_symbol_to_list (sym, &global_symbols);
// OBSOLETE else
#endif /* OBSOLETE OS9K */
add_symbol_to_list (sym, &local_symbols); add_symbol_to_list (sym, &local_symbols);
break; break;
@ -2589,21 +2595,24 @@ again:
break; break;
case 'f': /* Function returning another type */ case 'f': /* Function returning another type */
if (os9k_stabs && **pp == '(') #if 0 /* OBSOLETE OS9K */
{ // OBSOLETE if (os9k_stabs && **pp == '(')
/* Function prototype; parse it. // OBSOLETE {
We must conditionalize this on os9k_stabs because otherwise // OBSOLETE /* Function prototype; parse it.
it could be confused with a Sun-style (1,3) typenumber // OBSOLETE We must conditionalize this on os9k_stabs because otherwise
(I think). */ // OBSOLETE it could be confused with a Sun-style (1,3) typenumber
struct type *t; // OBSOLETE (I think). */
++*pp; // OBSOLETE struct type *t;
while (**pp != ')') // OBSOLETE ++*pp;
{ // OBSOLETE while (**pp != ')')
t = read_type (pp, objfile); // OBSOLETE {
if (**pp == ',') // OBSOLETE t = read_type (pp, objfile);
++ * pp; // OBSOLETE if (**pp == ',')
} // OBSOLETE ++ * pp;
} // OBSOLETE }
// OBSOLETE }
#endif /* OBSOLETE OS9K */
type1 = read_type (pp, objfile); type1 = read_type (pp, objfile);
type = make_function_type (type1, dbx_lookup_type (typenums)); type = make_function_type (type1, dbx_lookup_type (typenums));
break; break;
@ -2684,22 +2693,36 @@ again:
} }
case 'k': /* Const qualifier on some type (Sun) */ case 'k': /* Const qualifier on some type (Sun) */
case 'c': /* Const qualifier on some type (OS9000) */ #if 0 /* OBSOLETE OS9K */
/* Because 'c' means other things to AIX and 'k' is perfectly good, // OBSOLETE /* ezannoni 2002-07-16: This can be safely deleted, because 'c'
only accept 'c' in the os9k_stabs case. */ // OBSOLETE means complex type in AIX stabs, while it means const qualifier
if (type_descriptor == 'c' && !os9k_stabs) // OBSOLETE in os9k stabs. Obviously we were supporting only the os9k meaning.
return error_type (pp, objfile); // OBSOLETE We were erroring out if we were reading AIX stabs. Right now the
// OBSOLETE erroring out will happen in the default clause of the switch. */
// OBSOLETE case 'c': /* Const qualifier on some type (OS9000) */
// OBSOLETE /* Because 'c' means other things to AIX and 'k' is perfectly good,
// OBSOLETE only accept 'c' in the os9k_stabs case. */
// OBSOLETE if (type_descriptor == 'c' && !os9k_stabs)
// OBSOLETE return error_type (pp, objfile);
#endif /* OBSOLETE OS9K */
type = read_type (pp, objfile); type = read_type (pp, objfile);
type = make_cv_type (1, TYPE_VOLATILE (type), type, type = make_cv_type (1, TYPE_VOLATILE (type), type,
dbx_lookup_type (typenums)); dbx_lookup_type (typenums));
break; break;
case 'B': /* Volatile qual on some type (Sun) */ case 'B': /* Volatile qual on some type (Sun) */
case 'i': /* Volatile qual on some type (OS9000) */ #if 0 /* OBSOLETE OS9K */
/* Because 'i' means other things to AIX and 'B' is perfectly good, // OBSOLETE /* ezannoni 2002-07-16: This can be safely deleted, because 'i'
only accept 'i' in the os9k_stabs case. */ // OBSOLETE means imported type in AIX stabs, while it means volatile qualifier
if (type_descriptor == 'i' && !os9k_stabs) // OBSOLETE in os9k stabs. Obviously we were supporting only the os9k meaning.
return error_type (pp, objfile); // OBSOLETE We were erroring out if we were reading AIX stabs. Right now the
// OBSOLETE erroring out will happen in the default clause of the switch. */
// OBSOLETE case 'i': /* Volatile qual on some type (OS9000) */
// OBSOLETE /* Because 'i' means other things to AIX and 'B' is perfectly good,
// OBSOLETE only accept 'i' in the os9k_stabs case. */
// OBSOLETE if (type_descriptor == 'i' && !os9k_stabs)
// OBSOLETE return error_type (pp, objfile);
#endif /* OBSOLETE OS9K */
type = read_type (pp, objfile); type = read_type (pp, objfile);
type = make_cv_type (TYPE_CONST (type), 1, type, type = make_cv_type (TYPE_CONST (type), 1, type,
dbx_lookup_type (typenums)); dbx_lookup_type (typenums));
@ -2804,10 +2827,12 @@ again:
break; break;
case 'b': case 'b':
if (os9k_stabs) #if 0 /* OBSOLETE OS9K */
/* Const and volatile qualified type. */ // OBSOLETE if (os9k_stabs)
type = read_type (pp, objfile); // OBSOLETE /* Const and volatile qualified type. */
else // OBSOLETE type = read_type (pp, objfile);
// OBSOLETE else
#endif /* OBSOLETE OS9K */
{ {
/* Sun ACC builtin int type */ /* Sun ACC builtin int type */
type = read_sun_builtin_type (pp, typenums, objfile); type = read_sun_builtin_type (pp, typenums, objfile);
@ -3666,8 +3691,10 @@ read_struct_fields (struct field_info *fip, char **pp, struct type *type,
while (**pp != ';' && **pp != '\0') while (**pp != ';' && **pp != '\0')
{ {
if (os9k_stabs && **pp == ',') #if 0 /* OBSOLETE OS9K */
break; // OBSOLETE if (os9k_stabs && **pp == ',')
// OBSOLETE break;
#endif /* OBSOLETE OS9K */
STABS_CONTINUE (pp, objfile); STABS_CONTINUE (pp, objfile);
/* Get space to record the next field's data. */ /* Get space to record the next field's data. */
new = (struct nextfield *) xmalloc (sizeof (struct nextfield)); new = (struct nextfield *) xmalloc (sizeof (struct nextfield));
@ -4329,9 +4356,11 @@ read_array_type (register char **pp, register struct type *type,
Fortran adjustable arrays use Adigits or Tdigits for lower or upper; Fortran adjustable arrays use Adigits or Tdigits for lower or upper;
for these, produce a type like float[][]. */ for these, produce a type like float[][]. */
if (os9k_stabs) #if 0 /* OBSOLETE OS9K */
index_type = builtin_type_int; // OBSOLETE if (os9k_stabs)
else // OBSOLETE index_type = builtin_type_int;
// OBSOLETE else
#endif /* OBSOLETE OS9K */
{ {
index_type = read_type (pp, objfile); index_type = read_type (pp, objfile);
if (**pp != ';') if (**pp != ';')
@ -4345,7 +4374,12 @@ read_array_type (register char **pp, register struct type *type,
(*pp)++; (*pp)++;
adjustable = 1; adjustable = 1;
} }
lower = read_huge_number (pp, os9k_stabs ? ',' : ';', &nbits); #if 0 /* OBSOLETE OS9K */
// OBSOLETE lower = read_huge_number (pp, os9k_stabs ? ',' : ';', &nbits);
#else /* OBSOLETE OS9K */
lower = read_huge_number (pp, ';', &nbits);
#endif /* OBSOLETE OS9K */
if (nbits != 0) if (nbits != 0)
return error_type (pp, objfile); return error_type (pp, objfile);
@ -4405,15 +4439,17 @@ read_enum_type (register char **pp, register struct type *type,
osyms = *symlist; osyms = *symlist;
o_nsyms = osyms ? osyms->nsyms : 0; o_nsyms = osyms ? osyms->nsyms : 0;
if (os9k_stabs) #if 0 /* OBSOLETE OS9K */
{ // OBSOLETE if (os9k_stabs)
/* Size. Perhaps this does not have to be conditionalized on // OBSOLETE {
os9k_stabs (assuming the name of an enum constant can't start // OBSOLETE /* Size. Perhaps this does not have to be conditionalized on
with a digit). */ // OBSOLETE os9k_stabs (assuming the name of an enum constant can't start
read_huge_number (pp, 0, &nbits); // OBSOLETE with a digit). */
if (nbits != 0) // OBSOLETE read_huge_number (pp, 0, &nbits);
return error_type (pp, objfile); // OBSOLETE if (nbits != 0)
} // OBSOLETE return error_type (pp, objfile);
// OBSOLETE }
#endif /* OBSOLETE OS9K */
/* The aix4 compiler emits an extra field before the enum members; /* The aix4 compiler emits an extra field before the enum members;
my guess is it's a type of some sort. Just ignore it. */ my guess is it's a type of some sort. Just ignore it. */
@ -4652,9 +4688,11 @@ read_huge_number (char **pp, int end, int *bits)
p++; p++;
} }
if (os9k_stabs) #if 0 /* OBSOLETE OS9K */
upper_limit = ULONG_MAX / radix; // OBSOLETE if (os9k_stabs)
else // OBSOLETE upper_limit = ULONG_MAX / radix;
// OBSOLETE else
#endif /* OBSOLETE OS9K */
upper_limit = LONG_MAX / radix; upper_limit = LONG_MAX / radix;
while ((c = *p++) >= '0' && c < ('0' + radix)) while ((c = *p++) >= '0' && c < ('0' + radix))
@ -5366,7 +5404,9 @@ start_stabs (void)
/* FIXME: If common_block_name is not already NULL, we should complain(). */ /* FIXME: If common_block_name is not already NULL, we should complain(). */
common_block_name = NULL; common_block_name = NULL;
os9k_stabs = 0; #if 0 /* OBSOLETE OS9K */
// OBSOLETE os9k_stabs = 0;
#endif /* OBSOLETE OS9K */
} }
/* Call after end_symtab() */ /* Call after end_symtab() */

View File

@ -154,8 +154,9 @@ extern void end_stabs (void);
extern void finish_global_stabs (struct objfile *objfile); extern void finish_global_stabs (struct objfile *objfile);
#if 0 /* OBSOLETE OS9K */
EXTERN int os9k_stabs; // OBSOLETE EXTERN int os9k_stabs;
#endif /* OBSOLETE OS9K */
/* COFF files can have multiple .stab sections, if they are linked /* COFF files can have multiple .stab sections, if they are linked
using --split-by-reloc. This linked list is used to pass the using --split-by-reloc. This linked list is used to pass the