This is the mail archive of the gdb-patches@sourceware.cygnus.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

(patch) hpjyg05: somread.c and related


This begins the group of patches for SOM reader and related enhancements
/ fixes.  I'm trying to balance the size (and inversely the number) of
the patches vs. patch testing (I'm running tests on HP and Linux Redhat
6.0 for each patch I'm to send out).  Let's hope it will turn out to be
99 patches as Stan joked :)

So, this patch is about HP SOM format reader and symbol handling,
specifically changes to somread.c and other files affected.

- Jimmy Guo, guo@cup.hp.com

Index: gdb/ChangeLog
/opt/gnu/bin/diff -r -c -N  /view/guo.wdb.c//CLO/Components/WDB/Src/gnu/gdb/ChangeLog gdb/ChangeLog
*** /view/guo.wdb.c//CLO/Components/WDB/Src/gnu/gdb/ChangeLog	Mon Nov  1 13:36:12 1999
--- gdb/ChangeLog	Tue Nov  2 15:29:07 1999
***************
*** 1,4 ****
--- 1,71 ----
+ 1999-11-02	Jimmy Guo	<guo@cup.hp.com>
+ 
+ 	* somread.c (som_symtab_read): Detect between shared-bound &
+ 	archive-bound program; use IS_RELOC_ONLY_SYMBOL in
+ 	check_strange_names; ignore data unsats except for
+ 	cma__g_known_threads.
+ 	(som_symfile_init,som_symfile_read): Add threshold_exceeded arg
+ 	for auto-solib-add threshold support.
+ 	(som_symfile_add_psymtabs): New function to be part of sym_fns
+ 	vector.
+ 	(init_import_symbols): Record dlt_addr in import_list.
+ 	(som_sym_fns): Add som_symfile_add_psymtabs into vector.
+ 
+ 	* symfile.c (generic_copy_exists, permanent_copy_exists): memory
+ 	tuning ... use existing storage if available.
+ 	(syms_from_objfile, sym_init, sym_read): Add threshold_exceeded
+ 	arg.
+ 	(maybe_symbol_file_add): New function, same as the original
+ 	symbol_file_add but with the threshold_exceeded arg & support.
+ 	(symbol_file_add): Now calls maybe_symbol_file_add with 0 as
+ 	threshold_exceeded.
+ 	(set_initial_language): Use cached language information in
+ 	psymtab.
+ 	(symfile_bfd_open_with_path_type): New function, same as the
+ 	original symfile_bfd_open but takes file path arg, etc.
+ 	(symfile_bfd_open): Now calls symfile_bfd_open_with_path_type
+ 	with getenv("PATH") as path.
+ 	(add_symbol_file_command): 32x64 fix.
+ 	(reread_symbols): sym_init, sym_read calling interface change.
+ 	(init_filename_language_table): Add .f90 suffix for
+ 	language_fortran.
+ 	(allocate_symtab,add_psymbol_to_list): memory tuning, use
+ 	existing storage when possible.
+ 	(allocate_psymtab): record language type, memory tuning.
+ 	(solib_clear_symtab_users): New function, almost same as the
+ 	original clear_symtab_users except that it does not call
+ 	target_new_objfile (NULL).
+ 	(clear_symtab_users): Now calls solib_clear_symtab_users to do
+ 	most of the things except for target_new_objfile (NULL).
+ 	(add_psymbol_with_dem_name_to_list): Add fortran support.
+ 	
+ 	* objfiles.c (is_in_import_list): import_list is now a structure
+ 	with name and dlt_addr fields, change accordingly.
+ 
+ 	* symfile.h (sym_init,sym_read): One more arg for
+ 	threshold_exceeded.
+ 	(sym_add_psymtabs): New slot.
+ 	(maybe_symbol_file_add,symfile_bfd_open_with_path_type): Declare.
+ 
+ 	* symtab.h (general_symbol_info.language_specific): Add
+ 	fortran_specific.
+ 	(SYMBOL_FORTRAN_DEMANGLED_NAME,SYMBOL_VAR_OFFSET): Declare.
+ 	(SYMBOL_INIT_LANGUAGE_SPECIFIC, SYMBOL_DEMANGLED_NAME): Add
+ 	fortran support.
+ 	(partial_symtab): Add language field.
+ 	(solib_clear_symtab_users): Declare.
+ 
+ 	* objfiles.h (ImportEntry): Change to struct type with name and
+ 	dlt_addr fields.
+ 
+ 	* config/pa/tm-hppa.h (IS_RELOC_ONLY_SYMBOL): Add.
+ 
+ 	* coffread.c,dbxread.c,dstread.c,elfread.c,mipsread.c,nlmread.c,
+ 	os9kread.c,xcoffread.c: Add an int argument to sym_init() &
+ 	sym_read() interfaces; add a slot in sym_fns vector.
+ 
  1999-11-01	Jimmy Guo	<guo@cup.hp.com>
+ 
  	* c-typeprint.c
  	(c_type_print_varspec_prefix,c_type_print_varpsec_suffix): Add
  	TYPE_CODE_TEMPLATE case and default case.
Index: gdb/somread.c
/opt/gnu/bin/diff -r -c -N  /view/guo.wdb.c//CLO/Components/WDB/Src/gnu/gdb/somread.c gdb/somread.c
*** /view/guo.wdb.c//CLO/Components/WDB/Src/gnu/gdb/somread.c	Mon Nov  1 17:40:34 1999
--- gdb/somread.c	Tue Nov  2 15:32:22 1999
***************
*** 32,49 ****
  #include "gdb_string.h"
  #include "demangle.h"
  #include "som.h"
  #include "libhppa.h"
  
  /* Various things we might complain about... */
  
  static void
! som_symfile_init PARAMS ((struct objfile *));
  
  static void
  som_new_init PARAMS ((struct objfile *));
  
  static void
! som_symfile_read PARAMS ((struct objfile *, int));
  
  static void
  som_symfile_finish PARAMS ((struct objfile *));
--- 32,50 ----
  #include "gdb_string.h"
  #include "demangle.h"
  #include "som.h"
+ #include "hpread.h"
  #include "libhppa.h"
  
  /* Various things we might complain about... */
  
  static void
! som_symfile_init PARAMS ((struct objfile *, int));
  
  static void
  som_new_init PARAMS ((struct objfile *));
  
  static void
! som_symfile_read PARAMS ((struct objfile *, int, int));
  
  static void
  som_symfile_finish PARAMS ((struct objfile *));
***************
*** 102,108 ****
    char *symname;
    CONST int symsize = sizeof (struct symbol_dictionary_record);
    CORE_ADDR text_offset, data_offset;
! 
  
    text_offset = ANOFFSET (section_offsets, 0);
    data_offset = ANOFFSET (section_offsets, 1);
--- 103,109 ----
    char *symname;
    CONST int symsize = sizeof (struct symbol_dictionary_record);
    CORE_ADDR text_offset, data_offset;
!   int section;
  
    text_offset = ANOFFSET (section_offsets, 0);
    data_offset = ANOFFSET (section_offsets, 1);
***************
*** 141,146 ****
--- 142,184 ----
     */
    dynamic = (text_offset != 0);
  
+   /* 
+    * srikanth, 981006, CLLbs16090, the code fragment above i.e., 
+    * 
+    *         dynamic = (text_offset != 0);  
+    * 
+    * is distinguishing between a .sl and a main program && _not_ between a
+    * shared bound and an archive bound program. What we want is the latter 
+    * as we are basically interested in trying to separate out import and 
+    * export stubs from actual functions. The minimal symbol type ST_ENTRY 
+    * in a shared bound binary refers to a stub while ST_CODE refers to the 
+    * actual function ...  
+    *
+    * According to PA32 runtime doucument, on 10.0 and later versions of 
+    * HP-UX the correct answer to this question is obtained by looking into 
+    * the first word in the TEXT space and if this matches the symbolic const
+    * DL_HDR_VERSION2 defined in <shl.h> then the binary is an incomplete one. 
+    *
+    */
+ 
+   if (!dynamic)			/* don't bother if it is known to be a .sl */
+     {
+       asection *text_section;	/* section handle */
+       unsigned int dl_header_version;
+ 
+       /* $TEXT$ space begins with $SHLIB_INFO$ subspace */
+       text_section = bfd_get_section_by_name (objfile->obfd, "$SHLIB_INFO$");
+       if (text_section)
+ 	{
+ 	  /* Get the first word from the TEXT space */
+ 	  bfd_get_section_contents (objfile->obfd, text_section,
+ 				    &dl_header_version, 0, sizeof (int));
+ 
+ 	  if (dl_header_version == DL_HDR_VERSION_ID2)
+ 	    dynamic = 1;
+ 	}
+     }
+ 
    endbufp = buf + number_of_symbols;
    for (bufp = buf; bufp < endbufp; ++bufp)
      {
***************
*** 164,169 ****
--- 202,208 ----
  	    case ST_MILLICODE:
  	      symname = bufp->name.n_strx + stringtab;
  	      ms_type = mst_text;
+ 	      section = SECT_OFF_TEXT;
  	      bufp->symbol_value += text_offset;
  #ifdef SMASH_TEXT_ADDRESS
  	      SMASH_TEXT_ADDRESS (bufp->symbol_value);
***************
*** 179,184 ****
--- 218,224 ----
  		ms_type = mst_solib_trampoline;
  	      else
  		ms_type = mst_text;
+ 	      section = SECT_OFF_TEXT;
  	      bufp->symbol_value += text_offset;
  #ifdef SMASH_TEXT_ADDRESS
  	      SMASH_TEXT_ADDRESS (bufp->symbol_value);
***************
*** 188,193 ****
--- 228,234 ----
  	    case ST_STUB:
  	      symname = bufp->name.n_strx + stringtab;
  	      ms_type = mst_solib_trampoline;
+ 	      section = SECT_OFF_TEXT;
  	      bufp->symbol_value += text_offset;
  #ifdef SMASH_TEXT_ADDRESS
  	      SMASH_TEXT_ADDRESS (bufp->symbol_value);
***************
*** 198,203 ****
--- 239,245 ----
  	      symname = bufp->name.n_strx + stringtab;
  	      bufp->symbol_value += data_offset;
  	      ms_type = mst_data;
+ 	      section = SECT_OFF_DATA;
  	      break;
  	    default:
  	      continue;
***************
*** 218,223 ****
--- 260,266 ----
  	    case ST_CODE:
  	      symname = bufp->name.n_strx + stringtab;
  	      ms_type = mst_file_text;
+ 	      section = SECT_OFF_TEXT;
  	      bufp->symbol_value += text_offset;
  #ifdef SMASH_TEXT_ADDRESS
  	      SMASH_TEXT_ADDRESS (bufp->symbol_value);
***************
*** 238,248 ****
  	         And finally, the newer HP compilers emit crud like $PIC_foo$N
  	         in some circumstance (PIC code I guess).  It's also claimed
  	         that they emit D$ symbols too.  What stupidity.  */
! 	      if ((symname[0] == 'L' && symname[1] == '$')
! 	      || (symname[0] == '$' && symname[strlen (symname) - 1] == '$')
! 		  || (symname[0] == 'D' && symname[1] == '$')
! 		  || (strncmp (symname, "$PIC", 4) == 0))
  		continue;
  	      break;
  
  	    case ST_PRI_PROG:
--- 281,290 ----
  	         And finally, the newer HP compilers emit crud like $PIC_foo$N
  	         in some circumstance (PIC code I guess).  It's also claimed
  	         that they emit D$ symbols too.  What stupidity.  */
! 
! 	      if (IS_RELOC_ONLY_SYMBOL (symname))
  		continue;
+ 
  	      break;
  
  	    case ST_PRI_PROG:
***************
*** 250,255 ****
--- 292,298 ----
  	    case ST_MILLICODE:
  	      symname = bufp->name.n_strx + stringtab;
  	      ms_type = mst_file_text;
+ 	      section = SECT_OFF_TEXT;
  	      bufp->symbol_value += text_offset;
  #ifdef SMASH_TEXT_ADDRESS
  	      SMASH_TEXT_ADDRESS (bufp->symbol_value);
***************
*** 261,270 ****
  	      /* For a dynamic executable, ST_ENTRY symbols are
  	         the stubs, while the ST_CODE symbol is the real
  	         function.  */
! 	      if (dynamic)
! 		ms_type = mst_solib_trampoline;
! 	      else
! 		ms_type = mst_file_text;
  	      bufp->symbol_value += text_offset;
  #ifdef SMASH_TEXT_ADDRESS
  	      SMASH_TEXT_ADDRESS (bufp->symbol_value);
--- 304,312 ----
  	      /* For a dynamic executable, ST_ENTRY symbols are
  	         the stubs, while the ST_CODE symbol is the real
  	         function.  */
! 	      /* RM: ??? file local stubs? I don't think so. */
! 	      ms_type = mst_file_text;
! 	      section = SECT_OFF_TEXT;
  	      bufp->symbol_value += text_offset;
  #ifdef SMASH_TEXT_ADDRESS
  	      SMASH_TEXT_ADDRESS (bufp->symbol_value);
***************
*** 274,291 ****
  	    case ST_STUB:
  	      symname = bufp->name.n_strx + stringtab;
  	      ms_type = mst_solib_trampoline;
  	      bufp->symbol_value += text_offset;
  #ifdef SMASH_TEXT_ADDRESS
  	      SMASH_TEXT_ADDRESS (bufp->symbol_value);
  #endif
  	      break;
  
- 
  	    case ST_DATA:
! 	      symname = bufp->name.n_strx + stringtab;
! 	      bufp->symbol_value += data_offset;
! 	      ms_type = mst_file_data;
! 	      goto check_strange_names;
  
  	    default:
  	      continue;
--- 316,330 ----
  	    case ST_STUB:
  	      symname = bufp->name.n_strx + stringtab;
  	      ms_type = mst_solib_trampoline;
+ 	      section = SECT_OFF_TEXT;
  	      bufp->symbol_value += text_offset;
  #ifdef SMASH_TEXT_ADDRESS
  	      SMASH_TEXT_ADDRESS (bufp->symbol_value);
  #endif
  	      break;
  
  	    case ST_DATA:
! 	      continue;
  
  	    default:
  	      continue;
***************
*** 298,312 ****
  
  	     This also happens for weak symbols, but their type is
  	     ST_DATA.  */
  	case SS_UNSAT:
  	  switch (bufp->symbol_type)
  	    {
  	    case ST_STORAGE:
  	    case ST_DATA:
  	      symname = bufp->name.n_strx + stringtab;
! 	      bufp->symbol_value += data_offset;
! 	      ms_type = mst_data;
! 	      break;
  
  	    default:
  	      continue;
--- 337,369 ----
  
  	     This also happens for weak symbols, but their type is
  	     ST_DATA.  */
+ 	  /* RM: Hmm, data unsat's aren't necessarily weak
+ 	     symbols. And their value field doesn't necessarily hold a
+ 	     valid value. Let's just ignore them for now. 
+ 
+ 	     BUT the CMA implementation needs to find cma__g_known_threads
+ 	     which is an ST_DATA, so we have a speical case (for the moment)
+ 	     to accept cma__g_known_threads.  What we really need is to
+ 	     be able to tell which ones are valid and which are
+ 	     bogus.
+ 	   */
  	case SS_UNSAT:
  	  switch (bufp->symbol_type)
  	    {
  	    case ST_STORAGE:
  	    case ST_DATA:
  	      symname = bufp->name.n_strx + stringtab;
! 	      if (bufp->symbol_type == ST_STORAGE
! 		  || strcmp (symname, "cma__g_known_threads") == 0
! 		)
! 		{
! 		  bufp->symbol_value += data_offset;
! 		  ms_type = mst_data;
! 		  section = SECT_OFF_DATA;
! 		  break;
! 		}
! 	      else
! 		continue;
  
  	    default:
  	      continue;
***************
*** 321,328 ****
  	error ("Invalid symbol data; bad HP string table offset: %d",
  	       bufp->name.n_strx);
  
!       prim_record_minimal_symbol (symname, bufp->symbol_value, ms_type,
! 				  objfile);
      }
  }
  
--- 378,389 ----
  	error ("Invalid symbol data; bad HP string table offset: %d",
  	       bufp->name.n_strx);
  
!       /* RM: ??? !!! we are assuming that bufp->symbol_type can be
!        * fitted into a char * -- probably true, but should be fixed
!        * sometime. */
!       prim_record_minimal_symbol_and_info (symname, bufp->symbol_value,
! 					ms_type, (char *) bufp->symbol_type,
! 					   section, NULL, objfile);
      }
  }
  
