Blame SOURCES/gdb-6.3-readnever-20050907.patch

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