From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6348 invoked by alias); 23 Oct 2004 16:16:52 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 6337 invoked from network); 23 Oct 2004 16:16:51 -0000 Received: from unknown (HELO mx1.redhat.com) (66.187.233.31) by sourceware.org with SMTP; 23 Oct 2004 16:16:51 -0000 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.12.11/8.12.11) with ESMTP id i9NGGkxQ029433 for ; Sat, 23 Oct 2004 12:16:51 -0400 Received: from localhost.redhat.com (vpn50-48.rdu.redhat.com [172.16.50.48]) by int-mx1.corp.redhat.com (8.11.6/8.11.6) with ESMTP id i9NGGJr32164; Sat, 23 Oct 2004 12:16:19 -0400 Received: from [127.0.0.1] (localhost.localdomain [127.0.0.1]) by localhost.redhat.com (Postfix) with ESMTP id 48AA97AD03; Sat, 23 Oct 2004 12:15:33 -0400 (EDT) Message-ID: <417A83A3.7040006@gnu.org> Date: Sat, 23 Oct 2004 16:16:00 -0000 From: Andrew Cagney User-Agent: Mozilla Thunderbird 0.8 (X11/20041012) MIME-Version: 1.0 To: gdb-patches@sources.redhat.com Subject: Re: [patch/rfc] Deprecate sym_private, obj_private, and sym_stab_info References: <41632DA5.9080508@gnu.org> In-Reply-To: <41632DA5.9080508@gnu.org> Content-Type: multipart/mixed; boundary="------------050505030305070907070909" X-SW-Source: 2004-10/txt/msg00381.txt.bz2 This is a multi-part message in MIME format. --------------050505030305070907070909 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-length: 266 Andrew Cagney wrote: > These have all been superseeded by Mark's per-objfile data pointers. > > I'll look to commit this in a week, [or two] Per suggestions, I added a note pointing to where an example could be found. Committed as attached to mainline. Andrew --------------050505030305070907070909 Content-Type: text/plain; name="diffs" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="diffs" Content-length: 24671 ? diff.html ? diffs ? fail.html ? index.html ? pass.html Index: ChangeLog =================================================================== RCS file: /cvs/src/src/gdb/ChangeLog,v retrieving revision 1.6499 diff -p -u -r1.6499 ChangeLog --- ChangeLog 23 Oct 2004 12:13:53 -0000 1.6499 +++ ChangeLog 23 Oct 2004 16:13:33 -0000 @@ -1,3 +1,20 @@ +2004-10-23 Andrew Cagney + + * objfiles.h (struct objfile): Rename obj_private to + deprecated_obj_private, sym_private to deprecated_sym_private, and + sym_stab_info to deprecated_sym_stab_info. + * gdb-stabs.h: Update. + * elfread.c: Update. + * dbxread.c: Update. + * coffread.c: Update. + * xcoffread.c: Update. + * symfile.c: Update. + * somread.c: Update. + * nlmread.c: Update. + * mdebugread.c: Update. + * hpread.c: Update. + * coffread.c: Update. + 2004-10-23 Mark Kettenis * mips64obsd-nat.c, mips64obsd-tdep.c: New files. Index: coffread.c =================================================================== RCS file: /cvs/src/src/gdb/coffread.c,v retrieving revision 1.58 diff -p -u -r1.58 coffread.c --- coffread.c 10 Aug 2004 21:52:04 -0000 1.58 +++ coffread.c 23 Oct 2004 16:13:33 -0000 @@ -436,16 +436,16 @@ static void coff_symfile_init (struct objfile *objfile) { /* Allocate struct to keep track of stab reading. */ - objfile->sym_stab_info = (struct dbx_symfile_info *) + objfile->deprecated_sym_stab_info = (struct dbx_symfile_info *) xmalloc (sizeof (struct dbx_symfile_info)); - memset (objfile->sym_stab_info, 0, + memset (objfile->deprecated_sym_stab_info, 0, sizeof (struct dbx_symfile_info)); /* Allocate struct to keep track of the symfile */ - objfile->sym_private = xmalloc (sizeof (struct coff_symfile_info)); + objfile->deprecated_sym_private = xmalloc (sizeof (struct coff_symfile_info)); - memset (objfile->sym_private, 0, sizeof (struct coff_symfile_info)); + memset (objfile->deprecated_sym_private, 0, sizeof (struct coff_symfile_info)); /* COFF objects may be reordered, so set OBJF_REORDERED. If we find this causes a significant slowdown in gdb then we could @@ -512,8 +512,8 @@ coff_symfile_read (struct objfile *objfi int len; char * target; - info = (struct coff_symfile_info *) objfile->sym_private; - dbxinfo = objfile->sym_stab_info; + info = (struct coff_symfile_info *) objfile->deprecated_sym_private; + dbxinfo = objfile->deprecated_sym_stab_info; symfile_bfd = abfd; /* Kludge for swap routines */ /* WARNING WILL ROBINSON! ACCESSING BFD-PRIVATE DATA HERE! FIXME! */ @@ -659,9 +659,9 @@ coff_new_init (struct objfile *ignore) static void coff_symfile_finish (struct objfile *objfile) { - if (objfile->sym_private != NULL) + if (objfile->deprecated_sym_private != NULL) { - xfree (objfile->sym_private); + xfree (objfile->deprecated_sym_private); } /* Let stabs reader clean up */ Index: dbxread.c =================================================================== RCS file: /cvs/src/src/gdb/dbxread.c,v retrieving revision 1.74 diff -p -u -r1.74 dbxread.c --- dbxread.c 11 Sep 2004 10:24:46 -0000 1.74 +++ dbxread.c 23 Oct 2004 16:13:34 -0000 @@ -623,9 +623,9 @@ dbx_symfile_init (struct objfile *objfil unsigned char size_temp[DBX_STRINGTAB_SIZE_SIZE]; /* Allocate struct to keep track of the symfile */ - objfile->sym_stab_info = (struct dbx_symfile_info *) + objfile->deprecated_sym_stab_info = (struct dbx_symfile_info *) xmalloc (sizeof (struct dbx_symfile_info)); - memset (objfile->sym_stab_info, 0, sizeof (struct dbx_symfile_info)); + memset (objfile->deprecated_sym_stab_info, 0, sizeof (struct dbx_symfile_info)); DBX_TEXT_SECTION (objfile) = bfd_get_section_by_name (sym_bfd, ".text"); DBX_DATA_SECTION (objfile) = bfd_get_section_by_name (sym_bfd, ".data"); @@ -733,7 +733,7 @@ dbx_symfile_init (struct objfile *objfil static void dbx_symfile_finish (struct objfile *objfile) { - if (objfile->sym_stab_info != NULL) + if (objfile->deprecated_sym_stab_info != NULL) { if (HEADER_FILES (objfile) != NULL) { @@ -747,7 +747,7 @@ dbx_symfile_finish (struct objfile *objf } xfree (hfiles); } - xfree (objfile->sym_stab_info); + xfree (objfile->deprecated_sym_stab_info); } free_header_files (); } @@ -3239,7 +3239,7 @@ coffstab_build_psymtabs (struct objfile /* There is already a dbx_symfile_info allocated by our caller. It might even contain some info from the coff symtab to help us. */ - info = objfile->sym_stab_info; + info = objfile->deprecated_sym_stab_info; DBX_TEXT_ADDR (objfile) = textaddr; DBX_TEXT_SIZE (objfile) = textsize; @@ -3331,7 +3331,7 @@ elfstab_build_psymtabs (struct objfile * /* There is already a dbx_symfile_info allocated by our caller. It might even contain some info from the ELF symtab to help us. */ - info = objfile->sym_stab_info; + info = objfile->deprecated_sym_stab_info; /* Find the first and last text address. dbx_symfile_read seems to want this. */ @@ -3423,9 +3423,9 @@ stabsect_build_psymtabs (struct objfile error ("stabsect_build_psymtabs: Found stabs (%s), but not string section (%s)", stab_name, stabstr_name); - objfile->sym_stab_info = (struct dbx_symfile_info *) + objfile->deprecated_sym_stab_info = (struct dbx_symfile_info *) xmalloc (sizeof (struct dbx_symfile_info)); - memset (objfile->sym_stab_info, 0, sizeof (struct dbx_symfile_info)); + memset (objfile->deprecated_sym_stab_info, 0, sizeof (struct dbx_symfile_info)); text_sect = bfd_get_section_by_name (sym_bfd, text_name); if (!text_sect) Index: elfread.c =================================================================== RCS file: /cvs/src/src/gdb/elfread.c,v retrieving revision 1.46 diff -p -u -r1.46 elfread.c --- elfread.c 10 Aug 2004 21:52:04 -0000 1.46 +++ elfread.c 23 Oct 2004 16:13:34 -0000 @@ -162,7 +162,7 @@ elf_symtab_read (struct objfile *objfile /* Name of filesym, as saved on the objfile_obstack. */ char *filesymname = obsavestring ("", 0, &objfile->objfile_obstack); #endif - struct dbx_symfile_info *dbx = objfile->sym_stab_info; + struct dbx_symfile_info *dbx = objfile->deprecated_sym_stab_info; int stripped = (bfd_get_symcount (objfile->obfd) == 0); if (dynamic) @@ -498,13 +498,13 @@ elf_symfile_read (struct objfile *objfil memset ((char *) &ei, 0, sizeof (ei)); /* Allocate struct to keep track of the symfile */ - objfile->sym_stab_info = (struct dbx_symfile_info *) + objfile->deprecated_sym_stab_info = (struct dbx_symfile_info *) xmalloc (sizeof (struct dbx_symfile_info)); - memset ((char *) objfile->sym_stab_info, 0, sizeof (struct dbx_symfile_info)); + memset ((char *) objfile->deprecated_sym_stab_info, 0, sizeof (struct dbx_symfile_info)); make_cleanup (free_elfinfo, (void *) objfile); /* Process the normal ELF symbol table first. This may write some - chain of info into the dbx_symfile_info in objfile->sym_stab_info, + chain of info into the dbx_symfile_info in objfile->deprecated_sym_stab_info, which can later be used by elfstab_offset_sections. */ elf_symtab_read (objfile, 0); @@ -594,14 +594,15 @@ elf_symfile_read (struct objfile *objfil dwarf2_build_frame_info (objfile); } -/* This cleans up the objfile's sym_stab_info pointer, and the chain of - stab_section_info's, that might be dangling from it. */ +/* This cleans up the objfile's deprecated_sym_stab_info pointer, and + the chain of stab_section_info's, that might be dangling from + it. */ static void free_elfinfo (void *objp) { struct objfile *objfile = (struct objfile *) objp; - struct dbx_symfile_info *dbxinfo = objfile->sym_stab_info; + struct dbx_symfile_info *dbxinfo = objfile->deprecated_sym_stab_info; struct stab_section_info *ssi, *nssi; ssi = dbxinfo->stab_section_info; @@ -637,9 +638,9 @@ elf_new_init (struct objfile *ignore) static void elf_symfile_finish (struct objfile *objfile) { - if (objfile->sym_stab_info != NULL) + if (objfile->deprecated_sym_stab_info != NULL) { - xfree (objfile->sym_stab_info); + xfree (objfile->deprecated_sym_stab_info); } } @@ -673,7 +674,7 @@ void elfstab_offset_sections (struct objfile *objfile, struct partial_symtab *pst) { char *filename = pst->filename; - struct dbx_symfile_info *dbx = objfile->sym_stab_info; + struct dbx_symfile_info *dbx = objfile->deprecated_sym_stab_info; struct stab_section_info *maybe = dbx->stab_section_info; struct stab_section_info *questionable = 0; int i; Index: gdb-stabs.h =================================================================== RCS file: /cvs/src/src/gdb/gdb-stabs.h,v retrieving revision 1.7 diff -p -u -r1.7 gdb-stabs.h --- gdb-stabs.h 6 Jun 2003 23:32:59 -0000 1.7 +++ gdb-stabs.h 23 Oct 2004 16:13:34 -0000 @@ -44,8 +44,8 @@ struct stab_section_info }; /* Information is passed among various dbxread routines for accessing - symbol files. A pointer to this structure is kept in the sym_stab_info - field of the objfile struct. */ + symbol files. A pointer to this structure is kept in the + deprecated_sym_stab_info field of the objfile struct. */ struct dbx_symfile_info { @@ -74,7 +74,7 @@ struct dbx_symfile_info asection *stab_section; }; -#define DBX_SYMFILE_INFO(o) ((o)->sym_stab_info) +#define DBX_SYMFILE_INFO(o) ((o)->deprecated_sym_stab_info) #define DBX_TEXT_ADDR(o) (DBX_SYMFILE_INFO(o)->text_addr) #define DBX_TEXT_SIZE(o) (DBX_SYMFILE_INFO(o)->text_size) #define DBX_SYMCOUNT(o) (DBX_SYMFILE_INFO(o)->symcount) Index: hpread.c =================================================================== RCS file: /cvs/src/src/gdb/hpread.c,v retrieving revision 1.52 diff -p -u -r1.52 hpread.c --- hpread.c 10 Aug 2004 21:52:04 -0000 1.52 +++ hpread.c 23 Oct 2004 16:13:35 -0000 @@ -75,7 +75,7 @@ struct hpread_symfile_info /* Accessor macros to get at the fields. */ #define HPUX_SYMFILE_INFO(o) \ - ((struct hpread_symfile_info *)((o)->sym_private)) + ((struct hpread_symfile_info *)((o)->deprecated_sym_private)) #define GNTT(o) (HPUX_SYMFILE_INFO(o)->gntt) #define LNTT(o) (HPUX_SYMFILE_INFO(o)->lntt) #define SLT(o) (HPUX_SYMFILE_INFO(o)->slt) @@ -1667,9 +1667,9 @@ hpread_symfile_init (struct objfile *obj asection *vt_section, *slt_section, *lntt_section, *gntt_section; /* Allocate struct to keep track of the symfile */ - objfile->sym_private = + objfile->deprecated_sym_private = xmalloc (sizeof (struct hpread_symfile_info)); - memset (objfile->sym_private, 0, sizeof (struct hpread_symfile_info)); + memset (objfile->deprecated_sym_private, 0, sizeof (struct hpread_symfile_info)); /* We haven't read in any types yet. */ DNTT_TYPE_VECTOR (objfile) = 0; @@ -2284,9 +2284,9 @@ hpread_build_psymtabs (struct objfile *o void hpread_symfile_finish (struct objfile *objfile) { - if (objfile->sym_private != NULL) + if (objfile->deprecated_sym_private != NULL) { - xfree (objfile->sym_private); + xfree (objfile->deprecated_sym_private); } } Index: mdebugread.c =================================================================== RCS file: /cvs/src/src/gdb/mdebugread.c,v retrieving revision 1.64 diff -p -u -r1.64 mdebugread.c --- mdebugread.c 11 Sep 2004 10:24:49 -0000 1.64 +++ mdebugread.c 23 Oct 2004 16:13:36 -0000 @@ -536,9 +536,9 @@ struct mdebug_pending /* The pending information is kept for an entire object file, and used - to be in the sym_private field. I took it out when I split - mdebugread from mipsread, because this might not be the only type - of symbols read from an object file. Instead, we allocate the + to be in the deprecated_sym_private field. I took it out when I + split mdebugread from mipsread, because this might not be the only + type of symbols read from an object file. Instead, we allocate the pending information table when we create the partial symbols, and we store a pointer to the single table in each psymtab. */ Index: nlmread.c =================================================================== RCS file: /cvs/src/src/gdb/nlmread.c,v retrieving revision 1.14 diff -p -u -r1.14 nlmread.c --- nlmread.c 2 Sep 2004 03:05:46 -0000 1.14 +++ nlmread.c 23 Oct 2004 16:13:36 -0000 @@ -211,9 +211,9 @@ nlm_symfile_read (struct objfile *objfil static void nlm_symfile_finish (struct objfile *objfile) { - if (objfile->sym_private != NULL) + if (objfile->deprecated_sym_private != NULL) { - xfree (objfile->sym_private); + xfree (objfile->deprecated_sym_private); } } Index: objfiles.h =================================================================== RCS file: /cvs/src/src/gdb/objfiles.h,v retrieving revision 1.39 diff -p -u -r1.39 objfiles.h --- objfiles.h 2 Sep 2004 03:05:46 -0000 1.39 +++ objfiles.h 23 Oct 2004 16:13:36 -0000 @@ -338,26 +338,35 @@ struct objfile /* Information about stabs. Will be filled in with a dbx_symfile_info struct by those readers that need it. */ + /* NOTE: cagney/2004-10-23: This has been replaced by per-objfile + data points implemented using "data" and "num_data" below. For + an example of how to use this replacement, see "objfile_data" + in "mips-tdep.c". */ - struct dbx_symfile_info *sym_stab_info; + struct dbx_symfile_info *deprecated_sym_stab_info; /* Hook for information for use by the symbol reader (currently used for information shared by sym_init and sym_read). It is typically a pointer to malloc'd memory. The symbol reader's finish function is responsible for freeing the memory thusly allocated. */ + /* NOTE: cagney/2004-10-23: This has been replaced by per-objfile + data points implemented using "data" and "num_data" below. For + an example of how to use this replacement, see "objfile_data" + in "mips-tdep.c". */ - void *sym_private; + void *deprecated_sym_private; /* Hook for target-architecture-specific information. This must point to memory allocated on one of the obstacks in this objfile, so that it gets freed automatically when reading a new object file. */ - void *obj_private; + void *deprecated_obj_private; /* Per objfile data-pointers required by other GDB modules. */ /* FIXME: kettenis/20030711: This mechanism could replace - sym_stab_info, sym_private and obj_private entirely. */ + deprecated_sym_stab_info, deprecated_sym_private and + deprecated_obj_private entirely. */ void **data; unsigned num_data; Index: somread.c =================================================================== RCS file: /cvs/src/src/gdb/somread.c,v retrieving revision 1.24 diff -p -u -r1.24 somread.c --- somread.c 10 Aug 2004 21:52:05 -0000 1.24 +++ somread.c 23 Oct 2004 16:13:37 -0000 @@ -378,7 +378,7 @@ som_symfile_read (struct objfile *objfil hpread_build_psymtabs (objfile, mainline); /* Force hppa-tdep.c to re-read the unwind descriptors. */ - objfile->obj_private = NULL; + objfile->deprecated_obj_private = NULL; } /* Initialize anything that needs initializing when a completely new symbol @@ -402,9 +402,9 @@ som_new_init (struct objfile *ignore) static void som_symfile_finish (struct objfile *objfile) { - if (objfile->sym_stab_info != NULL) + if (objfile->deprecated_sym_stab_info != NULL) { - xfree (objfile->sym_stab_info); + xfree (objfile->deprecated_sym_stab_info); } hpread_symfile_finish (objfile); } Index: symfile.c =================================================================== RCS file: /cvs/src/src/gdb/symfile.c,v retrieving revision 1.143 diff -p -u -r1.143 symfile.c --- symfile.c 1 Oct 2004 10:23:09 -0000 1.143 +++ symfile.c 23 Oct 2004 16:13:37 -0000 @@ -1908,7 +1908,7 @@ reread_symbols (void) objfile->free_psymtabs = NULL; objfile->cp_namespace_symtab = NULL; objfile->msymbols = NULL; - objfile->sym_private = NULL; + objfile->deprecated_sym_private = NULL; objfile->minimal_symbol_count = 0; memset (&objfile->msymbol_hash, 0, sizeof (objfile->msymbol_hash)); Index: xcoffread.c =================================================================== RCS file: /cvs/src/src/gdb/xcoffread.c,v retrieving revision 1.43 diff -p -u -r1.43 xcoffread.c --- xcoffread.c 10 Aug 2004 23:48:28 -0000 1.43 +++ xcoffread.c 23 Oct 2004 16:13:38 -0000 @@ -553,7 +553,7 @@ process_linenos (CORE_ADDR start, CORE_A { int offset, ii; file_ptr max_offset = - ((struct coff_symfile_info *) this_symtab_psymtab->objfile->sym_private) + ((struct coff_symfile_info *) this_symtab_psymtab->objfile->deprecated_sym_private) ->max_lineno_offset; /* subfile structure for the main compilation unit. */ @@ -762,7 +762,7 @@ enter_line_range (struct subfile *subfil return; curoffset = beginoffset; limit_offset = - ((struct coff_symfile_info *) this_symtab_psymtab->objfile->sym_private) + ((struct coff_symfile_info *) this_symtab_psymtab->objfile->deprecated_sym_private) ->max_lineno_offset; if (endoffset != 0) @@ -882,7 +882,7 @@ xcoff_next_symbol_text (struct objfile * else if (symbol.n_sclass & 0x80) { retval = - ((struct coff_symfile_info *) objfile->sym_private)->debugsec + ((struct coff_symfile_info *) objfile->deprecated_sym_private)->debugsec + symbol.n_offset; raw_symbol += coff_data (objfile->obfd)->local_symesz; @@ -907,9 +907,9 @@ read_xcoff_symtab (struct partial_symtab struct objfile *objfile = pst->objfile; bfd *abfd = objfile->obfd; char *raw_auxptr; /* Pointer to first raw aux entry for sym */ - char *strtbl = ((struct coff_symfile_info *) objfile->sym_private)->strtbl; + char *strtbl = ((struct coff_symfile_info *) objfile->deprecated_sym_private)->strtbl; char *debugsec = - ((struct coff_symfile_info *) objfile->sym_private)->debugsec; + ((struct coff_symfile_info *) objfile->deprecated_sym_private)->debugsec; char *debugfmt = bfd_xcoff_is_xcoff64 (abfd) ? "XCOFF64" : "XCOFF"; struct internal_syment symbol[1]; @@ -955,7 +955,7 @@ read_xcoff_symtab (struct partial_symtab first_object_file_end = 0; raw_symbol = - ((struct coff_symfile_info *) objfile->sym_private)->symtbl + ((struct coff_symfile_info *) objfile->deprecated_sym_private)->symtbl + symnum * local_symesz; while (symnum < max_symnum) @@ -1581,7 +1581,7 @@ coff_getfilename (union internal_auxent if (aux_entry->x_file.x_n.x_zeroes == 0) strcpy (buffer, - ((struct coff_symfile_info *) objfile->sym_private)->strtbl + ((struct coff_symfile_info *) objfile->deprecated_sym_private)->strtbl + aux_entry->x_file.x_n.x_offset); else { @@ -1596,11 +1596,9 @@ static void read_symbol (struct internal_syment *symbol, int symno) { int nsyms = - ((struct coff_symfile_info *) this_symtab_psymtab->objfile->sym_private) - ->symtbl_num_syms; + ((struct coff_symfile_info *) this_symtab_psymtab->objfile->deprecated_sym_private)->symtbl_num_syms; char *stbl = - ((struct coff_symfile_info *) this_symtab_psymtab->objfile->sym_private) - ->symtbl; + ((struct coff_symfile_info *) this_symtab_psymtab->objfile->deprecated_sym_private)->symtbl; if (symno < 0 || symno >= nsyms) { complaint (&symfile_complaints, "Invalid symbol offset"); @@ -1635,7 +1633,7 @@ read_symbol_lineno (int symno) int xcoff64 = bfd_xcoff_is_xcoff64 (objfile->obfd); struct coff_symfile_info *info = - (struct coff_symfile_info *)objfile->sym_private; + (struct coff_symfile_info *)objfile->deprecated_sym_private; int nsyms = info->symtbl_num_syms; char *stbl = info->symtbl; char *strtbl = info->strtbl; @@ -1838,7 +1836,7 @@ static void xcoff_symfile_init (struct objfile *objfile) { /* Allocate struct to keep track of the symfile */ - objfile->sym_private = xmalloc (sizeof (struct coff_symfile_info)); + objfile->deprecated_sym_private = xmalloc (sizeof (struct coff_symfile_info)); /* XCOFF objects may be reordered, so set OBJF_REORDERED. If we find this causes a significant slowdown in gdb then we could @@ -1856,9 +1854,9 @@ xcoff_symfile_init (struct objfile *objf static void xcoff_symfile_finish (struct objfile *objfile) { - if (objfile->sym_private != NULL) + if (objfile->deprecated_sym_private != NULL) { - xfree (objfile->sym_private); + xfree (objfile->deprecated_sym_private); } /* Start with a fresh include table for the next objfile. */ @@ -1879,7 +1877,7 @@ init_stringtab (bfd *abfd, file_ptr offs unsigned char lengthbuf[4]; char *strtbl; - ((struct coff_symfile_info *) objfile->sym_private)->strtbl = NULL; + ((struct coff_symfile_info *) objfile->deprecated_sym_private)->strtbl = NULL; if (bfd_seek (abfd, offset, SEEK_SET) < 0) error ("cannot seek to string table in %s: %s", @@ -1898,7 +1896,7 @@ init_stringtab (bfd *abfd, file_ptr offs as long as we have its symbol table around. */ strtbl = (char *) obstack_alloc (&objfile->objfile_obstack, length); - ((struct coff_symfile_info *) objfile->sym_private)->strtbl = strtbl; + ((struct coff_symfile_info *) objfile->deprecated_sym_private)->strtbl = strtbl; /* Copy length buffer, the first byte is usually zero and is used for stabs with a name length of zero. */ @@ -2093,12 +2091,12 @@ swap_sym (struct internal_syment *symbol } else if (symbol->n_sclass & 0x80) { - *name = ((struct coff_symfile_info *) objfile->sym_private)->debugsec + *name = ((struct coff_symfile_info *) objfile->deprecated_sym_private)->debugsec + symbol->n_offset; } else { - *name = ((struct coff_symfile_info *) objfile->sym_private)->strtbl + *name = ((struct coff_symfile_info *) objfile->deprecated_sym_private)->strtbl + symbol->n_offset; } ++*symnump; @@ -2173,8 +2171,8 @@ scan_xcoff_symtab (struct objfile *objfi abfd = objfile->obfd; - sraw_symbol = ((struct coff_symfile_info *) objfile->sym_private)->symtbl; - nsyms = ((struct coff_symfile_info *) objfile->sym_private)->symtbl_num_syms; + sraw_symbol = ((struct coff_symfile_info *) objfile->deprecated_sym_private)->symtbl; + nsyms = ((struct coff_symfile_info *) objfile->deprecated_sym_private)->symtbl_num_syms; ssymnum = 0; while (ssymnum < nsyms) { @@ -2823,7 +2821,7 @@ scan_xcoff_symtab (struct objfile *objfi If no XMC_TC0 is found, toc_offset should be zero. Another place to obtain this information would be file auxiliary header. */ - ((struct coff_symfile_info *) objfile->sym_private)->toc_offset = toc_offset; + ((struct coff_symfile_info *) objfile->deprecated_sym_private)->toc_offset = toc_offset; } /* Return the toc offset value for a given objfile. */ @@ -2832,7 +2830,7 @@ CORE_ADDR get_toc_offset (struct objfile *objfile) { if (objfile) - return ((struct coff_symfile_info *) objfile->sym_private)->toc_offset; + return ((struct coff_symfile_info *) objfile->deprecated_sym_private)->toc_offset; return 0; } @@ -2859,7 +2857,7 @@ xcoff_initial_scan (struct objfile *objf char *name; unsigned int size; - info = (struct coff_symfile_info *) objfile->sym_private; + info = (struct coff_symfile_info *) objfile->deprecated_sym_private; symfile_bfd = abfd = objfile->obfd; name = objfile->name; @@ -2900,7 +2898,7 @@ xcoff_initial_scan (struct objfile *objf } } } - ((struct coff_symfile_info *) objfile->sym_private)->debugsec = + ((struct coff_symfile_info *) objfile->deprecated_sym_private)->debugsec = debugsec; } } @@ -2912,12 +2910,12 @@ xcoff_initial_scan (struct objfile *objf error ("Error reading symbols from %s: %s", name, bfd_errmsg (bfd_get_error ())); size = coff_data (abfd)->local_symesz * num_symbols; - ((struct coff_symfile_info *) objfile->sym_private)->symtbl = + ((struct coff_symfile_info *) objfile->deprecated_sym_private)->symtbl = obstack_alloc (&objfile->objfile_obstack, size); - ((struct coff_symfile_info *) objfile->sym_private)->symtbl_num_syms = + ((struct coff_symfile_info *) objfile->deprecated_sym_private)->symtbl_num_syms = num_symbols; - val = bfd_bread (((struct coff_symfile_info *) objfile->sym_private)->symtbl, + val = bfd_bread (((struct coff_symfile_info *) objfile->deprecated_sym_private)->symtbl, size, abfd); if (val != size) perror_with_name ("reading symbol table"); --------------050505030305070907070909--