This is the mail archive of the systemtap@sourceware.org mailing list for the systemtap project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug uprobes/12275] uretprobes break exception handling


http://sourceware.org/bugzilla/show_bug.cgi?id=12275

--- Comment #5 from Josh Stone <jistone at redhat dot com> 2010-12-02 02:25:46 UTC ---
Here's a very rough outline of what I think the trampoline needs:

1:  /* As before, the trampoline return address points here.
     * When hit, run the uretprobe handler, then fixup the IP
     * back to the original return address. */
    BREAKPOINT_INSTRUCTION

2:  /* The eh_frame magic metadata for the trampoline points here
     * for a "catch" clause.  When hit, run an exception probe handler,
     * set the regs/stack so we could return to the original caller,
     * then fall through. */
    BREAKPOINT_INSTRUCTION

3: /* Now that we're ready to return to the original caller,
    * rethrow the exception so C++ can take care of the rest. */
    CALL __cxa_rethrow


We currently do [1] in an SSOL slot, but we may need a different mechanism
since we're expanding to a sequence of instructions.  I call it "magic" to get
us to [2], because I don't know how that stuff works -- those in the know,
please help flesh that out, if it's even possible.  And from looking at the asm
of little test programs that rethrow, I know that [3] is more complicated than
a single call, but we can expand that.

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]