aboutsummaryrefslogtreecommitdiff
path: root/gdb/libunwind-frame.c
diff options
context:
space:
mode:
authorAndreas Schwab <schwab@linux-m68k.org>2007-06-12 15:21:27 +0000
committerAndreas Schwab <schwab@linux-m68k.org>2007-06-12 15:21:27 +0000
commit272dfcfd78cd900157ff2e4c8c8ed95645dae4f6 (patch)
tree13d19819273e00972d49fd4e14f1bf10157b82b2 /gdb/libunwind-frame.c
parent4339e69e64f47a31e706ba9c1e7c00945c1620ff (diff)
downloadgdb-272dfcfd78cd900157ff2e4c8c8ed95645dae4f6.zip
gdb-272dfcfd78cd900157ff2e4c8c8ed95645dae4f6.tar.gz
gdb-272dfcfd78cd900157ff2e4c8c8ed95645dae4f6.tar.bz2
* frame-unwind.h (frame_dealloc_cache_ftype): Define.
(struct frame_unwind): Add dealloc_cache. * frame.c (reinit_frame_cache): Call dealloc_cache on all caches. * libunwind-frame.h (libunwind_frame_dealloc_cache): Declare. * libunwind-frame.c (libunwind_frame_dealloc_cache): Define. (libunwind_frame_unwind): Set dealloc_cache. * ia64-tdep.c (ia64_libunwind_frame_unwind): Set dealloc_cache.
Diffstat (limited to 'gdb/libunwind-frame.c')
-rw-r--r--gdb/libunwind-frame.c16
1 files changed, 15 insertions, 1 deletions
diff --git a/gdb/libunwind-frame.c b/gdb/libunwind-frame.c
index b22e6d7..ebf7eb2 100644
--- a/gdb/libunwind-frame.c
+++ b/gdb/libunwind-frame.c
@@ -65,6 +65,7 @@ struct libunwind_frame_cache
CORE_ADDR base;
CORE_ADDR func_addr;
unw_cursor_t cursor;
+ unw_addr_space_t as;
};
/* We need to qualify the function names with a platform-specific prefix to match
@@ -187,11 +188,20 @@ libunwind_frame_cache (struct frame_info *next_frame, void **this_cache)
}
cache->base = (CORE_ADDR)fp;
+ cache->as = as;
*this_cache = cache;
return cache;
}
+void
+libunwind_frame_dealloc_cache (struct frame_info *self, void *this_cache)
+{
+ struct libunwind_frame_cache *cache = this_cache;
+ if (cache->as)
+ unw_destroy_addr_space_p (cache->as);
+}
+
unw_word_t
libunwind_find_dyn_list (unw_addr_space_t as, unw_dyn_info_t *di, void *arg)
{
@@ -202,7 +212,11 @@ static const struct frame_unwind libunwind_frame_unwind =
{
NORMAL_FRAME,
libunwind_frame_this_id,
- libunwind_frame_prev_register
+ libunwind_frame_prev_register,
+ NULL,
+ NULL,
+ NULL,
+ libunwind_frame_dealloc_cache
};
/* Verify if there is sufficient libunwind information for the frame to use