#endif
add_symbol_to_list (sym, &local_symbols);
-#if TARGET_BYTE_ORDER == LITTLE_ENDIAN
- /* On little-endian machines, this crud is never necessary, and,
- if the extra bytes contain garbage, is harmful. */
- break;
-#else /* Big endian. */
+ if (TARGET_BYTE_ORDER != BIG_ENDIAN)
+ {
+ /* On little-endian machines, this crud is never necessary,
+ and, if the extra bytes contain garbage, is harmful. */
+ break;
+ }
+
/* If it's gcc-compiled, if it says `short', believe it. */
if (processing_gcc_compilation || BELIEVE_PCC_PROMOTION)
break;
#endif /* no BELIEVE_PCC_PROMOTION_TYPE. */
}
#endif /* !BELIEVE_PCC_PROMOTION. */
-#endif /* Big endian. */
case 'P':
/* acc seems to use P to delare the prototypes of functions that
if (TYPE_NAME (SYMBOL_TYPE (sym)) == NULL)
{
- if (TYPE_CODE (SYMBOL_TYPE (sym)) == TYPE_CODE_PTR
+ /* gcc-2.6 or later (when using -fvtable-thunks)
+ emits a unique named type for a vtable entry.
+ Some gdb code depends on that specific name. */
+ extern const char vtbl_ptr_name[];
+
+ if ((TYPE_CODE (SYMBOL_TYPE (sym)) == TYPE_CODE_PTR
+ && strcmp (SYMBOL_NAME (sym), vtbl_ptr_name))
|| TYPE_CODE (SYMBOL_TYPE (sym)) == TYPE_CODE_FUNC)
{
/* If we are giving a name to a type such as "pointer to
/* Size specified in a type attribute overrides any other size. */
if (type_size != -1)
- TYPE_LENGTH (type) = type_size / TARGET_CHAR_BIT;
+ TYPE_LENGTH (type) = (type_size + TARGET_CHAR_BIT - 1) / TARGET_CHAR_BIT;
return type;
}
while (**pp != ';')
{
+ if (os9k_stabs && **pp == ',') break;
STABS_CONTINUE (pp);
/* Get space to record the next field's data. */
new = (struct nextfield *) xmalloc (sizeof (struct nextfield));
{
register int n;
- for (n = 0; n < TYPE_N_BASECLASSES (type); n++)
- {
- if (TYPE_CODE (TYPE_BASECLASS (type, n)) == TYPE_CODE_UNDEF)
- {
- /* @@ Memory leak on objfile -> type_obstack? */
- return 0;
- }
- TYPE_NFN_FIELDS_TOTAL (type) +=
- TYPE_NFN_FIELDS_TOTAL (TYPE_BASECLASS (type, n));
- }
-
for (n = TYPE_NFN_FIELDS (type);
fip -> fnlist != NULL;
fip -> fnlist = fip -> fnlist -> next)
/* If we have an array whose element type is not yet known, but whose
bounds *are* known, record it to be adjusted at the end of the file. */
- /* FIXME: Why check for zero length rather than TYPE_FLAG_STUB? I think
- the two have the same effect except that the latter is cleaner and the
- former would be wrong for types which really are zero-length (if we
- have any). */
- if (TYPE_LENGTH (element_type) == 0 && !adjustable)
+ if ((TYPE_FLAGS (element_type) & TYPE_FLAG_STUB) && !adjustable)
{
TYPE_FLAGS (type) |= TYPE_FLAG_TARGET_STUB;
add_undefined_type (type);
p++;
}
- upper_limit = LONG_MAX / radix;
+ if (os9k_stabs)
+ upper_limit = ULONG_MAX / radix;
+ else
+ upper_limit = LONG_MAX / radix;
+
while ((c = *p++) >= '0' && c < ('0' + radix))
{
if (n <= upper_limit)
{
QUIT;
+ /* Skip static symbols. */
+ switch (MSYMBOL_TYPE (msymbol))
+ {
+ case mst_file_text:
+ case mst_file_data:
+ case mst_file_bss:
+ continue;
+ default:
+ break;
+ }
+
prev = NULL;
/* Get the hash index and check all the symbols