658b489
2004-11-18  Andrew Cagney  <cagney@gnu.org>
658b489
658b489
        * dwarf2read.c: Include "top.c".
658b489
        (dwarf2_has_info): Check for readnever_symbol_files.
658b489
        * symfile.c (readnever_symbol_files): Define.
658b489
        * top.h (readnever_symbol_files): Declare.
658b489
        * main.c (captured_main): Add --readnever option.
658b489
        (print_gdb_help): Ditto.
658b489
658b489
2004-11-18  Andrew Cagney  <cagney@gnu.org>
658b489
658b489
        * gdb.texinfo (File Options): Document --readnever.
658b489
658b489
--- gdb-6.3/gdb/doc/gdb.texinfo.fix	2005-09-07 13:32:23.000000000 -0400
658b489
+++ gdb-6.3/gdb/doc/gdb.texinfo	2005-09-07 13:33:21.000000000 -0400
658b489
@@ -952,6 +952,12 @@ Read each symbol file's entire symbol ta
658b489
 the default, which is to read it incrementally as it is needed.
658b489
 This makes startup slower, but makes future operations faster.
658b489
 
658b489
+@item --readnever
658b489
+@cindex @code{--readnever}
658b489
+Do not read each symbol file's symbolic debug information.  This makes
658b489
+startup faster but at the expense of not being able to perform
658b489
+symbolic debugging.
658b489
+
658b489
 @end table
658b489
 
658b489
 You typically combine the @code{-mapped} and @code{-readnow} options in
658b489
--- gdb-6.3/gdb/main.c.fix	2005-09-07 13:31:43.000000000 -0400
658b489
+++ gdb-6.3/gdb/main.c	2005-09-07 13:33:21.000000000 -0400
658b489
@@ -250,6 +250,7 @@ captured_main (void *data)
658b489
       {"xdb", no_argument, &xdb_commands, 1},
658b489
       {"dbx", no_argument, &dbx_commands, 1},
658b489
       {"readnow", no_argument, &readnow_symbol_files, 1},
658b489
+      {"readnever", no_argument, &readnever_symbol_files, 1},
658b489
       {"r", no_argument, &readnow_symbol_files, 1},
658b489
       {"quiet", no_argument, &quiet, 1},
658b489
       {"q", no_argument, &quiet, 1},
658b489
@@ -861,6 +862,7 @@ Options:\n\n\
658b489
   fputs_unfiltered (_(" file.\n\
658b489
   --quiet            Do not print version number on startup.\n\
658b489
   --readnow          Fully read symbol files on first access.\n\
658b489
+  --readnever        Do not read symbol files.\n\
658b489
 "), stream);
658b489
   fputs_unfiltered (_("\
658b489
   --se=FILE          Use FILE as symbol file and executable file.\n\
658b489
--- gdb-6.3/gdb/symfile.c.fix	2005-09-07 13:31:48.000000000 -0400
658b489
+++ gdb-6.3/gdb/symfile.c	2005-09-07 13:33:21.000000000 -0400
658b489
@@ -75,6 +75,7 @@ static void clear_symtab_users_cleanup (
658b489
 
658b489
 /* Global variables owned by this file */
658b489
 int readnow_symbol_files;	/* Read full symbols immediately */
658b489
+int readnever_symbol_files;	/* Never read full symbols.  */
658b489
 
658b489
 /* External variables and functions referenced. */
658b489
 
658b489
--- gdb-6.3/gdb/dwarf2read.c.fix	2005-09-07 13:31:58.000000000 -0400
658b489
+++ gdb-6.3/gdb/dwarf2read.c	2005-09-07 13:34:03.000000000 -0400
658b489
@@ -45,6 +45,7 @@
658b489
 #include "dwarf2loc.h"
658b489
 #include "cp-support.h"
658b489
 #include "hashtab.h"
658b489
+#include "top.h"
658b489
 #include "command.h"
658b489
 #include "gdbcmd.h"
658b489
 
658b489
@@ -1100,7 +1101,8 @@ dwarf2_has_info (struct objfile *objfile
658b489
   dwarf_loc_section = 0;
658b489
   
658b489
   bfd_map_over_sections (objfile->obfd, dwarf2_locate_sections, NULL);
658b489
-  return (dwarf_info_section != NULL && dwarf_abbrev_section != NULL);
658b489
+  return (!readnever_symbol_files
658b489
+	  && dwarf_info_section != NULL && dwarf_abbrev_section != NULL);
658b489
 }
658b489
 
658b489
 /* This function is mapped across the sections and remembers the
658b489
--- gdb-6.3/gdb/top.h.fix	2005-09-07 13:32:08.000000000 -0400
658b489
+++ gdb-6.3/gdb/top.h	2005-09-07 13:33:21.000000000 -0400
658b489
@@ -57,6 +57,7 @@ extern void set_prompt (char *);
658b489
 
658b489
 /* From random places.  */
658b489
 extern int readnow_symbol_files;
658b489
+extern int readnever_symbol_files;
658b489
 
658b489
 /* Perform _initialize initialization */
658b489
 extern void gdb_init (char *);