***************
*** 330,338 ****
     We have been initialized by a call to som_symfile_init, which 
     currently does nothing.
  
-    SECTION_OFFSETS is a set of offsets to apply to relocate the symbols
-    in each section.  This is ignored, as it isn't needed for SOM.
- 
     MAINLINE is true if we are reading the main symbol
     table (as opposed to a shared lib or dynamically loaded file).
  
--- 391,396 ----
***************
*** 356,364 ****
     capability even for files compiled without -g.  */
  
  static void
! som_symfile_read (objfile, mainline)
       struct objfile *objfile;
       int mainline;
  {
    bfd *abfd = objfile->obfd;
    struct cleanup *back_to;
--- 414,423 ----
     capability even for files compiled without -g.  */
  
  static void
! som_symfile_read (objfile, mainline, threshold_exceeded)
       struct objfile *objfile;
       int mainline;
+      int threshold_exceeded;
  {
    bfd *abfd = objfile->obfd;
    struct cleanup *back_to;
***************
*** 373,384 ****
       hp-symtab-read.c to handle static vars declared in other
       shared libraries. */
    init_import_symbols (objfile);
! #if 0				/* Export symbols not used today 1997-08-05 */
!   init_export_symbols (objfile);
! #else
    objfile->export_list = NULL;
    objfile->export_list_size = 0;
- #endif
  
    /* Process the normal SOM symbol table first. 
       This reads in the DNTT and string table, but doesn't
--- 432,450 ----
       hp-symtab-read.c to handle static vars declared in other
       shared libraries. */
    init_import_symbols (objfile);
! 
! 
!   /* RM: We need the export list to find "main" in stripped
!      executables. We need to find "main" so we can read shared library
!      information right after dld has run. */
! 
!   /* srikanth, 990629, let us not read in the dld export list right now. It is
!      useful only in rare situations (see above.) Even in that case, we need to
!      read in the export list of only the main load module. If needed somsolib.c
!      will slurp it in. */
! 
    objfile->export_list = NULL;
    objfile->export_list_size = 0;
  
    /* Process the normal SOM symbol table first. 
       This reads in the DNTT and string table, but doesn't
***************
*** 387,417 ****
  
    som_symtab_read (abfd, objfile, objfile->section_offsets);
  
!   /* Now read information from the stabs debug sections.
!      This is a no-op for SOM.
!      Perhaps it is intended for some kind of mixed STABS/SOM
!      situation? */
!   stabsect_build_psymtabs (objfile, mainline,
! 			   "$GDB_SYMBOLS$", "$GDB_STRINGS$", "$TEXT$");
  
-   /* Now read the native debug information. 
-      This builds the psymtab. This used to be done via a scan of
-      the DNTT, but is now done via the PXDB-built quick-lookup tables
-      together with a scan of the GNTT. See hp-psymtab-read.c. */
-   hpread_build_psymtabs (objfile, mainline);
  
!   /* Install any minimal symbols that have been collected as the current
!      minimal symbols for this objfile. 
!      Further symbol-reading is done incrementally, file-by-file,
       in a step known as "psymtab-to-symtab" expansion. hp-symtab-read.c
       contains the code to do the actual DNTT scanning and symtab building. */
-   install_minimal_symbols (objfile);
  
!   /* Force hppa-tdep.c to re-read the unwind descriptors.  */
    objfile->obj_private = NULL;
    do_cleanups (back_to);
  }
  
  /* Initialize anything that needs initializing when a completely new symbol
     file is specified (not just adding some symbols from another file, e.g. a
     shared library).
--- 453,524 ----
  
    som_symtab_read (abfd, objfile, objfile->section_offsets);
  
!   if (!threshold_exceeded)
!     {
!       /* Now read information from the stabs debug sections.  This is
!          a no-op for SOM.  Perhaps it is intended for some kind of
!          mixed STABS/SOM situation? */
!       stabsect_build_psymtabs (objfile, mainline,
! 			       "$GDB_SYMBOLS$", "$GDB_STRINGS$", "$TEXT$");
!     }
  
  
!   /* "Install" the minimal symbols that have been collected above.
!      The actual "minsym"'s are constructed here, and such things
!      as name demangling takes place here. */
!   /* RM: This used to be done _after_ we built the psymtab. For DOOM,
!      though, I need the minimal symbol tables to be available _before_
!      I build the psymtabs. I think moving this up should be okay. */
!   /* RM: but we do need to explicitly set the demangling style to
!      hp. This used to be done by hpread_build_psymtabs (it still is,
!      but it's too late by then). */
!   /* Demangling style -- if EDG style already set, don't change it,
!      as HP style causes some problems with the KAI EDG compiler */
!   /* CM: Force it to HP only if we see any spaces with the following
!      names. These are the names of the spaces that contain debug
!      information produced by HP compilers. */
!   if (bfd_get_section_by_name (abfd, "$OBJDEBUG$") ||
!       bfd_get_section_by_name (abfd, "$DEBUG$") ||
!       bfd_get_section_by_name (abfd, "$PINFO$"))
!     {
!       if (current_demangling_style != edg_demangling)
! 	{
! 	  /* Otherwise, ensure that we are using HP style demangling */
! 	  set_demangling_style (HP_DEMANGLING_STYLE_STRING);
! 	}
!     }
!   install_minimal_symbols (objfile);
! 
! 
!   /* Now read the native debug information.  This builds the
!      psymtab. This used to be done via a scan of the DNTT, but is now
!      done via the PXDB-built quick-lookup tables together with a scan
!      of the GNTT. See hp-psymtab-read.c. */
!   if (!threshold_exceeded)
!     {
!       hpread_build_psymtabs (objfile, mainline);
!     }
! 
!   /* Further symbol-reading is done incrementally, file-by-file,
       in a step known as "psymtab-to-symtab" expansion. hp-symtab-read.c
       contains the code to do the actual DNTT scanning and symtab building. */
  
!   /* Force hppa-tdep.c to re-read the unwind descriptors. */
    objfile->obj_private = NULL;
    do_cleanups (back_to);
  }
  
+ static void
+ som_symfile_add_psymtabs (objfile, mainline)
+      struct objfile *objfile;
+      int mainline;
+ {
+   hpread_symfile_init (objfile);
+   stabsect_build_psymtabs (objfile, mainline,
+ 			   "$GDB_SYMBOLS$", "$GDB_STRINGS$", "$TEXT$");
+   hpread_build_psymtabs (objfile, mainline);
+ }
+ 
  /* Initialize anything that needs initializing when a completely new symbol
     file is specified (not just adding some symbols from another file, e.g. a
     shared library).
***************
*** 445,458 ****
  /* SOM specific initialization routine for reading symbols.  */
  
  static void
! som_symfile_init (objfile)
       struct objfile *objfile;
  {
    /* SOM objects may be reordered, so set OBJF_REORDERED.  If we
       find this causes a significant slowdown in gdb then we could
       set it in the debug symbol readers only when necessary.  */
    objfile->flags |= OBJF_REORDERED;
!   hpread_symfile_init (objfile);
  }
  
  /* SOM specific parsing routine for section offsets.
--- 552,569 ----
  /* SOM specific initialization routine for reading symbols.  */
  
  static void
! som_symfile_init (objfile, threshold_exceeded)
       struct objfile *objfile;
+      int threshold_exceeded;
  {
    /* SOM objects may be reordered, so set OBJF_REORDERED.  If we
       find this causes a significant slowdown in gdb then we could
       set it in the debug symbol readers only when necessary.  */
    objfile->flags |= OBJF_REORDERED;
!   if (!threshold_exceeded)
!     {
!       hpread_symfile_init (objfile);
!     }
  }
  
  /* SOM specific parsing routine for section offsets.
***************
*** 475,481 ****
    if (!som_solib_section_offsets (objfile, objfile->section_offsets))
      {
        for (i = 0; i < SECT_OFF_MAX; i++)
! 	ANOFFSET (objfile->section_offsets, i) = addrs -> text_addr;
      }
  }
  
--- 586,592 ----
    if (!som_solib_section_offsets (objfile, objfile->section_offsets))
      {
        for (i = 0; i < SECT_OFF_MAX; i++)
! 	ANOFFSET (objfile->section_offsets, i) = addrs->text_addr;
      }
  }
  
***************
*** 499,504 ****
--- 610,617 ----
    register int k;
    asection *text_section;	/* section handle */
    unsigned int dl_header[12];	/* SOM executable header */
+   asection *dlt_section;
+   CORE_ADDR dlt_start;
  
    /* A struct for an entry in the SOM import list */
    typedef struct
***************
*** 521,526 ****
--- 634,645 ----
  
    /* It doesn't work, for some reason, to read in space $TEXT$;
       the subspace $SHLIB_INFO$ has to be used.  Some BFD quirk? pai/1997-08-05 */
+ 
+   /* I believe this is because a "section" in bfd terms refers to a 
+    * subspace in SOM terms and further because SHLIB_INFO is the first 
+    * subspace in $TEXT$ space  --- srikanth, 981007
+    */
+ 
    text_section = bfd_get_section_by_name (objfile->obfd, "$SHLIB_INFO$");
    if (!text_section)
      return 0;
***************
*** 530,536 ****
    /* Check header version number for 10.x HP-UX */
    /* Currently we deal only with 10.x systems; on 9.x the version # is 89060912.
       FIXME: Change for future HP-UX releases and mods to the SOM executable format */
!   if (dl_header[0] != 93092112)
      return 0;
  
    import_list = dl_header[4];
--- 649,655 ----
    /* Check header version number for 10.x HP-UX */
    /* Currently we deal only with 10.x systems; on 9.x the version # is 89060912.
       FIXME: Change for future HP-UX releases and mods to the SOM executable format */
!   if (dl_header[0] != DL_HDR_VERSION_ID2)
      return 0;
  
    import_list = dl_header[4];
***************
*** 554,559 ****
--- 673,683 ----
      = (ImportEntry *) obstack_alloc (&objfile->psymbol_obstack,
  				   import_list_size * sizeof (ImportEntry));
  
+   /* RM: find the dlt start address */
+   dlt_section = bfd_get_section_by_name (objfile->obfd, "$DLT$");
+   dlt_start = dlt_section->vma + ANOFFSET (objfile->section_offsets,
+ 					   SECT_OFF_DATA);
+ 
    /* Read in the import entries, a bunch at a time */
    for (j = 0, k = 0;
         j < (import_list_size / SOM_READ_IMPORTS_NUM);
***************
*** 566,579 ****
  	{
  	  if (buffer[i].type != (unsigned char) 0)
  	    {
! 	      objfile->import_list[k]
  		= (char *) obstack_alloc (&objfile->psymbol_obstack, strlen (string_buffer + buffer[i].name) + 1);
! 	      strcpy (objfile->import_list[k], string_buffer + buffer[i].name);
  	      /* Some day we might want to record the type and other information too */
  	    }
  	  else			/* null type */
! 	    objfile->import_list[k] = NULL;
! 
  	}
      }
  
--- 690,704 ----
  	{
  	  if (buffer[i].type != (unsigned char) 0)
  	    {
! 	      objfile->import_list[k].name
  		= (char *) obstack_alloc (&objfile->psymbol_obstack, strlen (string_buffer + buffer[i].name) + 1);
! 	      strcpy (objfile->import_list[k].name, string_buffer + buffer[i].name);
! 	      objfile->import_list[k].dlt_addr = dlt_start +
! 		k * sizeof (CORE_ADDR);
  	      /* Some day we might want to record the type and other information too */
  	    }
  	  else			/* null type */
! 	    objfile->import_list[k].name = NULL;
  	}
      }
  
***************
*** 586,598 ****
      {
        if (buffer[i].type != (unsigned char) 0)
  	{
! 	  objfile->import_list[k]
  	    = (char *) obstack_alloc (&objfile->psymbol_obstack, strlen (string_buffer + buffer[i].name) + 1);
! 	  strcpy (objfile->import_list[k], string_buffer + buffer[i].name);
  	  /* Some day we might want to record the type and other information too */
  	}
        else
! 	objfile->import_list[k] = NULL;
      }
  
    objfile->import_list_size = import_list_size;
--- 711,725 ----
      {
        if (buffer[i].type != (unsigned char) 0)
  	{
! 	  objfile->import_list[k].name
  	    = (char *) obstack_alloc (&objfile->psymbol_obstack, strlen (string_buffer + buffer[i].name) + 1);
! 	  strcpy (objfile->import_list[k].name, string_buffer + buffer[i].name);
! 	  objfile->import_list[k].dlt_addr = dlt_start +
! 	    k * sizeof (CORE_ADDR);
  	  /* Some day we might want to record the type and other information too */
  	}
        else
! 	objfile->import_list[k].name = NULL;
      }
  
    objfile->import_list_size = import_list_size;
***************
*** 645,650 ****
--- 772,783 ----
  
    /* It doesn't work, for some reason, to read in space $TEXT$;
       the subspace $SHLIB_INFO$ has to be used.  Some BFD quirk? pai/1997-08-05 */
+ 
+   /* I believe this is because a "section" in bfd terms refers to a 
+    * subspace in SOM terms and further because SHLIB_INFO is the first 
+    * subspace in $TEXT$ space  --- srikanth, 981007
+    */
+ 
    text_section = bfd_get_section_by_name (objfile->obfd, "$SHLIB_INFO$");
    if (!text_section)
      return 0;
***************
*** 654,660 ****
    /* Check header version number for 10.x HP-UX */
    /* Currently we deal only with 10.x systems; on 9.x the version # is 89060912.
       FIXME: Change for future HP-UX releases and mods to the SOM executable format */
!   if (dl_header[0] != 93092112)
      return 0;
  
    export_list = dl_header[8];
--- 787,793 ----
    /* Check header version number for 10.x HP-UX */
    /* Currently we deal only with 10.x systems; on 9.x the version # is 89060912.
       FIXME: Change for future HP-UX releases and mods to the SOM executable format */
!   if (dl_header[0] != DL_HDR_VERSION_ID2)
      return 0;
  
    export_list = dl_header[8];
***************
*** 733,739 ****
  }
  
  
- 
  /* Register that we are able to handle SOM object file formats.  */
  
  static struct sym_fns som_sym_fns =
--- 866,871 ----
***************
*** 742,747 ****
--- 874,881 ----
    som_new_init,			/* sym_new_init: init anything gbl to entire symtab */
    som_symfile_init,		/* sym_init: read initial info, setup for sym_read() */
    som_symfile_read,		/* sym_read: read a symbol file into symtab */
+   som_symfile_add_psymtabs,	/* sym_add_psymtabs: force symbol reading
+ 				 * for files that were skipped earlier */
    som_symfile_finish,		/* sym_finish: finished with file, cleanup */
    som_symfile_offsets,		/* sym_offsets:  Translate ext. to int. relocation */
    NULL				/* next: pointer to next struct sym_fns */
Index: gdb/symfile.c
/opt/gnu/bin/diff -r -c -N  /view/guo.wdb.c//CLO/Components/WDB/Src/gnu/gdb/symfile.c gdb/symfile.c
*** /view/guo.wdb.c//CLO/Components/WDB/Src/gnu/gdb/symfile.c	Mon Nov  1 18:18:15 1999
--- gdb/symfile.c	Tue Nov  2 15:32:23 1999
***************
*** 157,175 ****
  
  void _initialize_symfile PARAMS ((void));
  
  /* List of all available sym_fns.  On gdb startup, each object file reader
     calls add_symtab_fns() to register information on each format it is
     prepared to read. */
  
! static struct sym_fns *symtab_fns = NULL;
  
  /* Flag for whether user will be reloading symbols multiple times.
     Defaults to ON for VxWorks, otherwise OFF.  */
  
  #ifdef SYMBOL_RELOADING_DEFAULT
! int symbol_reloading = SYMBOL_RELOADING_DEFAULT;
  #else
