01917d
2004-11-18  Andrew Cagney  <cagney@gnu.org>
01917d
01917d
        * dwarf2read.c: Include "top.c".
01917d
        (dwarf2_has_info): Check for readnever_symbol_files.
01917d
        * symfile.c (readnever_symbol_files): Define.
01917d
        * top.h (readnever_symbol_files): Declare.
01917d
        * main.c (captured_main): Add --readnever option.
01917d
        (print_gdb_help): Ditto.
01917d
01917d
2004-11-18  Andrew Cagney  <cagney@gnu.org>
01917d
01917d
        * gdb.texinfo (File Options): Document --readnever.
01917d
01917d
Index: gdb-7.5.50.20130215/gdb/doc/gdb.texinfo
01917d
===================================================================
01917d
--- gdb-7.5.50.20130215.orig/gdb/doc/gdb.texinfo	2013-02-15 22:31:37.000000000 +0100
01917d
+++ gdb-7.5.50.20130215/gdb/doc/gdb.texinfo	2013-02-15 22:34:22.381165443 +0100
01917d
@@ -1026,6 +1026,12 @@ Read each symbol file's entire symbol ta
01917d
 the default, which is to read it incrementally as it is needed.
01917d
 This makes startup slower, but makes future operations faster.
01917d
 
01917d
+@item --readnever
01917d
+@cindex @code{--readnever}
01917d
+Do not read each symbol file's symbolic debug information.  This makes
01917d
+startup faster but at the expense of not being able to perform
01917d
+symbolic debugging.
01917d
+
01917d
 @end table
01917d
 
01917d
 @node Mode Options
01917d
Index: gdb-7.5.50.20130215/gdb/main.c
01917d
===================================================================
01917d
--- gdb-7.5.50.20130215.orig/gdb/main.c	2013-02-15 22:31:37.000000000 +0100
01917d
+++ gdb-7.5.50.20130215/gdb/main.c	2013-02-15 22:34:22.382165445 +0100
01917d
@@ -447,6 +447,7 @@ captured_main (void *data)
01917d
       {"xdb", no_argument, &xdb_commands, 1},
01917d
       {"dbx", no_argument, &dbx_commands, 1},
01917d
       {"readnow", no_argument, &readnow_symbol_files, 1},
01917d
+      {"readnever", no_argument, &readnever_symbol_files, 1},
01917d
       {"r", no_argument, &readnow_symbol_files, 1},
01917d
       {"quiet", no_argument, &quiet, 1},
01917d
       {"q", no_argument, &quiet, 1},
01917d
@@ -1165,6 +1166,7 @@ Options:\n\n\
01917d
   fputs_unfiltered (_("\
01917d
   --quiet            Do not print version number on startup.\n\
01917d
   --readnow          Fully read symbol files on first access.\n\
01917d
+  --readnever        Do not read symbol files.\n\
01917d
 "), stream);
01917d
   fputs_unfiltered (_("\
01917d
   --se=FILE          Use FILE as symbol file and executable file.\n\
01917d
Index: gdb-7.5.50.20130215/gdb/symfile.c
01917d
===================================================================
01917d
--- gdb-7.5.50.20130215.orig/gdb/symfile.c	2013-02-01 20:39:03.000000000 +0100
01917d
+++ gdb-7.5.50.20130215/gdb/symfile.c	2013-02-15 22:34:22.383165447 +0100
01917d
@@ -81,6 +81,7 @@ static void clear_symtab_users_cleanup (
01917d
 
01917d
 /* Global variables owned by this file.  */
01917d
 int readnow_symbol_files;	/* Read full symbols immediately.  */
01917d
+int readnever_symbol_files;	/* Never read full symbols.  */
01917d
 
01917d
 /* Functions this file defines.  */
01917d
 
01917d
Index: gdb-7.5.50.20130215/gdb/dwarf2read.c
01917d
===================================================================
01917d
--- gdb-7.5.50.20130215.orig/gdb/dwarf2read.c	2013-02-15 22:31:37.000000000 +0100
01917d
+++ gdb-7.5.50.20130215/gdb/dwarf2read.c	2013-02-15 22:34:34.479181584 +0100
01917d
@@ -68,6 +68,7 @@
01917d
 #include "gdb_bfd.h"
01917d
 #include "f-lang.h"
01917d
 #include "source.h"
01917d
+#include "top.h"
01917d
 
01917d
 #include <fcntl.h>
01917d
 #include "gdb_string.h"
01917d
@@ -1793,8 +1794,9 @@ dwarf2_has_info (struct objfile *objfile
01917d
                              (void *) names);
01917d
       dwarf2_per_objfile->objfile = objfile;
01917d
     }
01917d
-  return (dwarf2_per_objfile->info.asection != NULL
01917d
-	  && dwarf2_per_objfile->abbrev.asection != NULL);
01917d
+  return (! readnever_symbol_files
01917d
+	  && (dwarf2_per_objfile->info.asection != NULL
01917d
+	      && dwarf2_per_objfile->abbrev.asection != NULL));
01917d
 }
01917d
 
01917d
 /* When loading sections, we look either for uncompressed section or for
01917d
Index: gdb-7.5.50.20130215/gdb/top.h
01917d
===================================================================
01917d
--- gdb-7.5.50.20130215.orig/gdb/top.h	2013-01-07 17:40:36.000000000 +0100
01917d
+++ gdb-7.5.50.20130215/gdb/top.h	2013-02-15 22:34:22.389165459 +0100
01917d
@@ -58,6 +58,7 @@ extern void set_prompt (const char *s);
01917d
 
01917d
 /* From random places.  */
01917d
 extern int readnow_symbol_files;
01917d
+extern int readnever_symbol_files;
01917d
 
01917d
 /* Perform _initialize initialization.  */
01917d
 extern void gdb_init (char *);