diff options
author | Fred Fish <fnf@specifix.com> | 1992-07-21 04:14:34 +0000 |
---|---|---|
committer | Fred Fish <fnf@specifix.com> | 1992-07-21 04:14:34 +0000 |
commit | c0f1085b5a94342421f2623a0c743b089195d734 (patch) | |
tree | 668e7fb091fad0a68d51104bc57b032c67ac5ad8 /gdb/objfiles.c | |
parent | 4a2d5d0ef6f3e2e34260663fc9e321821db6dd2f (diff) | |
download | gdb-c0f1085b5a94342421f2623a0c743b089195d734.zip gdb-c0f1085b5a94342421f2623a0c743b089195d734.tar.gz gdb-c0f1085b5a94342421f2623a0c743b089195d734.tar.bz2 |
* buildsym.c (read_struct_type): Initialize structs allocated
with alloca, to avoid using random values from stack later on.
* defs.h (fprintf_filtered): Add prototype.
* gdbtypes.c (check_stub_method): Fix misleading comments.
* gdbtypes.c (print_arg_types, dump_fn_fieldlists): New maint
support functions.
* gdbtypes.c (print_cplus_stuff, recursive_dump_type): Many
small changes to maint support functions.
* gdbtypes.h (cplus_struct_type): Reorganize member ordering
for some fields and expand comments.
* objfiles.c (allocate_objfile): Use new obstack_alloc_arg
macro and track change to obstack_full_begin macro.
* utils.c (fprintfi_filtered): New function.
* valprint.c (type_print_base): Fixup field printing to not
print extraneous lines and not print bogus "no data fields"
messages for C++ classes with no data members. Also use new
fprintfi_filtered function.
Diffstat (limited to 'gdb/objfiles.c')
-rw-r--r-- | gdb/objfiles.c | 28 |
1 files changed, 12 insertions, 16 deletions
diff --git a/gdb/objfiles.c b/gdb/objfiles.c index d2f6bbc..5e22be9 100644 --- a/gdb/objfiles.c +++ b/gdb/objfiles.c @@ -126,15 +126,15 @@ allocate_objfile (abfd, mapped) objfile -> mmfd = fd; objfile -> flags |= OBJF_MAPPED; mmalloc_setkey (objfile -> md, 0, objfile); - obstack_full_begin (&objfile -> psymbol_obstack, 0, 0, - xmmalloc, mfree, objfile -> md, - OBSTACK_MMALLOC_LIKE); - obstack_full_begin (&objfile -> symbol_obstack, 0, 0, - xmmalloc, mfree, objfile -> md, - OBSTACK_MMALLOC_LIKE); - obstack_full_begin (&objfile -> type_obstack, 0, 0, - xmmalloc, mfree, objfile -> md, - OBSTACK_MMALLOC_LIKE); + obstack_alloc_arg (&objfile -> psymbol_obstack, objfile -> md); + obstack_full_begin (&objfile -> psymbol_obstack, 0, 0, xmmalloc, + mfree); + obstack_alloc_arg (&objfile -> symbol_obstack, objfile -> md); + obstack_full_begin (&objfile -> symbol_obstack, 0, 0, xmmalloc, + mfree); + obstack_alloc_arg (&objfile -> type_obstack, objfile -> md); + obstack_full_begin (&objfile -> type_obstack, 0, 0, xmmalloc, + mfree); } } @@ -168,13 +168,9 @@ allocate_objfile (abfd, mapped) objfile = (struct objfile *) xmalloc (sizeof (struct objfile)); memset (objfile, 0, sizeof (struct objfile)); objfile -> md = NULL; - obstack_full_begin (&objfile -> psymbol_obstack, 0, 0, xmalloc, free, - (void *) 0, 0); - obstack_full_begin (&objfile -> symbol_obstack, 0, 0, xmalloc, free, - (void *) 0, 0); - obstack_full_begin (&objfile -> type_obstack, 0, 0, xmalloc, free, - (void *) 0, 0); - + obstack_full_begin (&objfile -> psymbol_obstack, 0, 0, xmalloc, free); + obstack_full_begin (&objfile -> symbol_obstack, 0, 0, xmalloc, free); + obstack_full_begin (&objfile -> type_obstack, 0, 0, xmalloc, free); } /* Update the per-objfile information that comes from the bfd, ensuring |