/* Read coff symbol tables and convert to internal format, for GDB.
Copyright 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996,
- 1997, 1998, 1999, 2000, 2001
+ 1997, 1998, 1999, 2000, 2001, 2002
Free Software Foundation, Inc.
Contributed by David D. Johnson, Brown University (ddj@cs.brown.edu).
static void patch_opaque_types (struct symtab *);
-static void patch_type (struct type *, struct type *);
-
static void enter_linenos (long, int, int, struct objfile *);
static void free_linetab (void);
struct internal_syment *, union internal_auxent *);
static void coff_symtab_read (long, unsigned int, struct objfile *);
-
-static void find_linenos (bfd *, sec_ptr, PTR);
-
-static void coff_symfile_init (struct objfile *);
-
-static void coff_new_init (struct objfile *);
-
-static void coff_symfile_read (struct objfile *, int);
-
-static void coff_symfile_finish (struct objfile *);
-
-static void record_minimal_symbol (char *, CORE_ADDR,
- enum minimal_symbol_type,
- struct objfile *);
-
-static void coff_end_symtab (struct objfile *);
-
-static void complete_symtab (char *, CORE_ADDR, unsigned int);
-
-static void coff_start_symtab (char *);
-
-static struct type *coff_alloc_type (int);
-
-static struct type **coff_lookup_type (int);
-
-static void coff_locate_sections (bfd *, asection *, PTR);
\f
/* We are called once per section from coff_symfile_read. We
need to examine each section we are passed, check to see
-kingdon). */
static void
-coff_locate_sections (bfd *abfd, asection *sectp, PTR csip)
+coff_locate_sections (bfd *abfd, asection *sectp, void *csip)
{
register struct coff_symfile_info *csi;
const char *name;
asection **resultp;
};
-static void find_targ_sec (bfd *, asection *, PTR);
-
static void
-find_targ_sec (bfd *abfd, asection *sect, PTR obj)
+find_targ_sec (bfd *abfd, asection *sect, void *obj)
{
struct find_targ_sec_arg *args = (struct find_targ_sec_arg *) obj;
if (sect->target_index == args->targ_index)
objfile->sym_stab_info = (struct dbx_symfile_info *)
xmmalloc (objfile->md, sizeof (struct dbx_symfile_info));
- memset ((PTR) objfile->sym_stab_info, 0, sizeof (struct dbx_symfile_info));
+ memset (objfile->sym_stab_info, 0,
+ sizeof (struct dbx_symfile_info));
/* Allocate struct to keep track of the symfile */
objfile->sym_private = xmmalloc (objfile->md,
/* ARGSUSED */
static void
-find_linenos (bfd *abfd, sec_ptr asect, PTR vpinfo)
+find_linenos (bfd *abfd, sec_ptr asect, void *vpinfo)
{
struct coff_symfile_info *info;
int size, count;
/* Read the line number table, all at once. */
info->min_lineno_offset = 0;
info->max_lineno_offset = 0;
- bfd_map_over_sections (abfd, find_linenos, (PTR) info);
+ bfd_map_over_sections (abfd, find_linenos, (void *) info);
make_cleanup (free_linetab_cleanup, 0 /*ignore*/);
val = init_lineno (abfd, info->min_lineno_offset,
install_minimal_symbols (objfile);
- bfd_map_over_sections (abfd, coff_locate_sections, (PTR) info);
+ bfd_map_over_sections (abfd, coff_locate_sections, (void *) info);
if (info->stabsects)
{
cs->c_sclass == C_EXT || cs->c_sclass == C_THUMBEXTFUNC
|| cs->c_sclass == C_THUMBEXT ?
mst_text : mst_file_text;
-#ifdef SMASH_TEXT_ADDRESS
- if (tmpaddr & 1) /* FIXME: delete this line */
- SMASH_TEXT_ADDRESS (tmpaddr);
-#endif
+ tmpaddr = SMASH_TEXT_ADDRESS (tmpaddr);
}
else if (sec == SECT_OFF_DATA (objfile))
{
msym = prim_record_minimal_symbol_and_info
(cs->c_name, tmpaddr, ms_type, (void *) (long) cs->c_sclass,
sec, NULL, objfile);
-#ifdef COFF_MAKE_MSYMBOL_SPECIAL
if (msym)
COFF_MAKE_MSYMBOL_SPECIAL (cs->c_sclass, msym);
-#endif
}
if (SDB_TYPE (cs->c_type))
{