aboutsummaryrefslogtreecommitdiff
path: root/gdb/dbxread.c
diff options
context:
space:
mode:
authorTom Tromey <tromey@redhat.com>2011-06-27 19:21:51 +0000
committerTom Tromey <tromey@redhat.com>2011-06-27 19:21:51 +0000
commit5fe41fbfa22275d2a277b408bf52fedec34e8336 (patch)
tree9aed1be88020a4add3cfcbe7562642ad3236d91a /gdb/dbxread.c
parent57eb9b5086fe082ad965e75d199dd9d536e54250 (diff)
downloadgdb-5fe41fbfa22275d2a277b408bf52fedec34e8336.zip
gdb-5fe41fbfa22275d2a277b408bf52fedec34e8336.tar.gz
gdb-5fe41fbfa22275d2a277b408bf52fedec34e8336.tar.bz2
* valops.c (find_overload_match): Call do_cleanups before early
return. * top.c (execute_command): Call do_cleanups before early return. (command_loop): Likewise. * stack.c (backtrace_command): Make a null cleanup early. Don't conditionally call do_cleanups. * python/py-value.c (TRY_CATCH): Move cleanup handling into TRY_CATCH. * python/py-breakpoint.c (gdbpy_breakpoint_has_py_cond): Rearrange so cleanups are always run. * mi/mi-cmd-var.c (mi_cmd_var_delete): Reset old_cleanups. * findcmd.c (parse_find_args): Call do_cleanups on early return path. * dbxread.c (elfstab_build_psymtabs): Make a null cleanup early. Don't conditionally call do_cleanups. * cli/cli-script.c (execute_user_command): Initialize 'old_chain' later.
Diffstat (limited to 'gdb/dbxread.c')
-rw-r--r--gdb/dbxread.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/gdb/dbxread.c b/gdb/dbxread.c
index 0c5dc02..33c776f 100644
--- a/gdb/dbxread.c
+++ b/gdb/dbxread.c
@@ -3433,7 +3433,7 @@ elfstab_build_psymtabs (struct objfile *objfile, asection *stabsect,
bfd *sym_bfd = objfile->obfd;
char *name = bfd_get_filename (sym_bfd);
struct dbx_symfile_info *info;
- struct cleanup *back_to = NULL;
+ struct cleanup *back_to = make_cleanup (null_cleanup, NULL);
/* There is already a dbx_symfile_info allocated by our caller.
It might even contain some info from the ELF symtab to help us. */
@@ -3477,7 +3477,7 @@ elfstab_build_psymtabs (struct objfile *objfile, asection *stabsect,
symbuf_left = bfd_section_size (objfile->obfd, stabsect);
stabs_data = symfile_relocate_debug_section (objfile, stabsect, NULL);
if (stabs_data)
- back_to = make_cleanup (free_current_contents, (void *) &stabs_data);
+ make_cleanup (free_current_contents, (void *) &stabs_data);
/* In an elf file, we've already installed the minimal symbols that came
from the elf (non-stab) symbol table, so always act like an
@@ -3487,8 +3487,7 @@ elfstab_build_psymtabs (struct objfile *objfile, asection *stabsect,
case it does, it will install them itself. */
dbx_symfile_read (objfile, 0);
- if (back_to)
- do_cleanups (back_to);
+ do_cleanups (back_to);
}
/* Scan and build partial symbols for a file with special sections for stabs