! int symbol_reloading = 0;
  #endif
  
  /* If non-zero, then on HP-UX (i.e., platforms that use somsolib.c),
--- 157,197 ----
  
  void _initialize_symfile PARAMS ((void));
  
+ /* 
+  * srikanth, JAGaa80452 the function pointer permanet_copy_exists will
+  * point to a function that would answer the question whether a permanent
+  * copy of a given character string exists somwehere. For HP WDB this would
+  * be answered by looking at whether the string came from literal value
+  * table, VT. Since the answer to this question is very platform specific
+  * I am introducing a level of indirection here. The pointer gets initialized
+  * to a HP specific routine during the initialization of the symbol reader.
+  * For other platforms the pointer points to a generic routine that answers
+  * NO.
+  *
+  */
+ 
+ static boolean generic_copy_exists PARAMS ((struct objfile * objfile,
+ 					    char *string));
+ extern 
+ boolean (*permanent_copy_exists)
+ PARAMS ((struct objfile * objfile,
+ 	 char *string)) = generic_copy_exists;
+ 
+      extern void mfree PARAMS ((PTR md, PTR ptr));
+ 
  /* List of all available sym_fns.  On gdb startup, each object file reader
     calls add_symtab_fns() to register information on each format it is
     prepared to read. */
  
!      static struct sym_fns *symtab_fns = NULL;
  
  /* Flag for whether user will be reloading symbols multiple times.
     Defaults to ON for VxWorks, otherwise OFF.  */
  
  #ifdef SYMBOL_RELOADING_DEFAULT
!      int symbol_reloading = SYMBOL_RELOADING_DEFAULT;
  #else
!      int symbol_reloading = 0;
  #endif
  
  /* If non-zero, then on HP-UX (i.e., platforms that use somsolib.c),
***************
*** 192,206 ****
     this variable to mean, "always add if non-zero, never add if zero."
   */
  
! int auto_solib_add = 1;
  
  
  /* Since this function is called from within qsort, in an ANSI environment
     it must conform to the prototype for qsort, which specifies that the
     comparison function takes two "void *" pointers. */
  
