aboutsummaryrefslogtreecommitdiff
path: root/gdb/objfiles.h
diff options
context:
space:
mode:
authorFred Fish <fnf@specifix.com>1992-03-28 21:06:23 +0000
committerFred Fish <fnf@specifix.com>1992-03-28 21:06:23 +0000
commitbf349b77faf68ba37c0379bc6c59ea8ace20562a (patch)
tree39b8a808690e09e2785e9067b682d42575581dd1 /gdb/objfiles.h
parentc2e4669f8cc511833f293fdc03f6d63ee442bc9c (diff)
downloadfsf-binutils-gdb-bf349b77faf68ba37c0379bc6c59ea8ace20562a.zip
fsf-binutils-gdb-bf349b77faf68ba37c0379bc6c59ea8ace20562a.tar.gz
fsf-binutils-gdb-bf349b77faf68ba37c0379bc6c59ea8ace20562a.tar.bz2
Add OBJF_SYMS flag and use it to decide whether or not we have already
tried to read symbols from a file, for mapped objfiles. This fixes a memory leak (actually a constant memory growth) due to reading symbol files with no debug info and thus generating no psymtabs or symtabs. Most typically happened with shared libraries.
Diffstat (limited to 'gdb/objfiles.h')
-rw-r--r--gdb/objfiles.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/gdb/objfiles.h b/gdb/objfiles.h
index 8efaa93..3551c05 100644
--- a/gdb/objfiles.h
+++ b/gdb/objfiles.h
@@ -236,6 +236,15 @@ struct objfile
#define OBJF_MAPPED (1 << 0) /* Objfile data is mmap'd */
+/* When using mapped/remapped predigested gdb symbol information, we need
+ a flag that indicates that we have previously done an initial symbol
+ table read from this particular objfile. We can't just look for the
+ absence of any of the three symbol tables (msymbols, psymtab, symtab)
+ because if the file has no symbols for example, none of these will
+ exist. */
+
+#define OBJF_SYMS (1 << 1) /* Have tried to read symbols */
+
/* The object file that the main symbol table was loaded from (e.g. the
argument to the "symbol-file" or "file" command). */