diff options
author | David Smith <dsmith@redhat.com> | 2009-05-21 16:57:04 -0500 |
---|---|---|
committer | David Smith <dsmith@redhat.com> | 2009-05-21 16:57:04 -0500 |
commit | c8e9eb18d8d13d099a4a177fe53de507c1d9ce8b (patch) | |
tree | ab2388afb795ed1a7ead2fbbf8b9d1b368a8231f /runtime/unwind.c | |
parent | dd9a3bcbef65bde65491d959e9458bc641924811 (diff) | |
parent | 3863e7999255deeaa7f8f4bba7df893773812537 (diff) | |
download | systemtap-steved-c8e9eb18d8d13d099a4a177fe53de507c1d9ce8b.tar.gz systemtap-steved-c8e9eb18d8d13d099a4a177fe53de507c1d9ce8b.tar.xz systemtap-steved-c8e9eb18d8d13d099a4a177fe53de507c1d9ce8b.zip |
Merge commit 'origin/master' into pr7043
Conflicts:
runtime/print.c
runtime/transport/transport.c
runtime/transport/transport_msgs.h
Diffstat (limited to 'runtime/unwind.c')
-rw-r--r-- | runtime/unwind.c | 24 |
1 files changed, 15 insertions, 9 deletions
diff --git a/runtime/unwind.c b/runtime/unwind.c index 9c704e28..aacd56f1 100644 --- a/runtime/unwind.c +++ b/runtime/unwind.c @@ -345,7 +345,7 @@ static int processCFI(const u8 *start, const u8 *end, unsigned long targetLoc, s state->label = NULL; return 1; } - if (state->stackDepth >= MAX_STACK_DEPTH) + if (state->stackDepth >= STP_MAX_STACK_DEPTH) return 0; state->stack[state->stackDepth++] = ptr.p8; break; @@ -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, &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; |