Blob Blame History Raw
diff -Naurp insight-7.8.50.20140825.orig/gdb/doc/gdb.texinfo insight-7.8.50.20140825.new/gdb/doc/gdb.texinfo
--- insight-7.8.50.20140825.orig/gdb/doc/gdb.texinfo	2014-08-25 17:50:11.457373602 +0200
+++ insight-7.8.50.20140825.new/gdb/doc/gdb.texinfo	2014-08-25 17:50:49.403705976 +0200
@@ -1032,6 +1032,12 @@ Read each symbol file's entire symbol ta
 the default, which is to read it incrementally as it is needed.
 This makes startup slower, but makes future operations faster.
 
+@item --readnever
+@cindex @code{--readnever}
+Do not read each symbol file's symbolic debug information.  This makes
+startup faster but at the expense of not being able to perform
+symbolic debugging.
+
 @end table
 
 @node Mode Options
diff -Naurp insight-7.8.50.20140825.orig/gdb/dwarf2read.c insight-7.8.50.20140825.new/gdb/dwarf2read.c
--- insight-7.8.50.20140825.orig/gdb/dwarf2read.c	2014-08-25 17:50:11.498373988 +0200
+++ insight-7.8.50.20140825.new/gdb/dwarf2read.c	2014-08-25 17:50:49.426706165 +0200
@@ -70,6 +70,7 @@
 #include "source.h"
 #include "filestuff.h"
 #include "build-id.h"
+#include "top.h"
 
 #include <fcntl.h>
 #include <sys/types.h>
@@ -1996,7 +1997,8 @@ dwarf2_has_info (struct objfile *objfile
                              (void *) names);
       dwarf2_per_objfile->objfile = objfile;
     }
-  return (!dwarf2_per_objfile->info.is_virtual
+  return !readnever_symbol_files &&
+	 (!dwarf2_per_objfile->info.is_virtual
 	  && dwarf2_per_objfile->info.s.asection != NULL
 	  && !dwarf2_per_objfile->abbrev.is_virtual
 	  && dwarf2_per_objfile->abbrev.s.asection != NULL);
diff -Naurp insight-7.8.50.20140825.orig/gdb/main.c insight-7.8.50.20140825.new/gdb/main.c
--- insight-7.8.50.20140825.orig/gdb/main.c	2014-08-25 17:50:11.466373686 +0200
+++ insight-7.8.50.20140825.new/gdb/main.c	2014-08-25 17:50:49.407706009 +0200
@@ -585,6 +585,7 @@ captured_main (void *data)
       {"xdb", no_argument, &xdb_commands, 1},
       {"dbx", no_argument, &dbx_commands, 1},
       {"readnow", no_argument, &readnow_symbol_files, 1},
+      {"readnever", no_argument, &readnever_symbol_files, 1},
       {"r", no_argument, &readnow_symbol_files, 1},
       {"quiet", no_argument, &quiet, 1},
       {"q", no_argument, &quiet, 1},
@@ -1274,6 +1275,7 @@ Selection of debuggee and its files:\n\n
   --se=FILE          Use FILE as symbol file and executable file.\n\
   --symbols=SYMFILE  Read symbols from SYMFILE.\n\
   --readnow          Fully read symbol files on first access.\n\
+  --readnever        Do not read symbol files.\n\
   --write            Set writing into executable and core files.\n\n\
 "), stream);
   fputs_unfiltered (_("\
diff -Naurp insight-7.8.50.20140825.orig/gdb/symfile.c insight-7.8.50.20140825.new/gdb/symfile.c
--- insight-7.8.50.20140825.orig/gdb/symfile.c	2014-08-25 14:46:22.000000000 +0200
+++ insight-7.8.50.20140825.new/gdb/symfile.c	2014-08-25 17:50:49.412706050 +0200
@@ -80,6 +80,7 @@ static void clear_symtab_users_cleanup (
 
 /* Global variables owned by this file.  */
 int readnow_symbol_files;	/* Read full symbols immediately.  */
+int readnever_symbol_files;	/* Never read full symbols.  */
 
 /* Functions this file defines.  */
 
diff -Naurp insight-7.8.50.20140825.orig/gdb/top.h insight-7.8.50.20140825.new/gdb/top.h
--- insight-7.8.50.20140825.orig/gdb/top.h	2014-06-25 18:56:14.000000000 +0200
+++ insight-7.8.50.20140825.new/gdb/top.h	2014-08-25 17:50:49.429706190 +0200
@@ -59,6 +59,7 @@ extern void set_prompt (const char *s);
 
 /* From random places.  */
 extern int readnow_symbol_files;
+extern int readnever_symbol_files;
 
 /* Perform _initialize initialization.  */
 extern void gdb_init (char *);