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/10458] uaddr() returns one past current instruction for uprobes


------- Additional Comments From mjw at redhat dot com  2009-07-31 18:10 -------
That worked very well. The advantage of this is that the pt_regs IP_REG now
always points to the actual instruction we are interested in. I added the same
for the kprobe variants. Now these act similarly to other probes that provice
pt_regs. This also means we can get rid of a anomaly in the unwinder where we
would always adjust the instruction by one even for cases where that wasn't
necessary (and where effectively we could unwind from the wrong spot just before
a function entry).

commit 6415dddecb81f59996e422e87e1d3da266d743e8
Author: Mark Wielaard <mjw@redhat.com>
Date:   Fri Jul 31 18:46:47 2009 +0200

    PR10458. User actual breakpoint address for [ku]probe[ret].
    
    Setup the pt_regs REG_IP to the actual breakpoint address before
    entering a probe handler for [ku]probe[ret] (and restore it after
    returning). This helps getting symbol resolution and backtraces
    more correct and makes it more conform with other probe handlers
    like the iutrace and profile timers that also provide pt_regs
    (which untill now exhibited off-by-one errors while unwinding).
    
    * tapsets.cxx (dwarf_derived_probe_group::emit_module_decls):
      Setup REG_IP correctly before calling enter_kprobe_probe
      and enter_kretprobe_probe, and restore afterwards.
      (uprobe_derived_probe_group::emit_module_decls): Likewise for
      enter_uprobe_probe and enter_uretprobe_probe.
      (kprobe_derived_probe_group::emit_module_decls): Likewise for
      enter_kprobe2_probe and enter_kretprobe2_probe.
    * runtime/unwind/i386.h (arch_unw_init_frame_info): Initialize
      info->call_frame to zero.
    * runtime/unwind/x86_64.h (arch_unw_init_frame_info): Likewise.


-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED


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

------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.


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