keiths / rpms / gdb

Forked from rpms/gdb 5 days ago
Clone
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
79563d6
Index: gdb-7.0.50.20100121/gdb/doc/gdb.texinfo
8b1b3fd
===================================================================
79563d6
--- gdb-7.0.50.20100121.orig/gdb/doc/gdb.texinfo	2010-01-21 15:11:09.000000000 +0100
79563d6
+++ gdb-7.0.50.20100121/gdb/doc/gdb.texinfo	2010-01-21 15:13:02.000000000 +0100
79563d6
@@ -997,6 +997,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
79563d6
Index: gdb-7.0.50.20100121/gdb/main.c
8b1b3fd
===================================================================
79563d6
--- gdb-7.0.50.20100121.orig/gdb/main.c	2010-01-21 15:11:18.000000000 +0100
79563d6
+++ gdb-7.0.50.20100121/gdb/main.c	2010-01-21 15:13:02.000000000 +0100
e5611bf
@@ -382,6 +382,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},
79563d6
@@ -1033,6 +1034,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\
79563d6
Index: gdb-7.0.50.20100121/gdb/symfile.c
8b1b3fd
===================================================================
79563d6
--- gdb-7.0.50.20100121.orig/gdb/symfile.c	2010-01-21 15:11:09.000000000 +0100
79563d6
+++ gdb-7.0.50.20100121/gdb/symfile.c	2010-01-21 15:13:02.000000000 +0100
a97b573
@@ -79,6 +79,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
 
79563d6
Index: gdb-7.0.50.20100121/gdb/dwarf2read.c
8b1b3fd
===================================================================
79563d6
--- gdb-7.0.50.20100121.orig/gdb/dwarf2read.c	2010-01-21 15:11:09.000000000 +0100
79563d6
+++ gdb-7.0.50.20100121/gdb/dwarf2read.c	2010-01-21 15:13:15.000000000 +0100
79563d6
@@ -53,6 +53,7 @@
79563d6
 #include "typeprint.h"
79563d6
 #include "jv-lang.h"
79563d6
 #include "vec.h"
407ebe9
+#include "top.h"
658b489
 
407ebe9
 #include <fcntl.h>
407ebe9
 #include "gdb_string.h"
79563d6
@@ -1237,7 +1238,8 @@ dwarf2_has_info (struct objfile *objfile
e5611bf
 
e5611bf
       bfd_map_over_sections (objfile->obfd, dwarf2_locate_sections, NULL);
e5611bf
     }
e5611bf
-  return (dwarf2_per_objfile->info.asection != NULL
407ebe9
+  return !readnever_symbol_files
e5611bf
+      && (dwarf2_per_objfile->info.asection != NULL
e5611bf
 	  && dwarf2_per_objfile->abbrev.asection != NULL);
658b489
 }
658b489
 
79563d6
Index: gdb-7.0.50.20100121/gdb/top.h
8b1b3fd
===================================================================
79563d6
--- gdb-7.0.50.20100121.orig/gdb/top.h	2010-01-01 08:31:42.000000000 +0100
79563d6
+++ gdb-7.0.50.20100121/gdb/top.h	2010-01-21 15:13:02.000000000 +0100
8c4c91e
@@ -63,6 +63,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 *);