public inbox for frysk-cvs@sourceware.org
help / color / mirror / Atom feed
* [SCM] master: For dwarf, notify the eh-frame when the frame-info is being released.
@ 2008-05-24 20:33 cagney
0 siblings, 0 replies; only message in thread
From: cagney @ 2008-05-24 20:33 UTC (permalink / raw)
To: frysk-cvs
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
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2008-05-24 20:33 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-05-24 20:33 [SCM] master: For dwarf, notify the eh-frame when the frame-info is being released cagney
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).