diff options
author | William Cohen <wcohen@redhat.com> | 2009-04-23 11:13:59 -0400 |
---|---|---|
committer | William Cohen <wcohen@redhat.com> | 2009-04-23 11:13:59 -0400 |
commit | 927dab9f7b4298b4ef28ae87cdb7dafe43e5d76a (patch) | |
tree | 1cd2cc946800969a9816883a8b2f2edc27caccdb /runtime/unwind.c | |
parent | 1e0a708d560ed69405e94a45d11067abae7f79a5 (diff) | |
parent | 4fecf7f1c9fd8ae54ff13677c710b75a10d8cc91 (diff) | |
download | systemtap-steved-927dab9f7b4298b4ef28ae87cdb7dafe43e5d76a.tar.gz systemtap-steved-927dab9f7b4298b4ef28ae87cdb7dafe43e5d76a.tar.xz systemtap-steved-927dab9f7b4298b4ef28ae87cdb7dafe43e5d76a.zip |
Merge branch 'master' of ssh://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; |