! static int
! compare_symbols (s1p, s2p)
       const PTR s1p;
       const PTR s2p;
  {
--- 214,228 ----
     this variable to mean, "always add if non-zero, never add if zero."
   */
  
!      int auto_solib_add = 1;
  
  
  /* Since this function is called from within qsort, in an ANSI environment
     it must conform to the prototype for qsort, which specifies that the
     comparison function takes two "void *" pointers. */
  
!      static int
!        compare_symbols (s1p, s2p)
       const PTR s1p;
       const PTR s2p;
  {
***************
*** 475,503 ****
    memset (objfile->section_offsets, 0, SIZEOF_SECTION_OFFSETS);
  
    /* If user explicitly specified values for data and bss, set them here. */
!   
    if (addrs->text_addr)
      ANOFFSET (objfile->section_offsets, SECT_OFF_TEXT) = addrs->text_addr;
    if (addrs->data_addr)
      ANOFFSET (objfile->section_offsets, SECT_OFF_DATA) = addrs->data_addr;
    if (addrs->bss_addr)
!     ANOFFSET (objfile->section_offsets, SECT_OFF_BSS)  = addrs->bss_addr;
!     
    /* Now calculate offsets for other sections. */
    for (i = 0; i < MAX_SECTIONS && addrs->other[i].name; i++)
      {
!       struct other_sections *osp ;
  
!       osp = &addrs->other[i] ;
        if (addrs->other[i].addr == 0)
!   	continue;
  #if 0
        if (strcmp (".text", osp->name) == 0)
! 	SECT_OFF_TEXT = osp->sectindex ;
        else if (strcmp (".data", osp->name) == 0)
! 	SECT_OFF_DATA = osp->sectindex ;
        else if (strcmp (".bss", osp->name) == 0)
! 	SECT_OFF_BSS =  osp->sectindex ;
  #endif
        /* Record all sections in offsets */
        ANOFFSET (objfile->section_offsets, osp->sectindex) = osp->addr;
--- 497,525 ----
    memset (objfile->section_offsets, 0, SIZEOF_SECTION_OFFSETS);
  
    /* If user explicitly specified values for data and bss, set them here. */
! 
    if (addrs->text_addr)
      ANOFFSET (objfile->section_offsets, SECT_OFF_TEXT) = addrs->text_addr;
    if (addrs->data_addr)
      ANOFFSET (objfile->section_offsets, SECT_OFF_DATA) = addrs->data_addr;
    if (addrs->bss_addr)
!     ANOFFSET (objfile->section_offsets, SECT_OFF_BSS) = addrs->bss_addr;
! 
    /* Now calculate offsets for other sections. */
    for (i = 0; i < MAX_SECTIONS && addrs->other[i].name; i++)
      {
!       struct other_sections *osp;
  
!       osp = &addrs->other[i];
        if (addrs->other[i].addr == 0)
! 	continue;
  #if 0
        if (strcmp (".text", osp->name) == 0)
! 	SECT_OFF_TEXT = osp->sectindex;
        else if (strcmp (".data", osp->name) == 0)
! 	SECT_OFF_DATA = osp->sectindex;
        else if (strcmp (".bss", osp->name) == 0)
! 	SECT_OFF_BSS = osp->sectindex;
  #endif
        /* Record all sections in offsets */
        ANOFFSET (objfile->section_offsets, osp->sectindex) = osp->addr;
***************
*** 520,530 ****
     the symbol reading (and complaints can be more terse about it).  */
  
  void
! syms_from_objfile (objfile, addrs, mainline, verbo)
       struct objfile *objfile;
       struct section_addr_info *addrs;
       int mainline;
       int verbo;
  {
    struct section_offsets *section_offsets;
    asection *lower_sect;
--- 542,553 ----
     the symbol reading (and complaints can be more terse about it).  */
  
  void
! syms_from_objfile (objfile, addrs, mainline, verbo, threshold_exceeded)
       struct objfile *objfile;
       struct section_addr_info *addrs;
       int mainline;
       int verbo;
+      int threshold_exceeded;
  {
    struct section_offsets *section_offsets;
    asection *lower_sect;
***************
*** 582,600 ****
    if (mainline)
      {
        /* No offset from objfile addresses.  */
!       addrs -> text_addr = 0;
!       addrs -> data_addr = 0;
!       addrs -> bss_addr = 0;
      }
    else
      {
        /* Find lowest loadable section to be used as starting point for 
           continguous sections. FIXME!! won't work without call to find
! 	 .text first, but this assumes text is lowest section. */
        lower_sect = bfd_get_section_by_name (objfile->obfd, ".text");
        if (lower_sect == NULL)
  	bfd_map_over_sections (objfile->obfd, find_lowest_section,
! 			       (PTR) &lower_sect);
        if (lower_sect == NULL)
  	warning ("no loadable sections found in added symbol-file %s",
  		 objfile->name);
--- 605,623 ----
    if (mainline)
      {
        /* No offset from objfile addresses.  */
!       addrs->text_addr = 0;
!       addrs->data_addr = 0;
!       addrs->bss_addr = 0;
      }
    else
      {
        /* Find lowest loadable section to be used as starting point for 
           continguous sections. FIXME!! won't work without call to find
!          .text first, but this assumes text is lowest section. */
        lower_sect = bfd_get_section_by_name (objfile->obfd, ".text");
        if (lower_sect == NULL)
  	bfd_map_over_sections (objfile->obfd, find_lowest_section,
! 			       (PTR) & lower_sect);
        if (lower_sect == NULL)
  	warning ("no loadable sections found in added symbol-file %s",
  		 objfile->name);
***************
*** 603,686 ****
  	warning ("Lowest section in %s is %s at %s",
  		 objfile->name,
  		 bfd_section_name (objfile->obfd, lower_sect),
! 		 paddr (bfd_section_vma (objfile->obfd, lower_sect)));
        if (lower_sect != NULL)
!  	lower_offset = bfd_section_vma (objfile->obfd, lower_sect);
        else
!  	lower_offset = 0;
!  
!        /* Calculate offsets for the loadable sections.
!  	 FIXME! Sections must be in order of increasing loadable section
!  	 so that contiguous sections can use the lower-offset!!!
!  
!           Adjust offsets if the segments are not contiguous.
!           If the section is contiguous, its offset should be set to
!  	 the offset of the highest loadable section lower than it
!  	 (the loadable section directly below it in memory).
!  	 this_offset = lower_offset = lower_addr - lower_orig_addr */
  
        /* FIXME: These sections will not need special treatment because ALL
! 	 sections are in the other sections table */
!  
        if (addrs->text_addr != 0)
!  	{
!  	  sect = bfd_get_section_by_name (objfile->obfd, ".text");
!  	  if (sect)
!  	    {
!  	      addrs->text_addr -= bfd_section_vma (objfile->obfd, sect);
!  	      lower_offset = addrs->text_addr;
!  	    }
!  	}
!       else 
!  	/* ??? who's below me? */
  	addrs->text_addr = lower_offset;
!  
        if (addrs->data_addr != 0)
  	{
  	  sect = bfd_get_section_by_name (objfile->obfd, ".data");
  	  if (sect)
!  	    {
  	      addrs->data_addr -= bfd_section_vma (objfile->obfd, sect);
!  	      lower_offset = addrs->data_addr;
!  	    }
  	}
        else
  	addrs->data_addr = lower_offset;
!  
        if (addrs->bss_addr != 0)
  	{
  	  sect = bfd_get_section_by_name (objfile->obfd, ".bss");
  	  if (sect)
!  	    {
  	      addrs->bss_addr -= bfd_section_vma (objfile->obfd, sect);
!  	      lower_offset = addrs->bss_addr;
!  	    }
  	}
        else
  	addrs->bss_addr = lower_offset;
!   
!        /* Now calculate offsets for other sections. */
!       for (i=0 ; i < MAX_SECTIONS && addrs->other[i].name; i++)
! 	{
! 	 
!  	  if (addrs->other[i].addr != 0)
!  	    {
!  	      sect=bfd_get_section_by_name(objfile->obfd, addrs->other[i].name);
!  	      if (sect)
!  		{
!  		  addrs->other[i].addr -= bfd_section_vma (objfile->obfd, sect);
!  		  lower_offset = addrs->other[i].addr;
! 		  addrs->other[i].sectindex = sect->index ;
!  		}
!  	      else
  		{
! 		  warning ("section %s not found in %s", addrs->other[i].name, 
  			   objfile->name);
  		  addrs->other[i].addr = 0;
  		}
!  	    }
!  	  else
!  	    addrs->other[i].addr = lower_offset;
  	}
      }
  
--- 626,710 ----
  	warning ("Lowest section in %s is %s at %s",
  		 objfile->name,
  		 bfd_section_name (objfile->obfd, lower_sect),
! 		 longest_local_hex_string (
! 		    (LONGEST) bfd_section_vma (objfile->obfd, lower_sect)));
        if (lower_sect != NULL)
! 	lower_offset = bfd_section_vma (objfile->obfd, lower_sect);
        else
! 	lower_offset = 0;
! 
!       /* Calculate offsets for the loadable sections.
!          FIXME! Sections must be in order of increasing loadable section
!          so that contiguous sections can use the lower-offset!!!
! 
!          Adjust offsets if the segments are not contiguous.
!          If the section is contiguous, its offset should be set to
!          the offset of the highest loadable section lower than it
!          (the loadable section directly below it in memory).
!          this_offset = lower_offset = lower_addr - lower_orig_addr */
  
        /* FIXME: These sections will not need special treatment because ALL
!          sections are in the other sections table */
! 
        if (addrs->text_addr != 0)
! 	{
! 	  sect = bfd_get_section_by_name (objfile->obfd, ".text");
! 	  if (sect)
! 	    {
! 	      addrs->text_addr -= bfd_section_vma (objfile->obfd, sect);
! 	      lower_offset = addrs->text_addr;
! 	    }
! 	}
!       else
! 	/* ??? who's below me? */
  	addrs->text_addr = lower_offset;
! 
        if (addrs->data_addr != 0)
  	{
  	  sect = bfd_get_section_by_name (objfile->obfd, ".data");
  	  if (sect)
! 	    {
  	      addrs->data_addr -= bfd_section_vma (objfile->obfd, sect);
! 	      lower_offset = addrs->data_addr;
! 	    }
  	}
        else
  	addrs->data_addr = lower_offset;
! 
        if (addrs->bss_addr != 0)
  	{
  	  sect = bfd_get_section_by_name (objfile->obfd, ".bss");
  	  if (sect)
! 	    {
  	      addrs->bss_addr -= bfd_section_vma (objfile->obfd, sect);
! 	      lower_offset = addrs->bss_addr;
! 	    }
  	}
        else
  	addrs->bss_addr = lower_offset;
! 
!       /* Now calculate offsets for other sections. */
!       for (i = 0; i < MAX_SECTIONS && addrs->other[i].name; i++)
! 	{
! 
! 	  if (addrs->other[i].addr != 0)
! 	    {
! 	      sect = bfd_get_section_by_name (objfile->obfd, addrs->other[i].name);
! 	      if (sect)
! 		{
! 		  addrs->other[i].addr -= bfd_section_vma (objfile->obfd, sect);
! 		  lower_offset = addrs->other[i].addr;
! 		  addrs->other[i].sectindex = sect->index;
! 		}
! 	      else
  		{
! 		  warning ("section %s not found in %s", addrs->other[i].name,
  			   objfile->name);
  		  addrs->other[i].addr = 0;
  		}
! 	    }
! 	  else
! 	    addrs->other[i].addr = lower_offset;
  	}
      }
  
***************
*** 688,694 ****
       appear for this new file, and record how verbose to be, then do the
       initial symbol reading for this file. */
  
!   (*objfile->sf->sym_init) (objfile);
    clear_complaints (1, verbo);
  
    (*objfile->sf->sym_offsets) (objfile, addrs);
--- 712,718 ----
       appear for this new file, and record how verbose to be, then do the
       initial symbol reading for this file. */
  
!   (*objfile->sf->sym_init) (objfile, threshold_exceeded);
    clear_complaints (1, verbo);
  
    (*objfile->sf->sym_offsets) (objfile, addrs);
***************
*** 716,757 ****
      {
        struct obj_section *s;
  
!  	/* Map section offsets in "addr" back to the object's 
!  	   sections by comparing the section names with bfd's 
!  	   section names.  Then adjust the section address by
!  	   the offset. */ /* for gdb/13815 */
!  
        ALL_OBJFILE_OSECTIONS (objfile, s)
! 	{
! 	  CORE_ADDR s_addr = 0;
! 	  int i;
  
!  	  if (strcmp (s->the_bfd_section->name, ".text") == 0)
!  	    s_addr = addrs->text_addr;
!  	  else if (strcmp (s->the_bfd_section->name, ".data") == 0)
!  	    s_addr = addrs->data_addr;
!  	  else if (strcmp (s->the_bfd_section->name, ".bss") == 0)
!  	    s_addr = addrs->bss_addr;
!  	  else 
!  	    for (i = 0; !s_addr && addrs->other[i].name; i++)
!  	      if (strcmp (s->the_bfd_section->name, addrs->other[i].name) == 0)
!  	        s_addr = addrs->other[i].addr; /* end added for gdb/13815 */
!  
! 	  s->addr -= s->offset;
! 	  s->addr += s_addr;
! 	  s->endaddr -= s->offset;
! 	  s->endaddr += s_addr;
! 	  s->offset += s_addr;
! 	}
      }
  #endif /* not IBM6000_TARGET */
  
!   (*objfile->sf->sym_read) (objfile, mainline);
  
    if (!have_partial_symbols () && !have_full_symbols ())
      {
        wrap_here ("");
!       printf_filtered ("(no debugging symbols found)...");
        wrap_here ("");
      }
  
--- 740,784 ----
      {
        struct obj_section *s;
  
!       /* Map section offsets in "addr" back to the object's 
!          sections by comparing the section names with bfd's 
!          section names.  Then adjust the section address by
!          the offset. *//* for gdb/13815 */
! 
        ALL_OBJFILE_OSECTIONS (objfile, s)
!       {
! 	CORE_ADDR s_addr = 0;
! 	int i;
  
! 	if (strcmp (s->the_bfd_section->name, ".text") == 0)
! 	  s_addr = addrs->text_addr;
! 	else if (strcmp (s->the_bfd_section->name, ".data") == 0)
! 	  s_addr = addrs->data_addr;
! 	else if (strcmp (s->the_bfd_section->name, ".bss") == 0)
! 	  s_addr = addrs->bss_addr;
! 	else
! 	  for (i = 0; !s_addr && addrs->other[i].name; i++)
! 	    if (strcmp (s->the_bfd_section->name, addrs->other[i].name) == 0)
! 	      s_addr = addrs->other[i].addr;	/* end added for gdb/13815 */
! 
! 	s->addr -= s->offset;
! 	s->addr += s_addr;
! 	s->endaddr -= s->offset;
! 	s->endaddr += s_addr;
! 	s->offset += s_addr;
!       }
      }
  #endif /* not IBM6000_TARGET */
  
!   (*objfile->sf->sym_read) (objfile, mainline, threshold_exceeded);
  
    if (!have_partial_symbols () && !have_full_symbols ())
      {
        wrap_here ("");
!       if (!threshold_exceeded)
! 	printf_filtered ("(no debugging symbols found)...");
!       else
! 	printf_filtered ("(skipped since threshold was exceeded)...");
        wrap_here ("");
      }
  
***************
*** 824,835 ****
     Upon failure, jumps back to command level (never returns). */
  
  struct objfile *
! symbol_file_add (name, from_tty, addrs, mainline, flags)
       char *name;
       int from_tty;
       struct section_addr_info *addrs;
       int mainline;
       int flags;
  {
    struct objfile *objfile;
    struct partial_symtab *psymtab;
--- 851,863 ----
     Upon failure, jumps back to command level (never returns). */
  
  struct objfile *
! maybe_symbol_file_add (name, from_tty, addrs, mainline, flags, threshold_exceeded)
       char *name;
       int from_tty;
       struct section_addr_info *addrs;
       int mainline;
       int flags;
+      int threshold_exceeded;
  {
    struct objfile *objfile;
    struct partial_symtab *psymtab;
***************
*** 882,888 ****
  	      gdb_flush (gdb_stdout);
  	    }
  	}
!       syms_from_objfile (objfile, addrs, mainline, from_tty);
      }
  
    /* We now have at least a partial symbol table.  Check to see if the
--- 910,916 ----
  	      gdb_flush (gdb_stdout);
  	    }
  	}
!       syms_from_objfile (objfile, addrs, mainline, from_tty, threshold_exceeded);
      }
  
    /* We now have at least a partial symbol table.  Check to see if the
***************
*** 925,930 ****
--- 953,969 ----
    return (objfile);
  }
  
+ struct objfile *
+ symbol_file_add (name, from_tty, addrs, mainline, flags)
+      char *name;
+      int from_tty;
+      struct section_addr_info *addrs;
+      int mainline;
+      int flags;
+ {
+   return maybe_symbol_file_add (name, from_tty, addrs, mainline, flags, 0);
+ }
+ 
  /* This is the symbol-file command.  Read the file, analyze its
     symbols, and add a struct symtab to a symtab list.  The syntax of
     the command is rather bizarre--(1) buildargv implements various
***************
*** 1013,1019 ****
  
  	      if (text_relocation == (CORE_ADDR) 0)
  		return;
! 	      else if (text_relocation == (CORE_ADDR) -1)
  		{
  		  symbol_file_add (name, from_tty, NULL, 1, flags);
  #ifdef HPUXHPPA
--- 1052,1058 ----
  
  	      if (text_relocation == (CORE_ADDR) 0)
  		return;
! 	      else if (text_relocation == (CORE_ADDR) - 1)
  		{
  		  symbol_file_add (name, from_tty, NULL, 1, flags);
  #ifdef HPUXHPPA
***************
*** 1046,1060 ****
      }
  }
  
! /* Set the initial language.
! 
!    A better solution would be to record the language in the psymtab when reading
!    partial symbols, and then use it (if known) to set the language.  This would
!    be a win for formats that encode the language in an easily discoverable place,
!    such as DWARF.  For stabs, we can jump through hoops looking for specially
!    named symbols or try to intuit the language from the specific type of stabs
!    we find, but we can't do that until later when we read in full symbols.
!    FIXME.  */
  
  static void
  set_initial_language ()
--- 1085,1091 ----
      }
  }
  
! /* Set the initial language. */
  
  static void
  set_initial_language ()
***************
*** 1065,1074 ****
    pst = find_main_psymtab ();
    if (pst != NULL)
      {
!       if (pst->filename != NULL)
! 	{
! 	  lang = deduce_language_from_filename (pst->filename);
! 	}
        if (lang == language_unknown)
  	{
  	  /* Make C the default language */
--- 1096,1103 ----
    pst = find_main_psymtab ();
    if (pst != NULL)
      {
!       lang = pst->language;
! 
        if (lang == language_unknown)
  	{
  	  /* Make C the default language */
***************
*** 1088,1099 ****
  symfile_bfd_open (name)
       char *name;
  {
    bfd *sym_bfd;
    int desc;
    char *absolute_name;
  
- 
- 
    name = tilde_expand (name);	/* Returns 1st new malloc'd copy */
  
    /* Look down path for it, allocate 2nd new malloc'd copy.  */
--- 1117,1138 ----
  symfile_bfd_open (name)
       char *name;
  {
+   return symfile_bfd_open_with_path_type (name, getenv ("PATH"),
+ 					  bfd_object, 1);
+ }
+ 
+ 
+ bfd *
+ symfile_bfd_open_with_path_type (name, path, expect, is_verbose_error)
+      char *name;
+      char *path;
+      bfd_format expect;
+      int is_verbose_error;
+ {
    bfd *sym_bfd;
    int desc;
    char *absolute_name;
  
    name = tilde_expand (name);	/* Returns 1st new malloc'd copy */
  
    /* Look down path for it, allocate 2nd new malloc'd copy.  */
***************
*** 1103,1116 ****
      {
        char *exename = alloca (strlen (name) + 5);
        strcat (strcpy (exename, name), ".exe");
!       desc = openp (getenv ("PATH"), 1, exename, O_RDONLY | O_BINARY,
! 		    0, &absolute_name);
      }
  #endif
    if (desc < 0)
      {
        make_cleanup (free, name);
!       perror_with_name (name);
      }
    free (name);			/* Free 1st new malloc'd copy */
    name = absolute_name;		/* Keep 2nd malloc'd copy in bfd */
--- 1142,1161 ----
      {
        char *exename = alloca (strlen (name) + 5);
        strcat (strcpy (exename, name), ".exe");
!       desc = openp (path, 1, exename, O_RDONLY | O_BINARY, 0, &absolute_name);
      }
  #endif
    if (desc < 0)
      {
        make_cleanup (free, name);
!       if (is_verbose_error)
! 	{
! 	  perror_with_name (name);
! 	}
!       else
! 	{
! 	  return NULL;
! 	}
      }
    free (name);			/* Free 1st new malloc'd copy */
    name = absolute_name;		/* Keep 2nd malloc'd copy in bfd */
***************
*** 1121,1140 ****
      {
        close (desc);
        make_cleanup (free, name);
!       error ("\"%s\": can't open to read symbols: %s.", name,
! 	     bfd_errmsg (bfd_get_error ()));
      }
    sym_bfd->cacheable = true;
  
!   if (!bfd_check_format (sym_bfd, bfd_object))
      {
        /* FIXME: should be checking for errors from bfd_close (for one thing,
           on error it does not free all the storage associated with the
           bfd).  */
        bfd_close (sym_bfd);	/* This also closes desc */
        make_cleanup (free, name);
!       error ("\"%s\": can't read symbols: %s.", name,
! 	     bfd_errmsg (bfd_get_error ()));
      }
    return (sym_bfd);
  }
--- 1166,1199 ----
      {
        close (desc);
        make_cleanup (free, name);
!       if (is_verbose_error)
! 	{
! 	  error ("\"%s\": can't open to read symbols: %s.", name,
! 		 bfd_errmsg (bfd_get_error ()));
! 	}
!       else
! 	{
! 	  return NULL;
! 	}
      }
    sym_bfd->cacheable = true;
  
!   if (!bfd_check_format (sym_bfd, expect))
      {
        /* FIXME: should be checking for errors from bfd_close (for one thing,
           on error it does not free all the storage associated with the
           bfd).  */
        bfd_close (sym_bfd);	/* This also closes desc */
        make_cleanup (free, name);
!       if (is_verbose_error)
! 	{
! 	  error ("\"%s\": can't read symbols: %s.", name,
! 		 bfd_errmsg (bfd_get_error ()));
! 	}
!       else
! 	{
! 	  return NULL;
! 	}
      }
    return (sym_bfd);
  }
***************
*** 1289,1295 ****
  	         to look at during a long download.  */
  	      fprintf_unfiltered (gdb_stdout,
  				  "Loading section %s, size 0x%s lma 0x%s\n",
! 				  sect_name, paddr_nz (size), paddr_nz (lma));
  
  	      bfd_get_section_contents (loadfile_bfd, s, buffer, 0, size);
  
--- 1348,1354 ----
  	         to look at during a long download.  */
  	      fprintf_unfiltered (gdb_stdout,
  				  "Loading section %s, size 0x%s lma 0x%s\n",
! 				sect_name, paddr_nz (size), paddr_nz (lma));
  
  	      bfd_get_section_contents (loadfile_bfd, s, buffer, 0, size);
  
***************
*** 1307,1319 ****
  		  if (validate_download)
  		    {
  		      /* Broken memories and broken monitors manifest
! 			 themselves here when bring new computers to
! 			 life.  This doubles already slow downloads.  */
  		      /* NOTE: cagney/1999-10-18: A more efficient
!                          implementation might add a verify_memory()
!                          method to the target vector and then use
!                          that.  remote.c could implement that method
!                          using the ``qCRC'' packet.  */
  		      char *check = xmalloc (len);
  		      struct cleanup *verify_cleanups = make_cleanup (free, check);
  		      if (target_read_memory (lma, check, len) != 0)
--- 1366,1378 ----
  		  if (validate_download)
  		    {
  		      /* Broken memories and broken monitors manifest
! 		         themselves here when bring new computers to
! 		         life.  This doubles already slow downloads.  */
  		      /* NOTE: cagney/1999-10-18: A more efficient
! 		         implementation might add a verify_memory()
! 		         method to the target vector and then use
! 		         that.  remote.c could implement that method
! 		         using the ``qCRC'' packet.  */
  		      char *check = xmalloc (len);
  		      struct cleanup *verify_cleanups = make_cleanup (free, check);
  		      if (target_read_memory (lma, check, len) != 0)
***************
*** 1323,1329 ****
  			error ("Download verify compare failed at 0x%s",
  			       paddr (lma));
  		      do_cleanups (verify_cleanups);
!  		    }
  		  data_count += len;
  		  lma += len;
  		  buffer += len;
--- 1382,1388 ----
  			error ("Download verify compare failed at 0x%s",
  			       paddr (lma));
  		      do_cleanups (verify_cleanups);
! 		    }
  		  data_count += len;
  		  lma += len;
  		  buffer += len;
***************
*** 1417,1427 ****
    int sec_num = 0;
    int i;
    struct
!   {
!     enum { OPT_SECTION } type;
!     char *name;
!     char *value;
!   } opt[SECT_OFF_MAX];
    struct section_addr_info section_addrs;
  
    dont_repeat ();
--- 1476,1491 ----
    int sec_num = 0;
    int i;
    struct
!     {
!       enum
! 	{
! 	  OPT_SECTION
! 	}
!       type;
!       char *name;
!       char *value;
!     }
!   opt[SECT_OFF_MAX];
    struct section_addr_info section_addrs;
  
    dont_repeat ();
***************
*** 1460,1495 ****
  	{
  	  if (expecting_option)
  	    {
!  	      opt[option_index++].value = arg;
!  	      expecting_option = 0;
!  	    }
!  	  else
!  	    {
  	      switch (argcnt)
  		{
!  		case 0:
!  		  name = arg;
!  		  break;
!  		case 1: 
!  		  opt[option_index].type = OPT_SECTION;
!  		  opt[option_index].name = ".text";
!  		  opt[option_index++].value = arg;
!  		  break;
!  		case 2: 
!  		  opt[option_index].type = OPT_SECTION;
!  		  opt[option_index].name = ".data";
!  		  opt[option_index++].value = arg;
!  		  break;
!  		case 3: 
!  		  opt[option_index].type = OPT_SECTION;
!  		  opt[option_index].name = ".bss";
!  		  opt[option_index++].value = arg;
!  		  break;
!  		default:
!  		  warning ("Too many arguments entered; see \"help add-symbol-file\" for command syntax.");
  		}
  	      argcnt++;
!  	    }
  	}
        else if (STREQ (arg, "-mapped"))
  	{
--- 1524,1559 ----
  	{
  	  if (expecting_option)
  	    {
! 	      opt[option_index++].value = arg;
! 	      expecting_option = 0;
! 	    }
! 	  else
! 	    {
  	      switch (argcnt)
  		{
! 		case 0:
! 		  name = arg;
! 		  break;
! 		case 1:
! 		  opt[option_index].type = OPT_SECTION;
! 		  opt[option_index].name = ".text";
! 		  opt[option_index++].value = arg;
! 		  break;
! 		case 2:
! 		  opt[option_index].type = OPT_SECTION;
! 		  opt[option_index].name = ".data";
! 		  opt[option_index++].value = arg;
! 		  break;
! 		case 3:
! 		  opt[option_index].type = OPT_SECTION;
! 		  opt[option_index].name = ".bss";
! 		  opt[option_index++].value = arg;
! 		  break;
! 		default:
! 		  warning ("Too many arguments entered; see \"help add-symbol-file\" for command syntax.");
  		}
  	      argcnt++;
! 	    }
  	}
        else if (STREQ (arg, "-mapped"))
  	{
***************
*** 1500,1521 ****
  	  flags |= OBJF_READNOW;
  	}
        else if (STREQN (arg, "-T", 2))
!  	{
!  	  if (option_index >= SECT_OFF_MAX)
  	    {
  	      warning ("Number of options exceeds maximum allowed.");
  	    }
!  	  else
!  	    {
!  	      expecting_option = 1;
!  	      opt[option_index].type = OPT_SECTION;
!  	      opt[option_index].name = arg + 2;
!  	    }
!  	}
!       else 
!         {
  	  error ("Unknown option `%s'", arg);
!         }
      }
  
    if (name == NULL)
--- 1564,1585 ----
  	  flags |= OBJF_READNOW;
  	}
        else if (STREQN (arg, "-T", 2))
! 	{
! 	  if (option_index >= SECT_OFF_MAX)
  	    {
  	      warning ("Number of options exceeds maximum allowed.");
  	    }
! 	  else
! 	    {
! 	      expecting_option = 1;
! 	      opt[option_index].type = OPT_SECTION;
! 	      opt[option_index].name = arg + 2;
! 	    }
! 	}
!       else
! 	{
  	  error ("Unknown option `%s'", arg);
! 	}
      }
  
    if (name == NULL)
***************
*** 1528,1536 ****
    if (option_index > 0)
      {
        /* Print the prompt for the query below.
! 	 We have to split this up into 3 print statements because
! 	 local_hex_string returns a local static string. */
!  
        printf_filtered ("add symbol table from file \"%s\" at\n", name);
        for (i = 0; i < option_index; i++)
  	{
--- 1592,1600 ----
    if (option_index > 0)
      {
        /* Print the prompt for the query below.
!          We have to split this up into 3 print statements because
!          local_hex_string returns a local static string. */
! 
        printf_filtered ("add symbol table from file \"%s\" at\n", name);
        for (i = 0; i < option_index; i++)
  	{
***************
*** 1538,1580 ****
  	    {
  	    case OPT_SECTION:
  	      {
!                 CORE_ADDR addr;
!                 char *val = opt[i].value;
!                 char *sec = opt[i].name;
!  
!                 val = opt[i].value;
!                 if (val[0] == '0' && val[1] == 'x')
!                   addr = strtoul (val+2, NULL, 16);
!                 else
!                   addr = strtoul (val, NULL, 10);
!  
!                 if (strcmp (sec, ".text") == 0)
!                   section_addrs.text_addr = addr;
!                 else if (strcmp (sec, ".data") == 0)
!                   section_addrs.data_addr = addr;
!                 else if (strcmp (sec, ".bss") == 0)
!                   section_addrs.bss_addr = addr;
!                 /* Add the section to the others even if it is a
!                    text data or bss section. This is redundent but
!                    eventually, none will be given special treatment */
  		{
  		  section_addrs.other[sec_num].name = strdup (sec);
  		  make_cleanup (free, section_addrs.other[sec_num].name);
  		  section_addrs.other[sec_num++].addr = addr;
  		  printf_filtered ("\t%s_addr = %s\n",
! 				   sec, 
! 				   local_hex_string ((unsigned long)addr));
  		}
!  
!                 /* The object's sections are initialized when a 
!                    call is made to build_objfile_section_table (objfile).
!                    This happens in reread_symbols. 
!                    At this point, we don't know what file type this is,
!                    so we can't determine what section names are valid.  */
!               }
!               break;
!             default:
!               complain (&unknown_option_complaint, opt[i].name);
  	    }
  	}
        /* Eventually, these hard coded names will be obsolete */
--- 1602,1644 ----
  	    {
  	    case OPT_SECTION:
  	      {
! 		CORE_ADDR addr;
! 		char *val = opt[i].value;
! 		char *sec = opt[i].name;
! 
! 		val = opt[i].value;
! 		if (val[0] == '0' && val[1] == 'x')
! 		  addr = strtoul (val + 2, NULL, 16);
! 		else
! 		  addr = strtoul (val, NULL, 10);
! 
! 		if (strcmp (sec, ".text") == 0)
! 		  section_addrs.text_addr = addr;
! 		else if (strcmp (sec, ".data") == 0)
! 		  section_addrs.data_addr = addr;
! 		else if (strcmp (sec, ".bss") == 0)
! 		  section_addrs.bss_addr = addr;
! 		/* Add the section to the others even if it is a
! 		   text data or bss section. This is redundent but
! 		   eventually, none will be given special treatment */
  		{
  		  section_addrs.other[sec_num].name = strdup (sec);
  		  make_cleanup (free, section_addrs.other[sec_num].name);
  		  section_addrs.other[sec_num++].addr = addr;
  		  printf_filtered ("\t%s_addr = %s\n",
! 				   sec,
! 				 longest_local_hex_string ((LONGEST) addr));
  		}
! 
! 		/* The object's sections are initialized when a 
! 		   call is made to build_objfile_section_table (objfile).
! 		   This happens in reread_symbols. 
! 		   At this point, we don't know what file type this is,
! 		   so we can't determine what section names are valid.  */
! 	      }
! 	      break;
! 	    default:
! 	      complain (&unknown_option_complaint, opt[i].name);
  	    }
  	}
        /* Eventually, these hard coded names will be obsolete */
***************
*** 1583,1596 ****
    else
      {
        CORE_ADDR text_addr;
!       target_link (name, &text_addr);  
!       if (text_addr == (CORE_ADDR) -1)
! 	error("Don't know how to get text start location for this file");
        section_addrs.text_addr = text_addr;
        section_addrs.data_addr = 0;
        section_addrs.bss_addr = 0;
!       printf_filtered("add symbol table from file \"%s\" at text_addr = %s?\n",
! 		      name, local_hex_string ((unsigned long)text_addr));
      }
    if (from_tty && (!query ("%s", "")))
      error ("Not confirmed.");
--- 1647,1660 ----
    else
      {
        CORE_ADDR text_addr;
!       target_link (name, &text_addr);
!       if (text_addr == (CORE_ADDR) - 1)
! 	error ("Don't know how to get text start location for this file");
        section_addrs.text_addr = text_addr;
        section_addrs.data_addr = 0;
        section_addrs.bss_addr = 0;
!       printf_filtered ("add symbol table from file \"%s\" at text_addr = %s?\n",
! 		       name, longest_local_hex_string ((LONGEST) text_addr));
      }
    if (from_tty && (!query ("%s", "")))
      error ("Not confirmed.");
***************
*** 1767,1778 ****
  #endif
  		}
  
! 	      (*objfile->sf->sym_init) (objfile);
  	      clear_complaints (1, 1);
  	      /* The "mainline" parameter is a hideous hack; I think leaving it
  	         zero is OK since dbxread.c also does what it needs to do if
  	         objfile->global_psymbols.size is 0.  */
! 	      (*objfile->sf->sym_read) (objfile, 0);
  	      if (!have_partial_symbols () && !have_full_symbols ())
  		{
  		  wrap_here ("");
--- 1831,1844 ----
  #endif
  		}
  
! 	      /* RM: ??? what happened to auto-solib-add here? */
! 	      (*objfile->sf->sym_init) (objfile, 0);
  	      clear_complaints (1, 1);
  	      /* The "mainline" parameter is a hideous hack; I think leaving it
  	         zero is OK since dbxread.c also does what it needs to do if
  	         objfile->global_psymbols.size is 0.  */
! 	      /* RM: ??? what happened to auto-solib-add here? */
! 	      (*objfile->sf->sym_read) (objfile, 0, 0);
  	      if (!have_partial_symbols () && !have_full_symbols ())
  		{
  		  wrap_here ("");
***************
*** 1940,1945 ****
--- 2006,2012 ----
        add_filename_language (".c286", language_chill);
        add_filename_language (".f", language_fortran);
        add_filename_language (".F", language_fortran);
+       add_filename_language (".f90", language_fortran);
        add_filename_language (".s", language_asm);
        add_filename_language (".S", language_asm);
      }
***************
*** 1985,1996 ****
    symtab = (struct symtab *)
      obstack_alloc (&objfile->symbol_obstack, sizeof (struct symtab));
    memset (symtab, 0, sizeof (*symtab));
!   symtab->filename = obsavestring (filename, strlen (filename),
! 				   &objfile->symbol_obstack);
    symtab->fullname = NULL;
    symtab->language = deduce_language_from_filename (filename);
!   symtab->debugformat = obsavestring ("unknown", 7,
! 				      &objfile->symbol_obstack);
  
    /* Hook it to the objfile it comes from */
  
--- 2052,2070 ----
    symtab = (struct symtab *)
      obstack_alloc (&objfile->symbol_obstack, sizeof (struct symtab));
    memset (symtab, 0, sizeof (*symtab));
! 
!   /* srikanth, 990310, JAGaa80452 : filenames don't materialize
!    * out of nowhere. Most are pointers into the literal value table. 
!    * See if we could piggyback on an already existing version ...
!    */
!   if (permanent_copy_exists (objfile, filename))
!     symtab->filename = filename;
!   else
!     symtab->filename = obsavestring (filename, strlen (filename),
! 				     &objfile->symbol_obstack);
    symtab->fullname = NULL;
    symtab->language = deduce_language_from_filename (filename);
!   symtab->debugformat = "unknown";
  
    /* Hook it to the objfile it comes from */
  
***************
*** 2027,2034 ****
  		     sizeof (struct partial_symtab));
  
    memset (psymtab, 0, sizeof (struct partial_symtab));
!   psymtab->filename = obsavestring (filename, strlen (filename),
! 				    &objfile->psymbol_obstack);
    psymtab->symtab = NULL;
  
    /* Prepend it to the psymtab list for the objfile it belongs to.
--- 2101,2112 ----
  		     sizeof (struct partial_symtab));
  
    memset (psymtab, 0, sizeof (struct partial_symtab));
! 
!   if (permanent_copy_exists (objfile, filename))
!     psymtab->filename = filename;
!   else
!     psymtab->filename = obsavestring (filename, strlen (filename),
! 				      &objfile->psymbol_obstack);
    psymtab->symtab = NULL;
  
    /* Prepend it to the psymtab list for the objfile it belongs to.
***************
*** 2050,2055 ****
--- 2128,2143 ----
    }
  #endif
  
+   /* RM: Guess the language to set a good default value */
+   if (filename != NULL)
+     {
+       psymtab->language = deduce_language_from_filename (filename);
+     }
+   else
+     {
+       psymtab->language = language_unknown;
+     }
+ 
    return (psymtab);
  }
  
***************
*** 2080,2101 ****
  }
  
  
! /* Reset all data structures in gdb which may contain references to symbol
!    table data.  */
  
  void
! clear_symtab_users ()
  {
    /* Someday, we should do better than this, by only blowing away
       the things that really need to be blown.  */
    clear_value_history ();
    clear_displays ();
    clear_internalvars ();
    breakpoint_re_set ();
    set_default_breakpoint (0, 0, 0, 0);
-   current_source_symtab = 0;
-   current_source_line = 0;
    clear_pc_function_cache ();
    target_new_objfile (NULL);
  }
  
--- 2168,2212 ----
  }
  
  
! /* This routine is called for program which use shared libraries at the
!    start of each run to forget stuff because the shared libraries might
!    have changed.
! 
!    Do most of what clear_symtab_users does except don't call
!    "target_new_objfile (NULL)" because this will make the CMA implementation
!    forget about the symbols of the main program which are not presented
!    again. */
  
  void
! solib_clear_symtab_users ()
  {
    /* Someday, we should do better than this, by only blowing away
       the things that really need to be blown.  */
+   /* CAUTION: reset 'current_source_symtab' and 'current_source_line' 
+      first lest they be used by any of the functions called below. */
+   current_source_symtab = 0;
+   current_source_line = 0;
    clear_value_history ();
    clear_displays ();
    clear_internalvars ();
    breakpoint_re_set ();
    set_default_breakpoint (0, 0, 0, 0);
    clear_pc_function_cache ();
+ }
+ 
+ /* clear_symtab_users is called when a program is loaded to forget anything
+    about the previous program.
+ 
+    Reset all data structures in gdb which may contain references to symbol
+    table data.  */
+ 
+ void
+ clear_symtab_users ()
+ {
+   /* See the comments in solib_clear_symtab_users() about how we should
+      do something better. */
+ 
+   solib_clear_symtab_users ();
    target_new_objfile (NULL);
  }
  
***************
*** 2356,2365 ****
       bcache. */
    static struct partial_symbol psymbol;
  
!   /* Create local copy of the partial symbol */
!   memcpy (buf, name, namelength);
!   buf[namelength] = '\0';
!   SYMBOL_NAME (&psymbol) = bcache (buf, namelength + 1, &objfile->psymbol_cache);
    /* val and coreaddr are mutually exclusive, one of them *will* be zero */
    if (val != 0)
      {
--- 2467,2483 ----
       bcache. */
    static struct partial_symbol psymbol;
  
!   /* srikanth, 990310, JAGaa80452 do not multiply objects without necessity */
! 
!   if (permanent_copy_exists (objfile, name))
!     SYMBOL_NAME (&psymbol) = name;
!   else
!     {
!       /* Create local copy of the partial symbol */
!       memcpy (buf, name, namelength);
!       buf[namelength] = '\0';
!       SYMBOL_NAME (&psymbol) = bcache (buf, namelength + 1, &objfile->psymbol_cache);
!     }
    /* val and coreaddr are mutually exclusive, one of them *will* be zero */
    if (val != 0)
      {
***************
*** 2413,2428 ****
       bcache. */
    static struct partial_symbol psymbol;
  
!   /* Create local copy of the partial symbol */
! 
!   memcpy (buf, name, namelength);
!   buf[namelength] = '\0';
!   SYMBOL_NAME (&psymbol) = bcache (buf, namelength + 1, &objfile->psymbol_cache);
  
    buf = alloca (dem_namelength + 1);
    memcpy (buf, dem_name, dem_namelength);
    buf[dem_namelength] = '\0';
  
    switch (language)
      {
      case language_c:
--- 2531,2552 ----
       bcache. */
    static struct partial_symbol psymbol;
  
!   if (permanent_copy_exists (objfile, name))
!     SYMBOL_NAME (&psymbol) = name;
!   else
!     /* Create local copy of the partial symbol */
!     {
!       memcpy (buf, name, namelength);
!       buf[namelength] = '\0';
!       SYMBOL_NAME (&psymbol) = bcache (buf, namelength + 1, &objfile->psymbol_cache);
!     }
  
    buf = alloca (dem_namelength + 1);
    memcpy (buf, dem_name, dem_namelength);
    buf[dem_namelength] = '\0';
  
+   SYMBOL_INIT_LANGUAGE_SPECIFIC (&psymbol, language);
+ 
    switch (language)
      {
      case language_c:
***************
*** 2433,2438 ****
--- 2557,2568 ----
      case language_chill:
        SYMBOL_CHILL_DEMANGLED_NAME (&psymbol) =
  	bcache (buf, dem_namelength + 1, &objfile->psymbol_cache);
+       break;
+     case language_fortran:
+       SYMBOL_FORTRAN_DEMANGLED_NAME (&psymbol) =
+ 	bcache (buf, dem_namelength + 1, &objfile->psymbol_cache);
+     default:
+       break;
  
        /* FIXME What should be done for the default case? Ignoring for now. */
      }
***************
*** 2447,2456 ****
        SYMBOL_VALUE_ADDRESS (&psymbol) = coreaddr;
      }
    SYMBOL_SECTION (&psymbol) = 0;
-   SYMBOL_LANGUAGE (&psymbol) = language;
    PSYMBOL_NAMESPACE (&psymbol) = namespace;
    PSYMBOL_CLASS (&psymbol) = class;
-   SYMBOL_INIT_LANGUAGE_SPECIFIC (&psymbol, language);
  
    /* Stash the partial symbol away in the cache */
    psym = bcache (&psymbol, sizeof (struct partial_symbol), &objfile->psymbol_cache);
--- 2577,2584 ----
***************
*** 3246,3251 ****
--- 3374,3387 ----
      }
  }
  
+ /* if ! overridden by platform specific code, don't know what the answer is */
+ static boolean 
+ generic_copy_exists (objfile, string)
+      struct objfile *objfile;
+      char *string;
+ {
+   return 0;			/* say no */
+ }
  
  void
  _initialize_symfile ()
***************
*** 3331,3337 ****
  		  "Set the write size used when downloading a program.\n"
  		  "Only used when downloading a program onto a remote\n"
  		  "target. Specify zero, or a negative value, to disable\n"
! 		  "blocked writes. The actual size of each transfer is also\n"
  		  "limited by the size of the target packet and the memory\n"
  		  "cache.\n",
  		  &setlist),
--- 3467,3473 ----
  		  "Set the write size used when downloading a program.\n"
  		  "Only used when downloading a program onto a remote\n"
  		  "target. Specify zero, or a negative value, to disable\n"
! 		"blocked writes. The actual size of each transfer is also\n"
  		  "limited by the size of the target packet and the memory\n"
  		  "cache.\n",
  		  &setlist),
