public inbox for frysk-cvs@sourceware.org help / color / mirror / Atom feed
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. Date: Sat, 24 May 2008 20:33:00 -0000 [thread overview] Message-ID: <20080524203321.22305.qmail@sourceware.org> (raw) 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 <cagney@redhat.com> 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 <cagney@redhat.com> * 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 <cagney@redhat.com> + + * src/dwarf/Gparser.c (put_unwind_info): Call the eh-frame's + put_unwind_info method if present. + 2007-03-19 Mark Wielaard <mwielaard@redhat.com> * 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
reply other threads:[~2008-05-24 20:33 UTC|newest] Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20080524203321.22305.qmail@sourceware.org \ --to=cagney@sourceware.org \ --cc=frysk-cvs@sourceware.org \ --cc=frysk@sourceware.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).