forked from Imagelibrary/binutils-gdb
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.
This commit is contained in:
@@ -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). */
|
||||
|
||||
|
||||
Reference in New Issue
Block a user