diff options
author | Dave Brolley <brolley@redhat.com> | 2009-04-22 11:57:40 -0400 |
---|---|---|
committer | Dave Brolley <brolley@redhat.com> | 2009-04-22 11:57:40 -0400 |
commit | bc815e0692536da04956f038f5f79941579f8d74 (patch) | |
tree | 98b0f8cfdd90c225f5b5fede18352caee5d9a546 /runtime/unwind.c | |
parent | 88e8da383e47adafc9e75c4f10aecd0ce4ad959f (diff) | |
parent | 247f1e1fa09953347a4e5313ae0022f151316dae (diff) | |
download | systemtap-steved-bc815e0692536da04956f038f5f79941579f8d74.tar.gz systemtap-steved-bc815e0692536da04956f038f5f79941579f8d74.tar.xz systemtap-steved-bc815e0692536da04956f038f5f79941579f8d74.zip |
Merge branch 'master' of git://sources.redhat.com/git/systemtap
Diffstat (limited to 'runtime/unwind.c')
-rw-r--r-- | runtime/unwind.c | 22 |
1 files changed, 14 insertions, 8 deletions
diff --git a/runtime/unwind.c b/runtime/unwind.c index 41af72a7..aacd56f1 100644 --- a/runtime/unwind.c +++ b/runtime/unwind.c @@ -435,12 +435,18 @@ adjustStartLoc (unsigned long startLoc, struct _stp_module *m, struct _stp_section *s) { - if (startLoc && (strcmp (m->name, "kernel") != 0)) - { - startLoc = _stp_module_relocate (m->name, s->name, - startLoc); - startLoc -= m->dwarf_module_base; - } + /* XXX - some, or all, of this should really be done by + _stp_module_relocate. */ + if (startLoc == 0 + || strcmp (m->name, "kernel") == 0 + || strcmp (s->name, ".absolute") == 0) + return startLoc; + + if (strcmp (s->name, ".dynamic") == 0) + return startLoc + s->addr; + + startLoc = _stp_module_relocate (m->name, s->name, startLoc); + startLoc -= m->dwarf_module_base; return startLoc; } @@ -562,7 +568,7 @@ static char *_stp_eh_enc_name(signed type) /* Unwind to previous to frame. Returns 0 if successful, negative * number in case of an error. A positive return means unwinding is finished; * don't try to fallback to dumping addresses on the stack. */ -static int unwind(struct unwind_frame_info *frame) +static int unwind(struct unwind_frame_info *frame, struct task_struct *tsk) { #define FRAME_REG(r, t) (((t *)frame)[reg_info[r].offs]) const u32 *fde, *cie = NULL; @@ -581,7 +587,7 @@ static int unwind(struct unwind_frame_info *frame) if (UNW_PC(frame) == 0) return -EINVAL; - m = _stp_mod_sec_lookup (pc, current, &s); + m = _stp_mod_sec_lookup (pc, tsk, &s); if (unlikely(m == NULL)) { dbug_unwind(1, "No module found for pc=%lx", pc); return -EINVAL; |