Index: gdb/objfiles.c
/opt/gnu/bin/diff -r -c -N  /view/guo.wdb.c//CLO/Components/WDB/Src/gnu/gdb/objfiles.c gdb/objfiles.c
*** /view/guo.wdb.c//CLO/Components/WDB/Src/gnu/gdb/objfiles.c	Mon Nov  1 19:37:56 1999
--- gdb/objfiles.c	Tue Nov  2 15:32:21 1999
***************
*** 53,58 ****
--- 53,60 ----
  
  #endif /* defined(USE_MMALLOC) && defined(HAVE_MMAP) */
  
+ extern void mfree PARAMS ((PTR md, PTR ptr));
+ 
  static void
  add_to_objfile_sections PARAMS ((bfd *, sec_ptr, PTR));
  
***************
*** 517,524 ****
       struct objfile *objfile;
       struct section_offsets *new_offsets;
  {
    struct section_offsets *delta =
!     (struct section_offsets *) alloca (SIZEOF_SECTION_OFFSETS);
  
    {
      int i;
--- 519,527 ----
       struct objfile *objfile;
       struct section_offsets *new_offsets;
  {
+   extern void breakpoint_re_set ();
    struct section_offsets *delta =
!   (struct section_offsets *) alloca (SIZEOF_SECTION_OFFSETS);
  
    {
      int i;
***************
*** 645,671 ****
      abfd = objfile->obfd;
  
      ALL_OBJFILE_OSECTIONS (objfile, s)
!       {
! 	flagword flags;
  
! 	flags = bfd_get_section_flags (abfd, s->the_bfd_section);
  
! 	if (flags & SEC_CODE)
! 	  {
! 	    s->addr += ANOFFSET (delta, SECT_OFF_TEXT);
! 	    s->endaddr += ANOFFSET (delta, SECT_OFF_TEXT);
! 	  }
! 	else if (flags & (SEC_DATA | SEC_LOAD))
! 	  {
! 	    s->addr += ANOFFSET (delta, SECT_OFF_DATA);
! 	    s->endaddr += ANOFFSET (delta, SECT_OFF_DATA);
! 	  }
! 	else if (flags & SEC_ALLOC)
! 	  {
! 	    s->addr += ANOFFSET (delta, SECT_OFF_BSS);
! 	    s->endaddr += ANOFFSET (delta, SECT_OFF_BSS);
! 	  }
!       }
    }
  
    if (objfile->ei.entry_point != ~(CORE_ADDR) 0)
--- 648,674 ----
      abfd = objfile->obfd;
  
      ALL_OBJFILE_OSECTIONS (objfile, s)
!     {
!       flagword flags;
  
!       flags = bfd_get_section_flags (abfd, s->the_bfd_section);
  
!       if (flags & SEC_CODE)
! 	{
! 	  s->addr += ANOFFSET (delta, SECT_OFF_TEXT);
! 	  s->endaddr += ANOFFSET (delta, SECT_OFF_TEXT);
! 	}
!       else if (flags & (SEC_DATA | SEC_LOAD))
! 	{
! 	  s->addr += ANOFFSET (delta, SECT_OFF_DATA);
! 	  s->endaddr += ANOFFSET (delta, SECT_OFF_DATA);
! 	}
!       else if (flags & SEC_ALLOC)
! 	{
! 	  s->addr += ANOFFSET (delta, SECT_OFF_BSS);
! 	  s->endaddr += ANOFFSET (delta, SECT_OFF_BSS);
! 	}
!     }
    }
  
    if (objfile->ei.entry_point != ~(CORE_ADDR) 0)
***************
*** 958,964 ****
    ALL_OBJSECTIONS (objfile, s)
      if ((section == 0 || section == s->the_bfd_section) &&
  	s->addr <= pc && pc < s->endaddr)
!       return (s);
  
    return (NULL);
  }
--- 961,967 ----
    ALL_OBJSECTIONS (objfile, s)
      if ((section == 0 || section == s->the_bfd_section) &&
  	s->addr <= pc && pc < s->endaddr)
!     return (s);
  
    return (NULL);
  }
