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

f9426a
2004-11-18  Andrew Cagney  <cagney@gnu.org>
f9426a
f9426a
        * dwarf2read.c: Include "top.c".
f9426a
        (dwarf2_has_info): Check for readnever_symbol_files.
f9426a
        * symfile.c (readnever_symbol_files): Define.
f9426a
        * top.h (readnever_symbol_files): Declare.
f9426a
        * main.c (captured_main): Add --readnever option.
f9426a
        (print_gdb_help): Ditto.
f9426a
f9426a
2004-11-18  Andrew Cagney  <cagney@gnu.org>
f9426a
f9426a
        * gdb.texinfo (File Options): Document --readnever.
f9426a
f9426a
Index: gdb-7.6.90.20140127/gdb/doc/gdb.texinfo
f9426a
===================================================================
f9426a
--- gdb-7.6.90.20140127.orig/gdb/doc/gdb.texinfo	2014-01-27 22:42:53.150573603 +0100
f9426a
+++ gdb-7.6.90.20140127/gdb/doc/gdb.texinfo	2014-01-27 22:42:56.694576319 +0100
f9426a
@@ -1031,6 +1031,12 @@ Read each symbol file's entire symbol ta
f9426a
 the default, which is to read it incrementally as it is needed.
f9426a
 This makes startup slower, but makes future operations faster.
f9426a
 
f9426a
+@item --readnever
f9426a
+@cindex @code{--readnever}
f9426a
+Do not read each symbol file's symbolic debug information.  This makes
f9426a
+startup faster but at the expense of not being able to perform
f9426a
+symbolic debugging.
f9426a
+
f9426a
 @end table
f9426a
 
f9426a
 @node Mode Options
f9426a
Index: gdb-7.6.90.20140127/gdb/main.c
f9426a
===================================================================
f9426a
--- gdb-7.6.90.20140127.orig/gdb/main.c	2014-01-27 22:42:53.153573606 +0100
f9426a
+++ gdb-7.6.90.20140127/gdb/main.c	2014-01-27 22:42:56.695576319 +0100
f9426a
@@ -473,6 +473,7 @@ captured_main (void *data)
f9426a
       {"xdb", no_argument, &xdb_commands, 1},
f9426a
       {"dbx", no_argument, &dbx_commands, 1},
f9426a
       {"readnow", no_argument, &readnow_symbol_files, 1},
f9426a
+      {"readnever", no_argument, &readnever_symbol_files, 1},
f9426a
       {"r", no_argument, &readnow_symbol_files, 1},
f9426a
       {"quiet", no_argument, &quiet, 1},
f9426a
       {"q", no_argument, &quiet, 1},
f9426a
@@ -1164,6 +1165,7 @@ Selection of debuggee and its files:\n\n
f9426a
   --se=FILE          Use FILE as symbol file and executable file.\n\
f9426a
   --symbols=SYMFILE  Read symbols from SYMFILE.\n\
f9426a
   --readnow          Fully read symbol files on first access.\n\
f9426a
+  --readnever        Do not read symbol files.\n\
f9426a
   --write            Set writing into executable and core files.\n\n\
f9426a
 "), stream);
f9426a
   fputs_unfiltered (_("\
f9426a
Index: gdb-7.6.90.20140127/gdb/symfile.c
f9426a
===================================================================
f9426a
--- gdb-7.6.90.20140127.orig/gdb/symfile.c	2014-01-27 22:42:53.154573607 +0100
f9426a
+++ gdb-7.6.90.20140127/gdb/symfile.c	2014-01-27 22:42:56.696576320 +0100
f9426a
@@ -82,6 +82,7 @@ static void clear_symtab_users_cleanup (
f9426a
 
f9426a
 /* Global variables owned by this file.  */
f9426a
 int readnow_symbol_files;	/* Read full symbols immediately.  */
f9426a
+int readnever_symbol_files;	/* Never read full symbols.  */
f9426a
 
f9426a
 /* Functions this file defines.  */
f9426a
 
f9426a
Index: gdb-7.6.90.20140127/gdb/dwarf2read.c
f9426a
===================================================================
f9426a
--- gdb-7.6.90.20140127.orig/gdb/dwarf2read.c	2014-01-27 22:42:56.700576323 +0100
f9426a
+++ gdb-7.6.90.20140127/gdb/dwarf2read.c	2014-01-27 22:44:21.915641560 +0100
f9426a
@@ -70,6 +70,7 @@
f9426a
 #include "source.h"
f9426a
 #include "filestuff.h"
f9426a
 #include "build-id.h"
f9426a
+#include "top.h"
f9426a
 
f9426a
 #include <fcntl.h>
f9426a
 #include <string.h>
f9426a
@@ -1975,7 +1976,8 @@ dwarf2_has_info (struct objfile *objfile
f9426a
                              (void *) names);
f9426a
       dwarf2_per_objfile->objfile = objfile;
f9426a
     }
f9426a
-  return (!dwarf2_per_objfile->info.is_virtual
f9426a
+  return !readnever_symbol_files &&
f9426a
+	 (!dwarf2_per_objfile->info.is_virtual
f9426a
 	  && dwarf2_per_objfile->info.s.asection != NULL
f9426a
 	  && !dwarf2_per_objfile->abbrev.is_virtual
f9426a
 	  && dwarf2_per_objfile->abbrev.s.asection != NULL);
f9426a
Index: gdb-7.6.90.20140127/gdb/top.h
f9426a
===================================================================
f9426a
--- gdb-7.6.90.20140127.orig/gdb/top.h	2014-01-27 22:42:53.159573610 +0100
f9426a
+++ gdb-7.6.90.20140127/gdb/top.h	2014-01-27 22:42:56.701576324 +0100
f9426a
@@ -59,6 +59,7 @@ extern void set_prompt (const char *s);
f9426a
 
f9426a
 /* From random places.  */
f9426a
 extern int readnow_symbol_files;
f9426a
+extern int readnever_symbol_files;
f9426a
 
f9426a
 /* Perform _initialize initialization.  */
f9426a
 extern void gdb_init (char *);