/* Read coff symbol tables and convert to internal format, for GDB.
Copyright 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996,
/* Read coff symbol tables and convert to internal format, for GDB.
Copyright 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996,
Free Software Foundation, Inc.
Contributed by David D. Johnson, Brown University (ddj@cs.brown.edu).
Free Software Foundation, Inc.
Contributed by David D. Johnson, Brown University (ddj@cs.brown.edu).
+ /* FIXME: cagney/2001-02-01: The nasty (int) -> (long)
+ -> (void*) cast is to ensure that that the value of
+ cs->c_sclass can be correctly stored in a void
+ pointer in MSYMBOL_INFO. Better solutions
+ welcome. */
+ gdb_assert (sizeof (void *) >= sizeof (cs->c_sclass));
- (cs->c_name, tmpaddr, ms_type, (char *) cs->c_sclass, sec,
- NULL, objfile);
+ (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);
#ifdef COFF_MAKE_MSYMBOL_SPECIAL
if (msym)
COFF_MAKE_MSYMBOL_SPECIAL (cs->c_sclass, msym);
- bfd_read (temp_sym, local_symesz, 1, nlist_bfd_global);
+ bfd_bread (temp_sym, local_symesz, nlist_bfd_global);
bfd_coff_swap_sym_in (symfile_bfd, temp_sym, (char *) sym);
cs->c_naux = sym->n_numaux & 0xff;
if (cs->c_naux >= 1)
{
bfd_coff_swap_sym_in (symfile_bfd, temp_sym, (char *) sym);
cs->c_naux = sym->n_numaux & 0xff;
if (cs->c_naux >= 1)
{
- bfd_read (temp_aux, local_auxesz, 1, nlist_bfd_global);
+ bfd_bread (temp_aux, local_auxesz, nlist_bfd_global);
bfd_coff_swap_aux_in (symfile_bfd, temp_aux, sym->n_type, sym->n_sclass,
0, cs->c_naux, (char *) aux);
/* If more than one aux entry, read past it (only the first aux
is important). */
for (i = 1; i < cs->c_naux; i++)
bfd_coff_swap_aux_in (symfile_bfd, temp_aux, sym->n_type, sym->n_sclass,
0, cs->c_naux, (char *) aux);
/* If more than one aux entry, read past it (only the first aux
is important). */
for (i = 1; i < cs->c_naux; i++)
- bfd_read (temp_aux, local_auxesz, 1, nlist_bfd_global);
+ bfd_bread (temp_aux, local_auxesz, nlist_bfd_global);
- val = bfd_read ((char *) lengthbuf, sizeof lengthbuf, 1, abfd);
+ val = bfd_bread ((char *) lengthbuf, sizeof lengthbuf, abfd);
length = bfd_h_get_32 (symfile_bfd, lengthbuf);
/* If no string table is needed, then the file may end immediately
length = bfd_h_get_32 (symfile_bfd, lengthbuf);
/* If no string table is needed, then the file may end immediately
- val = bfd_read (stringtab + sizeof lengthbuf, length - sizeof lengthbuf, 1, abfd);
+ val = bfd_bread (stringtab + sizeof lengthbuf, length - sizeof lengthbuf,
+ abfd);
/* Allocate the desired table, plus a sentinel */
linetab = (char *) xmalloc (size + local_linesz);
/* Allocate the desired table, plus a sentinel */
linetab = (char *) xmalloc (size + local_linesz);