***************
*** 1008,1015 ****
      return 0;
  
    for (i = 0; i < objfile->import_list_size; i++)
!     if (objfile->import_list[i] && STREQ (name, objfile->import_list[i]))
        return 1;
    return 0;
  }
- 
--- 1011,1018 ----
      return 0;
  
    for (i = 0; i < objfile->import_list_size; i++)
!     if (objfile->import_list[i].name &&
! 	(STREQ (name, objfile->import_list[i].name)))
        return 1;
    return 0;
  }
Index: gdb/symfile.h
/opt/gnu/bin/diff -r -c -N  /view/guo.wdb.c//CLO/Components/WDB/Src/gnu/gdb/symfile.h gdb/symfile.h
*** /view/guo.wdb.c//CLO/Components/WDB/Src/gnu/gdb/symfile.h	Mon Nov  1 18:14:58 1999
--- gdb/symfile.h	Tue Nov  2 15:32:23 1999
***************
*** 75,81 ****
         struct sym_fns SF in preparation for sym_read().  It is called every
         time we read a symbol file for any reason. */
  
!     void (*sym_init) PARAMS ((struct objfile *));
  
      /* sym_read (objfile, mainline)
         Reads a symbol file into a psymtab (or possibly a symtab).
--- 75,81 ----
         struct sym_fns SF in preparation for sym_read().  It is called every
         time we read a symbol file for any reason. */
  
!     void (*sym_init) PARAMS ((struct objfile *, int));
  
      /* sym_read (objfile, mainline)
         Reads a symbol file into a psymtab (or possibly a symtab).
***************
*** 83,91 ****
         MAINLINE is 1 if this is the
         main symbol table being read, and 0 if a secondary
         symbol file (e.g. shared library or dynamically loaded file)
!        is being read.  */
  
!     void (*sym_read) PARAMS ((struct objfile *, int));
  
      /* Called when we are finished with an objfile.  Should do all cleanup
         that is specific to the object file format for the particular objfile. */
--- 83,101 ----
         MAINLINE is 1 if this is the
         main symbol table being read, and 0 if a secondary
         symbol file (e.g. shared library or dynamically loaded file)
!        is being read.
!        THRESHOLD_EXCEEDED is 1 if the auto-solib-add threshold has been
!        exceeded. It is up to the symbol reader to decide what to read in
!        in this case. */
  
!     void (*sym_read) PARAMS ((struct objfile *, int, int));
! 
! 
!     /* Same parameters (except for THRESHOLD_EXCEEDED) as
!        sym_read. Called to force reading odf symbols from objfiles that
!        were skipped by sym_read because of the threshold being exceeded. */
! 
!     void (*sym_add_psymtabs) PARAMS ((struct objfile *, int));
  
      /* Called when we are finished with an objfile.  Should do all cleanup
         that is specific to the object file format for the particular objfile. */
***************
*** 157,164 ****
  extern void
  init_entry_point_info PARAMS ((struct objfile *));
  
  extern void
! syms_from_objfile PARAMS ((struct objfile *, struct section_addr_info *, int, int));
  
  extern void
  new_symfile_objfile PARAMS ((struct objfile *, int, int));
--- 167,178 ----
  extern void
  init_entry_point_info PARAMS ((struct objfile *));
  
+ extern struct objfile *
+   maybe_symbol_file_add PARAMS ((char *, int, struct section_addr_info *,
+ 				 int, int, int));
+ 
  extern void
! syms_from_objfile PARAMS ((struct objfile *, struct section_addr_info *, int, int, int));
  
  extern void
  new_symfile_objfile PARAMS ((struct objfile *, int, int));
***************
*** 220,225 ****
--- 234,242 ----
  extern void find_lowest_section PARAMS ((bfd *, asection *, PTR));
  
  extern bfd *symfile_bfd_open PARAMS ((char *));
+ 
+ extern bfd *symfile_bfd_open_with_path_type PARAMS ((char *, char *,
+ 						     bfd_format, int));
  
  /* Utility functions for overlay sections: */
  extern int overlay_debugging;
Index: gdb/symtab.h
/opt/gnu/bin/diff -r -c -N  /view/guo.wdb.c//CLO/Components/WDB/Src/gnu/gdb/symtab.h gdb/symtab.h
*** /view/guo.wdb.c//CLO/Components/WDB/Src/gnu/gdb/symtab.h	Mon Nov  1 19:25:17 1999
--- gdb/symtab.h	Tue Nov  2 15:32:23 1999
***************
*** 97,102 ****
--- 97,108 ----
  	    char *demangled_name;
  	  }
  	chill_specific;
+ 	struct fortran_specific	/* For fortran */
+ 	  {
+ 	    char *demangled_name;
+ 	    CORE_ADDR var_offset;	/* for Fortran common variables */
+ 	  }
+ 	fortran_specific;
        }
      language_specific;
  
***************
*** 135,140 ****
--- 141,152 ----
  #define SYMBOL_CPLUS_DEMANGLED_NAME(symbol)	\
    (symbol)->ginfo.language_specific.cplus_specific.demangled_name
  
+ #define SYMBOL_FORTRAN_DEMANGLED_NAME(symbol)	\
+   (symbol)->ginfo.language_specific.fortran_specific.demangled_name
+ 
+ #define SYMBOL_VAR_OFFSET(symbol)	\
+   (symbol)->ginfo.language_specific.fortran_specific.var_offset
+ 
  /* Macro that initializes the language dependent portion of a symbol
     depending upon the language for the symbol. */
  
***************
*** 151,156 ****
--- 163,173 ----
        {									\
  	SYMBOL_CHILL_DEMANGLED_NAME (symbol) = NULL;			\
        }									\
+     else if (SYMBOL_LANGUAGE (symbol) == language_fortran)              \
+       {                                                                 \
+         SYMBOL_FORTRAN_DEMANGLED_NAME (symbol) = NULL;                  \
+         SYMBOL_VAR_OFFSET (symbol) = 0;                                 \
+       }                                                                 \
      else								\
        {									\
  	memset (&(symbol)->ginfo.language_specific, 0,			\
***************
*** 237,243 ****
     ? SYMBOL_CPLUS_DEMANGLED_NAME (symbol)				\
     : (SYMBOL_LANGUAGE (symbol) == language_chill			\
        ? SYMBOL_CHILL_DEMANGLED_NAME (symbol)				\
!       : NULL))
  
  #define SYMBOL_CHILL_DEMANGLED_NAME(symbol)				\
    (symbol)->ginfo.language_specific.chill_specific.demangled_name
--- 254,262 ----
     ? SYMBOL_CPLUS_DEMANGLED_NAME (symbol)				\
     : (SYMBOL_LANGUAGE (symbol) == language_chill			\
        ? SYMBOL_CHILL_DEMANGLED_NAME (symbol)				\
!       : (SYMBOL_LANGUAGE (symbol) == language_fortran                   \
!          ? SYMBOL_FORTRAN_DEMANGLED_NAME (symbol)                       \
!          : NULL)))
  
  #define SYMBOL_CHILL_DEMANGLED_NAME(symbol)				\
    (symbol)->ginfo.language_specific.chill_specific.demangled_name
***************
*** 830,851 ****
     loading of modules.  This is for use when entering commands, so we
     can keep track of the section names until we read the file and
     can map them to bfd sections. */
!  
  #define MAX_SECTIONS 12
! struct section_addr_info 
! {
!   /* Sections whose names are always known to gdb. */
!   CORE_ADDR text_addr;
!   CORE_ADDR data_addr;
!   CORE_ADDR bss_addr;
!   /* Sections whose names are file format dependant. */
!   struct other_sections
!   {
!     CORE_ADDR addr;
!     char *name;
!     int sectindex;
!   } other[MAX_SECTIONS];
! };
  
  /* Each source file or header is represented by a struct symtab. 
     These objects are chained through the `next' field.  */
--- 849,871 ----
     loading of modules.  This is for use when entering commands, so we
     can keep track of the section names until we read the file and
     can map them to bfd sections. */
! 
  #define MAX_SECTIONS 12
! struct section_addr_info
!   {
!     /* Sections whose names are always known to gdb. */
!     CORE_ADDR text_addr;
!     CORE_ADDR data_addr;
!     CORE_ADDR bss_addr;
!     /* Sections whose names are file format dependant. */
!     struct other_sections
!       {
! 	CORE_ADDR addr;
! 	char *name;
! 	int sectindex;
!       }
!     other[MAX_SECTIONS];
!   };
  
  /* Each source file or header is represented by a struct symtab. 
     These objects are chained through the `next' field.  */
***************
*** 1018,1023 ****
--- 1038,1048 ----
  
      struct symtab *symtab;
  
+     /* RM: I don't like the way we guess the initial language based on
+        the filename extension of the main psymtab. Let's record the
+        language here. */
+     enum language language;
+ 
      /* Pointer to function which will read in the symtab corresponding to
         this psymtab.  */
  
***************
*** 1419,1425 ****
  clear_solib PARAMS ((void));
  
  extern struct objfile *
! symbol_file_add PARAMS ((char *, int, struct section_addr_info *, int, int));
  
  /* source.c */
  
--- 1444,1450 ----
  clear_solib PARAMS ((void));
  
  extern struct objfile *
!   symbol_file_add PARAMS ((char *, int, struct section_addr_info *, int, int));
  
  /* source.c */
  
***************
*** 1455,1460 ****
--- 1480,1488 ----
  				   struct symtab *));
  
  /* symfile.c */
+ 
+ extern void
+ solib_clear_symtab_users PARAMS ((void));
  
  extern void
  clear_symtab_users PARAMS ((void));
Index: gdb/objfiles.h
/opt/gnu/bin/diff -r -c -N  /view/guo.wdb.c//CLO/Components/WDB/Src/gnu/gdb/objfiles.h gdb/objfiles.h
*** /view/guo.wdb.c//CLO/Components/WDB/Src/gnu/gdb/objfiles.h	Mon Nov  1 18:12:11 1999
--- gdb/objfiles.h	Tue Nov  2 15:32:21 1999
***************
*** 164,172 ****
  /* An import entry contains information about a symbol that
     is used in this objfile but not defined in it, and so needs
     to be imported from some other objfile */
! /* Currently we just store the name; no attributes. 1997-08-05 */
! typedef char *ImportEntry;
! 
  
  /* An export entry contains information about a symbol that
     is defined in this objfile and available for use in other
--- 164,179 ----
  /* An import entry contains information about a symbol that
     is used in this objfile but not defined in it, and so needs
     to be imported from some other objfile */
! /* RM: we store the name, and for data symbols, the address of the
!  * DLT slot for that data symbol
!  */
! typedef
! struct
!   {
!     char *name;
!     CORE_ADDR dlt_addr;
!   }
! ImportEntry;
  
  /* An export entry contains information about a symbol that
     is defined in this objfile and available for use in other
***************
*** 361,367 ****
      int num_sections;
  
      /* These pointers are used to locate the section table, which
!        among other thigs, is used to map pc addresses into sections.
         SECTIONS points to the first entry in the table, and
         SECTIONS_END points to the first location past the last entry
         in the table.  Currently the table is stored on the
--- 368,374 ----
      int num_sections;
  
      /* These pointers are used to locate the section table, which
!        among other things, is used to map pc addresses into sections.
         SECTIONS points to the first entry in the table, and
         SECTIONS_END points to the first location past the last entry
         in the table.  Currently the table is stored on the
***************
*** 470,476 ****
  /* Declarations for functions defined in objfiles.c */
  
  extern struct objfile *
! allocate_objfile PARAMS ((bfd *, int));
  
  extern int
  build_objfile_section_table PARAMS ((struct objfile *));
--- 477,483 ----
  /* Declarations for functions defined in objfiles.c */
  
  extern struct objfile *
!   allocate_objfile PARAMS ((bfd *, int));
  
  extern int
  build_objfile_section_table PARAMS ((struct objfile *));
Index: gdb/config/pa/tm-hppa.h
/opt/gnu/bin/diff -r -c -N  /view/guo.wdb.c//CLO/Components/WDB/Src/gnu/gdb/config/pa/tm-hppa.h gdb/config/pa/tm-hppa.h
*** /view/guo.wdb.c//CLO/Components/WDB/Src/gnu/gdb/config/pa/tm-hppa.h	Mon Nov  1 19:54:40 1999
--- gdb/config/pa/tm-hppa.h	Tue Nov  2 15:32:26 1999
***************
*** 796,804 ****
  
  #define COERCE_FLOAT_TO_DOUBLE (current_language -> la_language == language_c)
  
  /* Here's how to step off a permanent breakpoint.  */
  #define SKIP_PERMANENT_BREAKPOINT (hppa_skip_permanent_breakpoint)
! extern void hppa_skip_permanent_breakpoint (void);
  
  /* On HP-UX, certain system routines (millicode) have names beginning
     with $ or $$, e.g. $$dyncall, which handles inter-space procedure
--- 796,819 ----
  
  #define COERCE_FLOAT_TO_DOUBLE (current_language -> la_language == language_c)
  
+ /* IS_RELOC_ONLY_SYMBOL is used to identify symbols which used to be excluded
+    from the minimal symbol table but which are now included because they
+    are needed for linker fixups for DOOM.
+  */
+ 
+ #define IS_RELOC_ONLY_SYMBOL(symname)					\
+                  (strcmp(symname,"$START$")                             \
+ 		 && (((symname)[0] == 'L' && (symname)[1] == '$')	\
+ 		 || ((symname)[0] == '$'				\
+ 		     && (symname)[strlen((symname)) - 1] == '$')	\
+ 		 || ((symname)[0] == 'D' && (symname)[1] == '$')	\
+ 		 || (strncmp ((symname), "$PIC", 4) == 0)               \
+ 		 || ((symname)[0] == '$' && isdigit ((symname)[1]))     \
+ 		 ))
+ 
  /* Here's how to step off a permanent breakpoint.  */
  #define SKIP_PERMANENT_BREAKPOINT (hppa_skip_permanent_breakpoint)
