gdb/readnever.patch

60 lines
1.9 KiB
Diff
Raw Normal View History

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.
================================================================================
--- gdb/dwarf2read.c
+++ gdb/dwarf2read.c
@@ -46,6 +46,7 @@
#include "command.h"
#include "gdbcmd.h"
#include "addrmap.h"
+#include "top.h"
#include <fcntl.h>
#include "gdb_string.h"
@@ -1094,7 +1095,8 @@ dwarf2_has_info (struct objfile *objfile
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);
}
/* When loading sections, we can either look for ".<name>", or for
--- gdb/main.c
+++ gdb/main.c
@@ -295,6 +295,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},
--- gdb/symfile.c
+++ gdb/symfile.c
@@ -76,6 +76,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. */
/* External variables and functions referenced. */
--- gdb/top.h
+++ gdb/top.h
@@ -59,6 +59,7 @@ extern void set_prompt (char *);
/* From random places. */
extern int readnow_symbol_files;
+extern int readnever_symbol_files;
/* Perform _initialize initialization */
extern void gdb_init (char *);