From bf349b77faf68ba37c0379bc6c59ea8ace20562a Mon Sep 17 00:00:00 2001 From: Fred Fish Date: Sat, 28 Mar 1992 21:06:23 +0000 Subject: 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. --- gdb/objfiles.h | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'gdb/objfiles.h') 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). */ -- cgit v1.1