!      extern void hppa_skip_permanent_breakpoint (void);
  
  /* On HP-UX, certain system routines (millicode) have names beginning
     with $ or $$, e.g. $$dyncall, which handles inter-space procedure
Index: gdb/coffread.c
/opt/gnu/bin/diff -r -c -N  /view/guo.wdb.c//CLO/Components/WDB/Src/gnu/gdb/coffread.c gdb/coffread.c
*** /view/guo.wdb.c//CLO/Components/WDB/Src/gnu/gdb/coffread.c	Mon Nov  1 19:40:18 1999
--- gdb/coffread.c	Mon Nov  1 19:40:36 1999
***************
*** 57,62 ****
--- 57,64 ----
      char *stabstrdata;
    };
  
+ extern void mfree PARAMS ((PTR md, PTR ptr));
+ 
  /* Translate an external name string into a user-visible name.  */
  #define	EXTERNAL_NAME(string, abfd) \
  	(string[0] == bfd_get_symbol_leading_char(abfd)? string+1: string)
***************
*** 223,233 ****
  
  static void find_linenos PARAMS ((bfd *, sec_ptr, PTR));
  
! static void coff_symfile_init PARAMS ((struct objfile *));
  
  static void coff_new_init PARAMS ((struct objfile *));
  
! static void coff_symfile_read PARAMS ((struct objfile *, int));
  
  static void coff_symfile_finish PARAMS ((struct objfile *));
  
--- 225,235 ----
  
  static void find_linenos PARAMS ((bfd *, sec_ptr, PTR));
  
! static void coff_symfile_init PARAMS ((struct objfile *, int));
  
  static void coff_new_init PARAMS ((struct objfile *));
  
! static void coff_symfile_read PARAMS ((struct objfile *, int, int));
  
  static void coff_symfile_finish PARAMS ((struct objfile *));
  
***************
*** 526,533 ****
     The ultimate result is a new symtab (or, FIXME, eventually a psymtab).  */
  
  static void
! coff_symfile_init (objfile)
       struct objfile *objfile;
  {
    /* Allocate struct to keep track of stab reading. */
    objfile->sym_stab_info = (struct dbx_symfile_info *)
--- 528,536 ----
     The ultimate result is a new symtab (or, FIXME, eventually a psymtab).  */
  
  static void
! coff_symfile_init (objfile, threshold_exceeded)
       struct objfile *objfile;
+      int threshold_exceeded;
  {
    /* Allocate struct to keep track of stab reading. */
    objfile->sym_stab_info = (struct dbx_symfile_info *)
***************
*** 595,603 ****
  
  /* ARGSUSED */
  static void
! coff_symfile_read (objfile, mainline)
       struct objfile *objfile;
       int mainline;
  {
    struct coff_symfile_info *info;
    struct dbx_symfile_info *dbxinfo;
--- 598,607 ----
  
  /* ARGSUSED */
  static void
! coff_symfile_read (objfile, mainline, threshold_exceeded)
       struct objfile *objfile;
       int mainline;
+      int threshold_exceeded;
  {
    struct coff_symfile_info *info;
    struct dbx_symfile_info *dbxinfo;
***************
*** 904,910 ****
  		     followed by a later file with no symbols.  */
  		  if (in_source_file)
  		    complete_symtab (filestring,
! 		    cs->c_value + ANOFFSET (objfile->section_offsets, SECT_OFF_TEXT),
  				     main_aux.x_scn.x_scnlen);
  		  in_source_file = 0;
  		}
--- 908,914 ----
  		     followed by a later file with no symbols.  */
  		  if (in_source_file)
  		    complete_symtab (filestring,
! 				     cs->c_value + ANOFFSET (objfile->section_offsets, SECT_OFF_TEXT),
  				     main_aux.x_scn.x_scnlen);
  		  in_source_file = 0;
  		}
***************
*** 1095,1105 ****
  	         of the epilogue.  */
  			    cs->c_value
  			    + FUNCTION_EPILOGUE_SIZE
! 			    + ANOFFSET (objfile->section_offsets, SECT_OFF_TEXT),
  #else
  			    fcn_cs_saved.c_value
  			    + fcn_aux_saved.x_sym.x_misc.x_fsize
! 			    + ANOFFSET (objfile->section_offsets, SECT_OFF_TEXT),
  #endif
  			    objfile
  		);
--- 1099,1109 ----
  	         of the epilogue.  */
  			    cs->c_value
  			    + FUNCTION_EPILOGUE_SIZE
! 		       + ANOFFSET (objfile->section_offsets, SECT_OFF_TEXT),
  #else
  			    fcn_cs_saved.c_value
  			    + fcn_aux_saved.x_sym.x_misc.x_fsize
! 		       + ANOFFSET (objfile->section_offsets, SECT_OFF_TEXT),
  #endif
  			    objfile
  		);
***************
*** 2206,2211 ****
--- 2210,2216 ----
    coff_new_init,		/* sym_new_init: init anything gbl to entire symtab */
    coff_symfile_init,		/* sym_init: read initial info, setup for sym_read() */
    coff_symfile_read,		/* sym_read: read a symbol file into symtab */
+   0,
    coff_symfile_finish,		/* sym_finish: finished with file, cleanup */
    default_symfile_offsets,	/* sym_offsets:  xlate external to internal form */
    NULL				/* next: pointer to next struct sym_fns */
Index: gdb/dbxread.c
/opt/gnu/bin/diff -r -c -N  /view/guo.wdb.c//CLO/Components/WDB/Src/gnu/gdb/dbxread.c gdb/dbxread.c
*** /view/guo.wdb.c//CLO/Components/WDB/Src/gnu/gdb/dbxread.c	Mon Nov  1 19:41:18 1999
--- gdb/dbxread.c	Mon Nov  1 19:42:43 1999
***************
*** 111,116 ****
--- 111,118 ----
  #define FILE_STRING_OFFSET(p) (SYMLOC(p)->file_string_offset)
  
  
+ extern void mfree PARAMS ((PTR md, PTR ptr));
+ 
  /* Remember what we deduced to be the source language of this psymtab. */
  
  static enum language psymtab_language = language_unknown;
***************
*** 310,322 ****
  fill_symbuf PARAMS ((bfd *));
  
  static void
! dbx_symfile_init PARAMS ((struct objfile *));
  
  static void
  dbx_new_init PARAMS ((struct objfile *));
  
  static void
! dbx_symfile_read PARAMS ((struct objfile *, int));
  
  static void
  dbx_symfile_finish PARAMS ((struct objfile *));
--- 312,324 ----
  fill_symbuf PARAMS ((bfd *));
  
  static void
! dbx_symfile_init PARAMS ((struct objfile *, int));
  
  static void
  dbx_new_init PARAMS ((struct objfile *));
  
  static void
! dbx_symfile_read PARAMS ((struct objfile *, int, int));
  
  static void
  dbx_symfile_finish PARAMS ((struct objfile *));
***************
*** 334,340 ****
  add_this_object_header_file PARAMS ((int));
  
  static struct partial_symtab *
! start_psymtab PARAMS ((struct objfile *, char *, CORE_ADDR, int,
  		       struct partial_symbol **, struct partial_symbol **));
  
  /* Free up old header file tables */
--- 336,342 ----
  add_this_object_header_file PARAMS ((int));
  
  static struct partial_symtab *
!   start_psymtab PARAMS ((struct objfile *, char *, CORE_ADDR, int,
  		       struct partial_symbol **, struct partial_symbol **));
  
  /* Free up old header file tables */
***************
*** 579,587 ****
     table (as opposed to a shared lib or dynamically loaded file).  */
  
  static void
! dbx_symfile_read (objfile, mainline)
       struct objfile *objfile;
       int mainline;		/* FIXME comments above */
  {
    bfd *sym_bfd;
    int val;
--- 581,590 ----
     table (as opposed to a shared lib or dynamically loaded file).  */
  
  static void
! dbx_symfile_read (objfile, mainline, threshold_exceeded)
       struct objfile *objfile;
       int mainline;		/* FIXME comments above */
+      int threshold_exceeded;
  {
    bfd *sym_bfd;
    int val;
***************
*** 671,678 ****
  #define DBX_STRINGTAB_SIZE_SIZE sizeof(long)	/* FIXME */
  
  static void
! dbx_symfile_init (objfile)
       struct objfile *objfile;
  {
    int val;
    bfd *sym_bfd = objfile->obfd;
--- 674,682 ----
  #define DBX_STRINGTAB_SIZE_SIZE sizeof(long)	/* FIXME */
  
  static void
! dbx_symfile_init (objfile, threshold_exceeded)
       struct objfile *objfile;
+      int threshold_exceeded;
  {
    int val;
    bfd *sym_bfd = objfile->obfd;
***************
*** 1298,1304 ****
  
    last_source_file = NULL;
  
!   lowest_text_address = (CORE_ADDR) -1;
  
    symfile_bfd = objfile->obfd;	/* For next_text_symbol */
    abfd = objfile->obfd;
--- 1302,1308 ----
  
    last_source_file = NULL;
  
!   lowest_text_address = (CORE_ADDR) - 1;
  
    symfile_bfd = objfile->obfd;	/* For next_text_symbol */
    abfd = objfile->obfd;
***************
*** 1380,1386 ****
      {
        /* Don't set pst->texthigh lower than it already is.  */
        CORE_ADDR text_end =
!       (lowest_text_address == (CORE_ADDR) -1
         ? (text_addr + ANOFFSET (objfile->section_offsets, SECT_OFF_TEXT))
         : lowest_text_address)
        + text_size;
--- 1384,1390 ----
      {
        /* Don't set pst->texthigh lower than it already is.  */
        CORE_ADDR text_end =
!       (lowest_text_address == (CORE_ADDR) - 1
         ? (text_addr + ANOFFSET (objfile->section_offsets, SECT_OFF_TEXT))
         : lowest_text_address)
        + text_size;
***************
*** 2314,2320 ****
  	         from N_FUN symbols.  */
  	      if (type == N_FUN
  		  && valu == ANOFFSET (section_offsets, SECT_OFF_TEXT))
! 		valu = 
  		  find_stab_function_addr (name, last_source_file, objfile);
  #endif
  
--- 2318,2324 ----
  	         from N_FUN symbols.  */
  	      if (type == N_FUN
  		  && valu == ANOFFSET (section_offsets, SECT_OFF_TEXT))
! 		valu =
  		  find_stab_function_addr (name, last_source_file, objfile);
  #endif
  
***************
*** 2565,2571 ****
        symbuf_read = 0;
      }
  
!   dbx_symfile_read (objfile, 0);
  }
  
  /* Scan and build partial symbols for an ELF symbol file.
--- 2569,2575 ----
        symbuf_read = 0;
      }
  
!   dbx_symfile_read (objfile, 0, 0);
  }
  
  /* Scan and build partial symbols for an ELF symbol file.
***************
*** 2644,2650 ****
    /* In an elf file, we've already installed the minimal symbols that came
       from the elf (non-stab) symbol table, so always act like an
       incremental load here. */
!   dbx_symfile_read (objfile, 0);
  }
  
  /* Scan and build partial symbols for a file with special sections for stabs
--- 2648,2654 ----
    /* In an elf file, we've already installed the minimal symbols that came
       from the elf (non-stab) symbol table, so always act like an
       incremental load here. */
!   dbx_symfile_read (objfile, 0, 0);
  }
  
  /* Scan and build partial symbols for a file with special sections for stabs
***************
*** 2732,2738 ****
    /* Now, do an incremental load */
  
    processing_acc_compilation = 1;
!   dbx_symfile_read (objfile, 0);
  }
  
  static struct sym_fns aout_sym_fns =
--- 2736,2742 ----
    /* Now, do an incremental load */
  
    processing_acc_compilation = 1;
!   dbx_symfile_read (objfile, 0, 0);
  }
  
  static struct sym_fns aout_sym_fns =
***************
*** 2741,2746 ****
--- 2745,2751 ----
    dbx_new_init,			/* sym_new_init: init anything gbl to entire symtab */
    dbx_symfile_init,		/* sym_init: read initial info, setup for sym_read() */
    dbx_symfile_read,		/* sym_read: read a symbol file into symtab */
+   0,
    dbx_symfile_finish,		/* sym_finish: finished with file, cleanup */
    default_symfile_offsets,	/* sym_offsets: parse user's offsets to internal form */
    NULL				/* next: pointer to next struct sym_fns */
Index: gdb/dstread.c
/opt/gnu/bin/diff -r -c -N  /view/guo.wdb.c//CLO/Components/WDB/Src/gnu/gdb/dstread.c gdb/dstread.c
*** /view/guo.wdb.c//CLO/Components/WDB/Src/gnu/gdb/dstread.c	Mon Nov  1 19:43:13 1999
--- gdb/dstread.c	Mon Nov  1 19:43:23 1999
***************
*** 62,74 ****
  find_dst_sections PARAMS ((bfd *, sec_ptr, PTR));
  
  static void
! dst_symfile_init PARAMS ((struct objfile *));
  
  static void
  dst_new_init PARAMS ((struct objfile *));
  
  static void
! dst_symfile_read PARAMS ((struct objfile *, int));
  
  static void
  dst_symfile_finish PARAMS ((struct objfile *));
--- 62,74 ----
  find_dst_sections PARAMS ((bfd *, sec_ptr, PTR));
  
  static void
! dst_symfile_init PARAMS ((struct objfile *, int));
  
  static void
  dst_new_init PARAMS ((struct objfile *));
  
  static void
! dst_symfile_read PARAMS ((struct objfile *, int, int));
  
  static void
  dst_symfile_finish PARAMS ((struct objfile *));
***************
*** 205,212 ****
     The ultimate result is a new symtab (or, FIXME, eventually a psymtab).  */
  
  static void
