mirror of
https://github.com/bminor/binutils-gdb.git
synced 2025-12-26 01:07:52 +00:00
* 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.
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user