diff options
author | Andreas Schwab <schwab@suse.de> | 2007-06-12 15:21:27 +0000 |
---|---|---|
committer | Andreas Schwab <schwab@suse.de> | 2007-06-12 15:21:27 +0000 |
commit | ae4e6e4eaa6d988db4e6ecb37a25bf8cf1e33306 (patch) | |
tree | 1f370e2ab46d44e9ae887b7dc64412edbdb6b31f /gdb/libunwind-frame.c | |
parent | 4330356dffab209a837d8904d43f145b4ff4ffed (diff) | |
download | gdb-ae4e6e4eaa6d988db4e6ecb37a25bf8cf1e33306.tar.gz |
* 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.c | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/gdb/libunwind-frame.c b/gdb/libunwind-frame.c index b22e6d71846..ebf7eb21521 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 |