Blob Blame History Raw
diff -Naurp insight-7.12.50.20170416.orig/gdb/doc/gdb.texinfo insight-7.12.50.20170416.new/gdb/doc/gdb.texinfo
--- insight-7.12.50.20170416.orig/gdb/doc/gdb.texinfo	2017-04-16 11:51:34.697009514 +0100
+++ insight-7.12.50.20170416.new/gdb/doc/gdb.texinfo	2017-04-16 11:56:31.611716645 +0100
@@ -1037,6 +1037,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.12.50.20170416.orig/gdb/dwarf2read.c insight-7.12.50.20170416.new/gdb/dwarf2read.c
--- insight-7.12.50.20170416.orig/gdb/dwarf2read.c	2017-04-15 01:21:12.000000000 +0100
+++ insight-7.12.50.20170416.new/gdb/dwarf2read.c	2017-04-16 11:58:01.869539574 +0100
@@ -73,6 +73,7 @@
 #include "common/function-view.h"
 #include "common/gdb_optional.h"
 #include "common/underlying.h"
+#include "top.h"
 
 #include <fcntl.h>
 #include <sys/types.h>
@@ -2207,7 +2208,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.section != NULL
 	  && !dwarf2_per_objfile->abbrev.is_virtual
 	  && dwarf2_per_objfile->abbrev.s.section != NULL);
diff -Naurp insight-7.12.50.20170416.orig/gdb/main.c insight-7.12.50.20170416.new/gdb/main.c
--- insight-7.12.50.20170416.orig/gdb/main.c	2017-04-09 01:11:01.000000000 +0100
+++ insight-7.12.50.20170416.new/gdb/main.c	2017-04-16 11:56:31.612716654 +0100
@@ -614,6 +614,7 @@ captured_main_1 (struct captured_main_ar
       {"tui", no_argument, 0, OPT_TUI},
       {"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},
@@ -1202,6 +1203,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.12.50.20170416.orig/gdb/symfile.c insight-7.12.50.20170416.new/gdb/symfile.c
--- insight-7.12.50.20170416.orig/gdb/symfile.c	2017-04-15 01:21:12.000000000 +0100
+++ insight-7.12.50.20170416.new/gdb/symfile.c	2017-04-16 11:56:31.614716672 +0100
@@ -79,6 +79,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.12.50.20170416.orig/gdb/top.h insight-7.12.50.20170416.new/gdb/top.h
--- insight-7.12.50.20170416.orig/gdb/top.h	2017-04-09 01:11:01.000000000 +0100
+++ insight-7.12.50.20170416.new/gdb/top.h	2017-04-16 11:56:31.622716745 +0100
@@ -269,6 +269,7 @@ extern int gdb_in_secondary_prompt_p (st
 
 /* From random places.  */
 extern int readnow_symbol_files;
+extern int readnever_symbol_files;
 
 /* Perform _initialize initialization.  */
 extern void gdb_init (char *);