From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22346 invoked by alias); 24 May 2008 20:33:21 -0000 Received: (qmail 22320 invoked by uid 367); 24 May 2008 20:33:21 -0000 Date: Sat, 24 May 2008 20:33:00 -0000 Message-ID: <20080524203321.22305.qmail@sourceware.org> From: cagney@sourceware.org To: frysk-cvs@sourceware.org Subject: [SCM] master: For dwarf, notify the eh-frame when the frame-info is being released. X-Git-Refname: refs/heads/master X-Git-Reftype: branch X-Git-Oldrev: 1936bb8c8e85e822981a1f8e6a6a3b189447ecbb X-Git-Newrev: 9e513ef98a772fee06a688072310aad9011494dc Mailing-List: contact frysk-cvs-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: frysk-cvs-owner@sourceware.org Reply-To: frysk@sourceware.org X-SW-Source: 2008-q2/txt/msg00283.txt.bz2 The branch, master has been updated via 9e513ef98a772fee06a688072310aad9011494dc (commit) from 1936bb8c8e85e822981a1f8e6a6a3b189447ecbb (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email. - Log ----------------------------------------------------------------- commit 9e513ef98a772fee06a688072310aad9011494dc Author: Andrew Cagney Date: Sat May 24 16:30:22 2008 -0400 For dwarf, notify the eh-frame when the frame-info is being released. This changes libunwind's dwarf's put_unwind_info (called by libunwind when it has finished using the proc-info for a frame) so that it also notifies the the eh-frame callback that the proc-info is being released. frysk-imports/libunwind/ChangeLog 2008-05-24 Andrew Cagney * src/dwarf/Gparser.c (put_unwind_info): Call the eh-frame's put_unwind_info method if present. ----------------------------------------------------------------------- Summary of changes: frysk-imports/libunwind/ChangeLog | 5 ++++ frysk-imports/libunwind/src/dwarf/Gparser.c | 33 ++++++++++++++++++++++---- 2 files changed, 33 insertions(+), 5 deletions(-) First 500 lines of diff: diff --git a/frysk-imports/libunwind/ChangeLog b/frysk-imports/libunwind/ChangeLog index 9973254..3bf7ff9 100644 --- a/frysk-imports/libunwind/ChangeLog +++ b/frysk-imports/libunwind/ChangeLog @@ -1,3 +1,8 @@ +2008-05-24 Andrew Cagney + + * src/dwarf/Gparser.c (put_unwind_info): Call the eh-frame's + put_unwind_info method if present. + 2007-03-19 Mark Wielaard * src/x86_64/Gstep.c (is_call_instr_at): New function. diff --git a/frysk-imports/libunwind/src/dwarf/Gparser.c b/frysk-imports/libunwind/src/dwarf/Gparser.c index 441cf9b..ea7c4c9 100644 --- a/frysk-imports/libunwind/src/dwarf/Gparser.c +++ b/frysk-imports/libunwind/src/dwarf/Gparser.c @@ -439,13 +439,36 @@ put_unwind_info (struct dwarf_cursor *c, unw_proc_info_t *pi) if (!c->pi_valid) return; - if (c->pi_is_dynamic) + if (c->pi_is_dynamic) { unwi_put_dynamic_unwind_info (c->as, pi, c->as_arg); - else if (pi->unwind_info); - { - mempool_free (&dwarf_cie_info_pool, pi->unwind_info); - pi->unwind_info = NULL; + return; + } + + if (pi->unwind_info); { + // Find the eh-frame's address space and arguments. + unw_addr_space_t frame_as; + void *frame_arg; +#ifndef UNW_LOCAL_ONLY + struct dwarf_cie_info *dci = pi->unwind_info; + frame_as = dci->as; + frame_arg = dci->as_arg; +#else + frame_as = c->as; + frame_arg = c->as_arg; +#endif + if (frame_as) { + // notify the eh-frame accessors that the info is being + // released so it can also release its local data (for instance + // the frame_arg pointer). + unw_accessors_t *a = unw_get_accessors (frame_as); + if (a->put_unwind_info != NULL) { + a->put_unwind_info(frame_as, pi, frame_arg); + } } + // Free this data. + mempool_free (&dwarf_cie_info_pool, pi->unwind_info); + pi->unwind_info = NULL; + } } static inline int hooks/post-receive -- frysk system monitor/debugger