! dst_symfile_init (objfile)
       struct objfile *objfile;
  {
    asection *section;
    bfd *abfd = objfile->obfd;
--- 205,213 ----
     The ultimate result is a new symtab (or, FIXME, eventually a psymtab).  */
  
  static void
! dst_symfile_init (objfile, threshold_exceeded)
       struct objfile *objfile;
+      int threshold_exceeded;
  {
    asection *section;
    bfd *abfd = objfile->obfd;
***************
*** 263,271 ****
  
  /* ARGSUSED */
  static void
! dst_symfile_read (objfile, mainline)
       struct objfile *objfile;
       int mainline;
  {
    bfd *abfd = objfile->obfd;
    char *name = bfd_get_filename (abfd);
--- 264,273 ----
  
  /* ARGSUSED */
  static void
! dst_symfile_read (objfile, mainline, threshold_exceeded)
       struct objfile *objfile;
       int mainline;
+      int threshold_exceeded;
  {
    bfd *abfd = objfile->obfd;
    char *name = bfd_get_filename (abfd);
***************
*** 1639,1645 ****
  {0};
  
  void
! dst_symfile_offsets (objfile, addr)
       struct objfile *objfile;
       struct section_addr_info *addrs;
  {
--- 1641,1647 ----
  {0};
  
  void
! dst_symfile_offsets (objfile, addrs)
       struct objfile *objfile;
       struct section_addr_info *addrs;
  {
***************
*** 1658,1663 ****
--- 1660,1666 ----
    dst_new_init,			/* sym_new_init: init anything gbl to entire symtab */
    dst_symfile_init,		/* sym_init: read initial info, setup for sym_read() */
    dst_symfile_read,		/* sym_read: read a symbol file into symtab */
+   0,
    dst_symfile_finish,		/* sym_finish: finished with file, cleanup */
    dst_symfile_offsets,		/* sym_offsets:  xlate external to internal form */
    NULL				/* next: pointer to next struct sym_fns */
Index: gdb/elfread.c
/opt/gnu/bin/diff -r -c -N  /view/guo.wdb.c//CLO/Components/WDB/Src/gnu/gdb/elfread.c gdb/elfread.c
*** /view/guo.wdb.c//CLO/Components/WDB/Src/gnu/gdb/elfread.c	Mon Nov  1 19:46:33 1999
--- gdb/elfread.c	Mon Nov  1 19:46:42 1999
***************
*** 35,40 ****
--- 35,42 ----
  
  extern void _initialize_elfread PARAMS ((void));
  
+ extern void mfree PARAMS ((PTR md, PTR ptr));
+ 
  /* The struct elfinfo is available only during ELF symbol table and
     psymtab reading.  It is destroyed at the completion of psymtab-reading.
     It's local to elf_symfile_read.  */
***************
*** 65,77 ****
  {"elf/stab section information questionable for %s", 0, 0};
  
  static void
! elf_symfile_init PARAMS ((struct objfile *));
  
  static void
  elf_new_init PARAMS ((struct objfile *));
  
  static void
! elf_symfile_read PARAMS ((struct objfile *, int));
  
  static void
  elf_symfile_finish PARAMS ((struct objfile *));
--- 67,79 ----
  {"elf/stab section information questionable for %s", 0, 0};
  
  static void
! elf_symfile_init PARAMS ((struct objfile *, int));
  
  static void
  elf_new_init PARAMS ((struct objfile *));
  
  static void
! elf_symfile_read PARAMS ((struct objfile *, int, int));
  
  static void
  elf_symfile_finish PARAMS ((struct objfile *));
***************
*** 583,591 ****
     capability even for files compiled without -g.  */
  
  static void
! elf_symfile_read (objfile, mainline)
       struct objfile *objfile;
       int mainline;
  {
    bfd *abfd = objfile->obfd;
    struct elfinfo ei;
--- 585,594 ----
     capability even for files compiled without -g.  */
  
  static void
! elf_symfile_read (objfile, mainline, threshold_exceeded)
       struct objfile *objfile;
       int mainline;
+      int threshold_exceeded;
  {
    bfd *abfd = objfile->obfd;
    struct elfinfo ei;
***************
*** 751,758 ****
     just a stub. */
  
  static void
! elf_symfile_init (objfile)
       struct objfile *objfile;
  {
    /* ELF objects may be reordered, so set OBJF_REORDERED.  If we
       find this causes a significant slowdown in gdb then we could
--- 754,762 ----
     just a stub. */
  
  static void
! elf_symfile_init (objfile, threshold_exceeded)
       struct objfile *objfile;
+      int threshold_exceeded;
  {
    /* ELF objects may be reordered, so set OBJF_REORDERED.  If we
       find this causes a significant slowdown in gdb then we could
***************
*** 831,836 ****
--- 835,841 ----
    elf_new_init,			/* sym_new_init: init anything gbl to entire symtab */
    elf_symfile_init,		/* sym_init: read initial info, setup for sym_read() */
    elf_symfile_read,		/* sym_read: read a symbol file into symtab */
+   0,
    elf_symfile_finish,		/* sym_finish: finished with file, cleanup */
    default_symfile_offsets,	/* sym_offsets:  Translate ext. to int. relocation */
    NULL				/* next: pointer to next struct sym_fns */
Index: gdb/mipsread.c
/opt/gnu/bin/diff -r -c -N  /view/guo.wdb.c//CLO/Components/WDB/Src/gnu/gdb/mipsread.c gdb/mipsread.c
*** /view/guo.wdb.c//CLO/Components/WDB/Src/gnu/gdb/mipsread.c	Mon Nov  1 19:47:58 1999
--- gdb/mipsread.c	Mon Nov  1 19:48:07 1999
***************
*** 48,57 ****
  mipscoff_new_init PARAMS ((struct objfile *));
  
  static void
! mipscoff_symfile_init PARAMS ((struct objfile *));
  
  static void
! mipscoff_symfile_read PARAMS ((struct objfile *, int));
  
  static void
  mipscoff_symfile_finish PARAMS ((struct objfile *));
--- 48,57 ----
  mipscoff_new_init PARAMS ((struct objfile *));
  
  static void
! mipscoff_symfile_init PARAMS ((struct objfile *, int));
  
  static void
! mipscoff_symfile_read PARAMS ((struct objfile *, int, int));
  
  static void
  mipscoff_symfile_finish PARAMS ((struct objfile *));
***************
*** 78,94 ****
  /* Initialize to read a symbol file (nothing to do).  */
  
  static void
! mipscoff_symfile_init (objfile)
       struct objfile *objfile;
  {
  }
  
  /* Read a symbol file from a file.  */
  
  static void
! mipscoff_symfile_read (objfile, mainline)
       struct objfile *objfile;
       int mainline;
  {
    bfd *abfd = objfile->obfd;
    struct cleanup *back_to;
--- 78,96 ----
  /* Initialize to read a symbol file (nothing to do).  */
  
  static void
! mipscoff_symfile_init (objfile, threshold_exceeded)
       struct objfile *objfile;
+      int threshold_exceeded;
  {
  }
  
  /* Read a symbol file from a file.  */
  
  static void
! mipscoff_symfile_read (objfile, mainline, threshold_exceeded)
       struct objfile *objfile;
       int mainline;
+      int threshold_exceeded;
  {
    bfd *abfd = objfile->obfd;
    struct cleanup *back_to;
***************
*** 442,447 ****
--- 444,450 ----
    mipscoff_new_init,		/* sym_new_init: init anything gbl to entire symtab */
    mipscoff_symfile_init,	/* sym_init: read initial info, setup for sym_read() */
    mipscoff_symfile_read,	/* sym_read: read a symbol file into symtab */
+   0,
    mipscoff_symfile_finish,	/* sym_finish: finished with file, cleanup */
    default_symfile_offsets,	/* sym_offsets: dummy FIXME til implem sym reloc */
    NULL				/* next: pointer to next struct sym_fns */
Index: gdb/nlmread.c
/opt/gnu/bin/diff -r -c -N  /view/guo.wdb.c//CLO/Components/WDB/Src/gnu/gdb/nlmread.c gdb/nlmread.c
*** /view/guo.wdb.c//CLO/Components/WDB/Src/gnu/gdb/nlmread.c	Mon Nov  1 19:48:24 1999
--- gdb/nlmread.c	Mon Nov  1 19:48:48 1999
***************
*** 31,44 ****
  
  extern void _initialize_nlmread PARAMS ((void));
  
  static void
  nlm_new_init PARAMS ((struct objfile *));
  
  static void
! nlm_symfile_init PARAMS ((struct objfile *));
  
  static void
! nlm_symfile_read PARAMS ((struct objfile *, int));
  
  static void
  nlm_symfile_finish PARAMS ((struct objfile *));
--- 31,46 ----
  
  extern void _initialize_nlmread PARAMS ((void));
  
+ extern void mfree PARAMS ((PTR md, PTR ptr));
+ 
  static void
  nlm_new_init PARAMS ((struct objfile *));
  
  static void
! nlm_symfile_init PARAMS ((struct objfile *, int));
  
  static void
! nlm_symfile_read PARAMS ((struct objfile *, int, int));
  
  static void
  nlm_symfile_finish PARAMS ((struct objfile *));
***************
*** 72,79 ****
     just a stub. */
  
  static void
! nlm_symfile_init (ignore)
       struct objfile *ignore;
  {
  }
  
--- 74,82 ----
     just a stub. */
  
  static void
! nlm_symfile_init (ignore, threshold_exceeded)
       struct objfile *ignore;
+      int threshold_exceeded;
  {
  }
  
***************
*** 182,190 ****
     is not currently used. */
  
  static void
! nlm_symfile_read (objfile, mainline)
       struct objfile *objfile;
       int mainline;
  {
    bfd *abfd = objfile->obfd;
    struct cleanup *back_to;
--- 185,194 ----
     is not currently used. */
  
  static void
! nlm_symfile_read (objfile, mainline, threshold_exceeded)
       struct objfile *objfile;
       int mainline;
+      int threshold_exceeded;
  {
    bfd *abfd = objfile->obfd;
    struct cleanup *back_to;
***************
*** 250,255 ****
--- 254,260 ----
    nlm_new_init,			/* sym_new_init: init anything gbl to entire symtab */
    nlm_symfile_init,		/* sym_init: read initial info, setup for sym_read() */
    nlm_symfile_read,		/* sym_read: read a symbol file into symtab */
+   0,
    nlm_symfile_finish,		/* sym_finish: finished with file, cleanup */
    default_symfile_offsets,	/* sym_offsets:  Translate ext. to int. relocation */
    NULL				/* next: pointer to next struct sym_fns */
Index: gdb/os9kread.c
/opt/gnu/bin/diff -r -c -N  /view/guo.wdb.c//CLO/Components/WDB/Src/gnu/gdb/os9kread.c gdb/os9kread.c
*** /view/guo.wdb.c//CLO/Components/WDB/Src/gnu/gdb/os9kread.c	Mon Nov  1 19:49:06 1999
--- gdb/os9kread.c	Mon Nov  1 19:49:14 1999
***************
*** 103,108 ****
--- 103,110 ----
     object file boundaries.  */
  static char *last_function_name;
  
+ extern void mfree PARAMS ((PTR md, PTR ptr));
+ 
  /* Complaints about the symbols we have encountered.  */
  extern struct complaint lbrac_complaint;
  
***************
*** 145,157 ****
  fill_sym PARAMS ((FILE *, bfd *));
  
  static void
! os9k_symfile_init PARAMS ((struct objfile *));
  
  static void
  os9k_new_init PARAMS ((struct objfile *));
  
  static void
! os9k_symfile_read PARAMS ((struct objfile *, int));
  
  static void
  os9k_symfile_finish PARAMS ((struct objfile *));
--- 147,159 ----
  fill_sym PARAMS ((FILE *, bfd *));
  
  static void
! os9k_symfile_init PARAMS ((struct objfile *, int));
  
  static void
  os9k_new_init PARAMS ((struct objfile *));
  
  static void
! os9k_symfile_read PARAMS ((struct objfile *, int, int));
  
  static void
  os9k_symfile_finish PARAMS ((struct objfile *));
***************
*** 326,334 ****
     table (as opposed to a shared lib or dynamically loaded file).  */
  
  static void
! os9k_symfile_read (objfile, mainline)
       struct objfile *objfile;
       int mainline;		/* FIXME comments above */
  {
    bfd *sym_bfd;
    struct cleanup *back_to;
--- 328,337 ----
     table (as opposed to a shared lib or dynamically loaded file).  */
  
  static void
! os9k_symfile_read (objfile, mainline, threshold_exceeded)
       struct objfile *objfile;
       int mainline;		/* FIXME comments above */
+      int threshold_exceeded;
  {
    bfd *sym_bfd;
    struct cleanup *back_to;
***************
*** 381,388 ****
     FIXME, there should be a cleaner peephole into the BFD environment here.  */
  
  static void
! os9k_symfile_init (objfile)
       struct objfile *objfile;
  {
    bfd *sym_bfd = objfile->obfd;
    char *name = bfd_get_filename (sym_bfd);
--- 384,392 ----
     FIXME, there should be a cleaner peephole into the BFD environment here.  */
  
  static void
! os9k_symfile_init (objfile, threshold_exceeded)
       struct objfile *objfile;
+      int threshold_exceeded;
  {
    bfd *sym_bfd = objfile->obfd;
    char *name = bfd_get_filename (sym_bfd);
***************
*** 1374,1380 ****
        type = bufp->n_type;
  
        os9k_process_one_symbol ((int) type, (int) bufp->n_desc,
! 	 (CORE_ADDR) bufp->n_value, bufp->n_strx, pst->section_offsets, objfile);
  
        /* We skip checking for a new .o or -l file; that should never
           happen in this routine. */
--- 1378,1384 ----
        type = bufp->n_type;
  
        os9k_process_one_symbol ((int) type, (int) bufp->n_desc,
! 			       (CORE_ADDR) bufp->n_value, bufp->n_strx, pst->section_offsets, objfile);
  
        /* We skip checking for a new .o or -l file; that should never
           happen in this routine. */
***************
*** 1649,1654 ****
--- 1653,1659 ----
    os9k_new_init,		/* sym_new_init: init anything gbl to entire symtab */
    os9k_symfile_init,		/* sym_init: read initial info, setup for sym_read() */
    os9k_symfile_read,		/* sym_read: read a symbol file into symtab */
+   0,
    os9k_symfile_finish,		/* sym_finish: finished with file, cleanup */
    default_symfile_offsets,	/* sym_offsets: parse user's offsets to internal form */
    NULL				/* next: pointer to next struct sym_fns */
Index: gdb/xcoffread.c
/opt/gnu/bin/diff -r -c -N  /view/guo.wdb.c//CLO/Components/WDB/Src/gnu/gdb/xcoffread.c gdb/xcoffread.c
*** /view/guo.wdb.c//CLO/Components/WDB/Src/gnu/gdb/xcoffread.c	Mon Nov  1 19:50:16 1999
--- gdb/xcoffread.c	Mon Nov  1 20:17:51 1999
***************
*** 196,202 ****
  {"Mismatched .eb symbol ignored starting at symnum %d", 0, 0};
  
  static void
! xcoff_initial_scan PARAMS ((struct objfile *, int));
  
  static void
  scan_xcoff_symtab PARAMS ((struct objfile *));
--- 196,202 ----
  {"Mismatched .eb symbol ignored starting at symnum %d", 0, 0};
  
  static void
! xcoff_initial_scan PARAMS ((struct objfile *, int, int));
  
  static void
  scan_xcoff_symtab PARAMS ((struct objfile *));
***************
*** 215,221 ****
  init_stringtab PARAMS ((bfd *, file_ptr, struct objfile *));
  
  static void
! xcoff_symfile_init PARAMS ((struct objfile *));
  
  static void
  xcoff_new_init PARAMS ((struct objfile *));
--- 215,221 ----
  init_stringtab PARAMS ((bfd *, file_ptr, struct objfile *));
  
  static void
! xcoff_symfile_init PARAMS ((struct objfile *, int));
  
  static void
  xcoff_new_init PARAMS ((struct objfile *));
***************
*** 224,230 ****
  xcoff_symfile_finish PARAMS ((struct objfile *));
  
  static void
!   xcoff_symfile_offsets PARAMS ((struct objfile *, struct section_addr_info *addrs));
  
  static void
  find_linenos PARAMS ((bfd *, sec_ptr, PTR));
--- 224,230 ----
  xcoff_symfile_finish PARAMS ((struct objfile *));
  
  static void
! xcoff_symfile_offsets PARAMS ((struct objfile *, struct section_addr_info * addrs));
  
  static void
  find_linenos PARAMS ((bfd *, sec_ptr, PTR));
***************
*** 1902,1909 ****
     uses BFD's determination to vector to us.  */
  
  static void
! xcoff_symfile_init (objfile)
       struct objfile *objfile;
  {
    /* Allocate struct to keep track of the symfile */
    objfile->sym_private = xmmalloc (objfile->md,
--- 1902,1910 ----
     uses BFD's determination to vector to us.  */
  
  static void
! xcoff_symfile_init (objfile, threshold_exceeded)
       struct objfile *objfile;
+      int threshold_exceeded;
  {
    /* Allocate struct to keep track of the symfile */
    objfile->sym_private = xmmalloc (objfile->md,
***************
*** 2019,2025 ****
    struct partial_symtab *result =
    start_psymtab_common (objfile, objfile->section_offsets,
  			filename,
! 			/* We fill in textlow later.  */
  			0,
  			global_syms, static_syms);
  
--- 2020,2026 ----
    struct partial_symtab *result =
    start_psymtab_common (objfile, objfile->section_offsets,
  			filename,
!   /* We fill in textlow later.  */
  			0,
  			global_syms, static_syms);
  
***************
*** 2652,2660 ****
     table (as opposed to a shared lib or dynamically loaded file).  */
  
  static void
! xcoff_initial_scan (objfile, mainline)
       struct objfile *objfile;
       int mainline;		/* FIXME comments above */
  {
    bfd *abfd;
    int val;
--- 2653,2662 ----
     table (as opposed to a shared lib or dynamically loaded file).  */
  
  static void
! xcoff_initial_scan (objfile, mainline, threshold_exceeded)
       struct objfile *objfile;
       int mainline;		/* FIXME comments above */
+      int threshold_exceeded;
  {
    bfd *abfd;
    int val;
***************
*** 2801,2806 ****
--- 2803,2809 ----
    xcoff_new_init,		/* sym_new_init: init anything gbl to entire symtab */
    xcoff_symfile_init,		/* sym_init: read initial info, setup for sym_read() */
    xcoff_initial_scan,		/* sym_read: read a symbol file into symtab */
+   0,
    xcoff_symfile_finish,		/* sym_finish: finished with file, cleanup */
    xcoff_symfile_offsets,	/* sym_offsets: xlate offsets ext->int form */
    NULL				/* next: pointer to next struct sym_fns */


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]