diff options
author | Jason Molenda <jmolenda@apple.com> | 1998-10-14 01:15:00 +0000 |
---|---|---|
committer | Jason Molenda <jmolenda@apple.com> | 1998-10-14 01:15:00 +0000 |
commit | ad3b8c4a1a37dc966ddbcc687dcf78ec1f80022f (patch) | |
tree | 74fceadbf33b9e1a46c14a699ee7271f2f9963ac /gdb/dwarf2read.c | |
parent | 9a3d6f4eefb862c4302973e6b5bde4820cb70580 (diff) | |
download | gdb-ad3b8c4a1a37dc966ddbcc687dcf78ec1f80022f.zip gdb-ad3b8c4a1a37dc966ddbcc687dcf78ec1f80022f.tar.gz gdb-ad3b8c4a1a37dc966ddbcc687dcf78ec1f80022f.tar.bz2 |
1998-10-13 Jason Molenda (jsm@bugshack.cygnus.com)
* blockframe.c (find_pc_sect_partial_function): Add braces to avoid
possible nested-if confusion.
* breakpoint.c (breakpoint_here_p): Ditto.
(breakpoint_inserted_here_p): Ditto.
(breakpoint_thread_match): Ditto.
* gnu-regex.c: Define _REGEX_RE_COMP only if it isn't already defined.
* gnu-regex.h: Define _REGEX_RE_COMP to pick up old compatability
prototypes.
* symtab.h: Add prototype for _initialize_source.
* value.h: Add prototype for _initialize_value.
* defs.h: Include sys/types.h or stddef.h to get size_t.
(make_cleanup): Add make_cleanup_func typedef and switch to using
a prototype for this function.
(mfree): Add prototypes for mmalloc, mrealloc, mfree if we aren't
using mmalloc.
* ax-gdb.c breakpoint.c coffread.c corelow.c dbxread.c dwarf2read.c
dwarfread.c elfread.c eval.c exec.c gdbtk-cmds.c gdbtk.c infcmd.c
infrun.c mipsread.c nlmread.c os9kread.c parse.c printcmd.c symfile.c
symmisc.c symtab.c thread.c top.c tracepoint.c typeprint.c valops.c:
Cast parameters passed to make_cleanup to use the new
make_cleanup_func typedef.
More warning cleanups. There are still a bunch of places where the first
argument to make_cleanup is not cast to (make_cleanup_func); these are
either due to the function fitting the make_cleanup_func specification
already (e.g. free()) or they are in files that weren't compiled when
I did my make on a Linux native system. Bwahahaha. You can see them
like this:
grep make_cleanup\ * | grep -v make_cleanup_func
I'll surely go back and clean up the remaining suspicious calls in
GDB one of these days. :-)
Diffstat (limited to 'gdb/dwarf2read.c')
-rw-r--r-- | gdb/dwarf2read.c | 21 |
1 files changed, 13 insertions, 8 deletions
diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c index dffc621a..ea0af40 100644 --- a/gdb/dwarf2read.c +++ b/gdb/dwarf2read.c @@ -1304,7 +1304,7 @@ psymtab_to_symtab_1 (pst) back_to = make_cleanup (dwarf2_free_tmp_obstack, NULL); buildsym_init (); - make_cleanup (really_free_pendings, NULL); + make_cleanup ((make_cleanup_func) really_free_pendings, NULL); /* read in the comp_unit header */ cu_header.length = read_4_bytes (abfd, info_ptr); @@ -1322,7 +1322,7 @@ psymtab_to_symtab_1 (pst) dies = read_comp_unit (info_ptr, abfd); - make_cleanup (free_die_list, dies); + make_cleanup ((make_cleanup_func) free_die_list, dies); /* Do line number decoding in read_file_scope () */ process_die (dies, objfile); @@ -2070,7 +2070,8 @@ dwarf2_add_member_fn (fip, die, type, objfile) (fip->nfnfields + DW_FIELD_ALLOC_CHUNK) * sizeof (struct fnfieldlist)); if (fip->nfnfields == 0) - make_cleanup (free_current_contents, &fip->fnfieldlists); + make_cleanup ((make_cleanup_func) free_current_contents, + &fip->fnfieldlists); } flp = &fip->fnfieldlists[fip->nfnfields]; flp->name = fieldname; @@ -2576,7 +2577,8 @@ read_array_type (die, objfile) xrealloc (range_types, (ndim + DW_FIELD_ALLOC_CHUNK) * sizeof (struct type *)); if (ndim == 0) - make_cleanup (free_current_contents, &range_types); + make_cleanup ((make_cleanup_func) free_current_contents, + &range_types); } range_types[ndim++] = create_range_type (NULL, index_type, low, high); } @@ -3828,7 +3830,8 @@ dwarf_decode_lines (offset, comp_dir, abfd) line_ptr += 1; lh.standard_opcode_lengths = (unsigned char *) xmalloc (lh.opcode_base * sizeof (unsigned char)); - back_to = make_cleanup (free_current_contents, &lh.standard_opcode_lengths); + back_to = make_cleanup ((make_cleanup_func) free_current_contents, + &lh.standard_opcode_lengths); lh.standard_opcode_lengths[0] = 1; for (i = 1; i < lh.opcode_base; ++i) @@ -3847,7 +3850,7 @@ dwarf_decode_lines (offset, comp_dir, abfd) xrealloc (dirs.dirs, (dirs.num_dirs + DIR_ALLOC_CHUNK) * sizeof (char *)); if (dirs.num_dirs == 0) - make_cleanup (free_current_contents, &dirs.dirs); + make_cleanup ((make_cleanup_func) free_current_contents, &dirs.dirs); } dirs.dirs[dirs.num_dirs++] = cur_dir; } @@ -3864,7 +3867,8 @@ dwarf_decode_lines (offset, comp_dir, abfd) (files.num_files + FILE_ALLOC_CHUNK) * sizeof (struct fileinfo)); if (files.num_files == 0) - make_cleanup (free_current_contents, &files.files); + make_cleanup ((make_cleanup_func) free_current_contents, + &files.files); } files.files[files.num_files].name = cur_file; files.files[files.num_files].dir = @@ -3934,7 +3938,8 @@ dwarf_decode_lines (offset, comp_dir, abfd) (files.num_files + FILE_ALLOC_CHUNK) * sizeof (struct fileinfo)); if (files.num_files == 0) - make_cleanup (free_current_contents, &files.files); + make_cleanup ((make_cleanup_func) free_current_contents, + &files.files); } files.files[files.num_files].name = cur_file; files.files[files.num_files].dir = |