File readnever.patch of Package gdb

2004-11-18  Andrew Cagney  <cagney@gnu.org>

	* dwarf2read.c: Include "top.c".
	(dwarf2_has_info): Check for readnever_symbol_files.
	* symfile.c (readnever_symbol_files): Define.
	* top.h (readnever_symbol_files): Declare.
	* main.c (captured_main): Add --readnever option.

diff -ur ../gdb+dejagnu-20040607/gdb/dwarf2read.c ./gdb/dwarf2read.c
--- ../gdb+dejagnu-20040607/gdb/dwarf2read.c	2004-11-18 18:38:25.841030736 -0500
+++ ./gdb/dwarf2read.c	2004-11-18 13:39:45.516334184 -0500
@@ -45,6 +45,7 @@
 #include "hashtab.h"
 #include "command.h"
 #include "gdbcmd.h"
+#include "top.h"
 
 #include <fcntl.h>
 #include "gdb_string.h"
@@ -984,7 +985,8 @@
   dwarf_loc_section = 0;
   
   bfd_map_over_sections (objfile->obfd, dwarf2_locate_sections, NULL);
-  return (dwarf_info_section != NULL && dwarf_abbrev_section != NULL);
+  return (!readnever_symbol_files
+	  && dwarf_info_section != NULL && dwarf_abbrev_section != NULL);
 }
 
 /* This function is mapped across the sections and remembers the
diff -ur ../gdb+dejagnu-20040607/gdb/main.c ./gdb/main.c
--- ../gdb+dejagnu-20040607/gdb/main.c	2004-04-21 19:52:20.000000000 -0400
+++ ./gdb/main.c	2004-11-18 13:07:30.000000000 -0500
@@ -261,6 +261,7 @@
       {"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},
diff -ur ../gdb+dejagnu-20040607/gdb/symfile.c ./gdb/symfile.c
--- ../gdb+dejagnu-20040607/gdb/symfile.c	2004-11-18 18:38:25.352105064 -0500
+++ ./gdb/symfile.c	2004-11-18 13:19:05.000000000 -0500
@@ -87,6 +87,7 @@
 
 /* Global variables owned by this file */
 int readnow_symbol_files;	/* Read full symbols immediately */
+int readnever_symbol_files;	/* Never read full symbols.  */
 
 /* External variables and functions referenced. */
 
diff -ur ../gdb+dejagnu-20040607/gdb/top.h ./gdb/top.h
--- ../gdb+dejagnu-20040607/gdb/top.h	2004-01-19 14:56:02.000000000 -0500
+++ ./gdb/top.h	2004-11-18 13:08:11.000000000 -0500
@@ -57,6 +57,7 @@
 
 /* From random places.  */
 extern int readnow_symbol_files;
+extern int readnever_symbol_files;
 
 /* Perform _initialize initialization */
 extern void gdb_init (char *);
openSUSE Build Service is sponsored by