aboutsummaryrefslogtreecommitdiff
path: root/gdb/psympriv.h
diff options
context:
space:
mode:
authorTom Tromey <tom@tromey.com>2018-05-10 16:23:44 -0600
committerTom Tromey <tom@tromey.com>2019-01-10 07:08:10 -0700
commitbaa62830ed84d45b414ff677b7bce900a21923ce (patch)
treec6bcf23339cd0deca2a1e76d9e0682a0125fed7b /gdb/psympriv.h
parent0e8f53badb3df16f4104890395d9324a5bcf568d (diff)
downloadgdb-baa62830ed84d45b414ff677b7bce900a21923ce.zip
gdb-baa62830ed84d45b414ff677b7bce900a21923ce.tar.gz
gdb-baa62830ed84d45b414ff677b7bce900a21923ce.tar.bz2
Remove some unneeded psymtab initializations
allocate_psymtab has long cleared the new psymtab that is returned. This patch documents this behavior and then removes some redundant initializations. gdb/ChangeLog 2019-01-10 Tom Tromey <tom@tromey.com> * xcoffread.c (xcoff_end_psymtab): Remove some initializations. * psymtab.c (allocate_psymtab): Add comment. * psympriv.h (allocate_psymtab): Add comment. * dwarf2read.c (dwarf2_create_include_psymtab): Remove some initializations. * dbxread.c (dbx_end_psymtab): Remove some initializations.
Diffstat (limited to 'gdb/psympriv.h')
-rw-r--r--gdb/psympriv.h10
1 files changed, 8 insertions, 2 deletions
diff --git a/gdb/psympriv.h b/gdb/psympriv.h
index e28adfe..76893f2 100644
--- a/gdb/psympriv.h
+++ b/gdb/psympriv.h
@@ -290,8 +290,14 @@ extern struct partial_symtab *start_psymtab_common (struct objfile *,
extern void end_psymtab_common (struct objfile *, struct partial_symtab *);
-extern struct partial_symtab *allocate_psymtab (const char *,
- struct objfile *)
+/* Allocate a new partial symbol table associated with OBJFILE.
+ FILENAME (which must be non-NULL) is the filename of this partial
+ symbol table; it is copied into the appropriate storage. A new
+ partial symbol table is returned; aside from "next" and "filename",
+ its fields are initialized to zero. */
+
+extern struct partial_symtab *allocate_psymtab (const char *filename,
+ struct objfile *objfile)
ATTRIBUTE_NONNULL (1);
extern void discard_psymtab (struct objfile *, struct partial_symtab *);