aboutsummaryrefslogtreecommitdiff
path: root/gdb/arm-tdep.c
diff options
context:
space:
mode:
authorTom Tromey <tromey@redhat.com>2011-06-30 18:48:19 +0000
committerTom Tromey <tromey@redhat.com>2011-06-30 18:48:19 +0000
commit3bb47e8bce4c147142b298c5c23368ba189105bc (patch)
tree3c690a64aeedd9d72f9cedc4a687491d80ba2f40 /gdb/arm-tdep.c
parent4727bad393ed5ccd73480968cbf3c4f5003542bc (diff)
downloadgdb-3bb47e8bce4c147142b298c5c23368ba189105bc.zip
gdb-3bb47e8bce4c147142b298c5c23368ba189105bc.tar.gz
gdb-3bb47e8bce4c147142b298c5c23368ba189105bc.tar.bz2
* symfile-mem.c (symbol_file_add_from_memory): Call do_cleanups.
* solib-svr4.c (open_symbol_file_object): Call do_cleanups on all return paths. Defer final do_cleanups until last return. * arm-tdep.c (arm_exidx_new_objfile): Make null cleanup after early return.
Diffstat (limited to 'gdb/arm-tdep.c')
-rw-r--r--gdb/arm-tdep.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/gdb/arm-tdep.c b/gdb/arm-tdep.c
index 433ce21..1a75af1 100644
--- a/gdb/arm-tdep.c
+++ b/gdb/arm-tdep.c
@@ -2211,7 +2211,7 @@ arm_obj_section_from_vma (struct objfile *objfile, bfd_vma vma)
static void
arm_exidx_new_objfile (struct objfile *objfile)
{
- struct cleanup *cleanups = make_cleanup (null_cleanup, NULL);
+ struct cleanup *cleanups;
struct arm_exidx_data *data;
asection *exidx, *extab;
bfd_vma exidx_vma = 0, extab_vma = 0;
@@ -2222,6 +2222,7 @@ arm_exidx_new_objfile (struct objfile *objfile)
/* If we've already touched this file, do nothing. */
if (!objfile || objfile_data (objfile, arm_exidx_data_key) != NULL)
return;
+ cleanups = make_cleanup (null_cleanup, NULL);
/* Read contents of exception table and index. */
exidx = bfd_get_section_by_name (objfile->obfd, ".ARM.exidx");