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
6fcb74e
Index: gdb-6.8.50.20090302/gdb/doc/gdb.texinfo
8b1b3fd
===================================================================
6fcb74e
--- gdb-6.8.50.20090302.orig/gdb/doc/gdb.texinfo	2009-05-09 20:00:02.000000000 +0200
6fcb74e
+++ gdb-6.8.50.20090302/gdb/doc/gdb.texinfo	2009-05-09 20:00:06.000000000 +0200
1592379
@@ -988,6 +988,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
 
8b1b3fd
 @node Mode Options
6fcb74e
Index: gdb-6.8.50.20090302/gdb/main.c
8b1b3fd
===================================================================
6fcb74e
--- gdb-6.8.50.20090302.orig/gdb/main.c	2009-05-09 20:00:03.000000000 +0200
6fcb74e
+++ gdb-6.8.50.20090302/gdb/main.c	2009-05-09 20:00:06.000000000 +0200
1592379
@@ -427,6 +427,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},
1592379
@@ -1070,6 +1071,7 @@ Options:\n\n\
1592379
   fputs_unfiltered (_("\
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\
6fcb74e
Index: gdb-6.8.50.20090302/gdb/symfile.c
8b1b3fd
===================================================================
6fcb74e
--- gdb-6.8.50.20090302.orig/gdb/symfile.c	2009-05-09 20:00:03.000000000 +0200
6fcb74e
+++ gdb-6.8.50.20090302/gdb/symfile.c	2009-05-09 20:00:06.000000000 +0200
407ebe9
@@ -77,6 +77,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
 
6fcb74e
Index: gdb-6.8.50.20090302/gdb/dwarf2read.c
8b1b3fd
===================================================================
6fcb74e
--- gdb-6.8.50.20090302.orig/gdb/dwarf2read.c	2009-05-09 20:00:02.000000000 +0200
6fcb74e
+++ gdb-6.8.50.20090302/gdb/dwarf2read.c	2009-05-09 20:00:19.000000000 +0200
6fcb74e
@@ -50,6 +50,7 @@
36474ab
 #include "c-lang.h"
36474ab
 #include "typeprint.h"
6fcb74e
 #include "block.h"
407ebe9
+#include "top.h"
658b489
 
407ebe9
 #include <fcntl.h>
407ebe9
 #include "gdb_string.h"
6fcb74e
@@ -1187,7 +1188,8 @@ dwarf2_has_info (struct objfile *objfile
1592379
   dwarf_aranges_section = 0;
658b489
   
1592379
   bfd_map_over_sections (objfile->obfd, dwarf2_locate_sections, &update_sizes);
658b489
-  return (dwarf_info_section != NULL && dwarf_abbrev_section != NULL);
407ebe9
+  return !readnever_symbol_files
407ebe9
+	 && dwarf_info_section != NULL && dwarf_abbrev_section != NULL;
658b489
 }
658b489
 
407ebe9
 /* When loading sections, we can either look for ".<name>", or for
6fcb74e
Index: gdb-6.8.50.20090302/gdb/top.h
8b1b3fd
===================================================================
6fcb74e
--- gdb-6.8.50.20090302.orig/gdb/top.h	2009-01-03 06:57:53.000000000 +0100
6fcb74e
+++ gdb-6.8.50.20090302/gdb/top.h	2009-05-09 20:00:06.000000000 +0200
8b1b3fd
@@ -59,6 +59,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 *);