+Sat Feb 19 03:17:32 1994 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
+
+ * mdebugread.c (new_psymtab): Pass in section_offsets and set
+ them in the pst.
+ * mdebugread.c (handle_psymbol_enumerators): New function to enter
+ the enumerators of an ecoff enum into the partial symbol table.
+ * mdebugread.c (parse_partial_symbols): Call it.
+ * symfile.c (reread_symbols): Initialize objfile->*_psymbols.next.
+ * symmisc.c (dump_psymtab): Fix typo, clean up output of section
+ offsets. Cast psymtab->read_symtab to PTR before passing it to
+ gdb_print_address.
+ * i386-tdep.c (i386_skip_prologue): Skip over instructions that
+ set up the global offset table pointer in pic compiled code.
+ * config/mips/tm-mips.h (FIX_CALL_DUMMY): For big endian targets,
+ error() on TYPE_CODE_FLT arguments whose size is greater than 8,
+ swap all other TYPE_CODE_FLT arguments as mips_push_arguments
+ ensures that floats are promoted to doubles before they are pushed
+ on the stack.
+
Fri Feb 18 23:12:59 1994 Stu Grossman (grossman at cygnus.com)
* sparclite/Makefile.in, sparclite/salib.c, sparclite/sparclite.h:
compare_blocks PARAMS ((const void *, const void *));
static struct partial_symtab *
-new_psymtab PARAMS ((char *, struct objfile *));
+new_psymtab PARAMS ((char *, struct objfile *, struct section_offsets *));
static void
psymtab_to_symtab_1 PARAMS ((struct partial_symtab *, char *));
static struct linetable *
shrink_linetable PARAMS ((struct linetable *));
+static void
+handle_psymbol_enumerators PARAMS ((struct objfile *, FDR *, int));
+
static char *
mdebug_next_symbol_text PARAMS ((void));
\f
old_chain = make_cleanup (free, fdr_to_pst);
fdr_to_pst++;
{
- struct partial_symtab *pst = new_psymtab ("", objfile);
+ struct partial_symtab *pst = new_psymtab ("", objfile, section_offsets);
fdr_to_pst[-1].pst = pst;
FDR_IDX (pst) = -1;
}
sh.value,
psymtab_language, objfile);
}
+ handle_psymbol_enumerators (objfile, fh, sh.st);
+
/* Skip over the block */
new_sdx = sh.index;
if (new_sdx <= cur_sdx)
do_cleanups (old_chain);
}
+/* If the current psymbol has an enumerated type, we need to add
+ all the the enum constants to the partial symbol table. */
+
+static void
+handle_psymbol_enumerators (objfile, fh, stype)
+ struct objfile *objfile;
+ FDR *fh;
+ int stype;
+{
+ const bfd_size_type external_sym_size = debug_swap->external_sym_size;
+ void (* const swap_sym_in) PARAMS ((bfd *, PTR, SYMR *))
+ = debug_swap->swap_sym_in;
+ char *ext_sym = ((char *) debug_info->external_sym
+ + ((fh->isymBase + cur_sdx + 1) * external_sym_size));
+ SYMR sh;
+ TIR tir;
+
+ switch (stype)
+ {
+ case stEnum:
+ break;
+
+ case stBlock:
+ /* It is an enumerated type if the next symbol entry is a stMember
+ and its auxiliary index is indexNil or its auxiliary entry
+ is a plain btNil or btVoid. */
+ (*swap_sym_in) (cur_bfd, ext_sym, &sh);
+ if (sh.st != stMember)
+ return;
+
+ if (sh.index == indexNil)
+ break;
+ ecoff_swap_tir_in (fh->fBigendian,
+ &(debug_info->external_aux
+ + fh->iauxBase + sh.index)->a_ti,
+ &tir);
+ if ((tir.bt != btNil && tir.bt != btVoid) || tir.tq0 != tqNil)
+ return;
+ break;
+
+ default:
+ return;
+ }
+
+ for (;;)
+ {
+ char *name;
+
+ (*swap_sym_in) (cur_bfd, ext_sym, &sh);
+ if (sh.st != stMember)
+ break;
+ name = debug_info->ss + cur_fdr->issBase + sh.iss;
+
+ /* Note that the value doesn't matter for enum constants
+ in psymtabs, just in symtabs. */
+ ADD_PSYMBOL_TO_LIST (name, strlen (name),
+ VAR_NAMESPACE, LOC_CONST,
+ objfile->static_psymbols, 0,
+ psymtab_language, objfile);
+ ext_sym += external_sym_size;
+ }
+}
static char *
mdebug_next_symbol_text ()
/* Allocate a new partial_symtab NAME */
static struct partial_symtab *
-new_psymtab (name, objfile)
+new_psymtab (name, objfile, section_offsets)
char *name;
struct objfile *objfile;
+ struct section_offsets *section_offsets;
{
struct partial_symtab *psymtab;
psymtab = allocate_psymtab (name, objfile);
+ psymtab->section_offsets = section_offsets;
/* Keep a backpointer to the file's symbols */