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 translator/10762] turn off userspace prologue heuristics for recent gcc


------- Additional Comments From fche at redhat dot com  2009-10-16 21:17 -------
Parameters at the function entry seem to hit upon an existing uprobes
shortcoming: using pt_regs as it arrived from the kernel trap handler
instead of the utrace regset.  In other words, our pt_regs currently
get corrupt values (specifically for %rsp and sometimes %rax), which
precludes correct location.

So we're blocked on bug #10601.

% cat foo.c
int foo(char *p) { while(*p++); return 0; }
int main() {
  foo("hello");
}

% gcc -g -fno-inline -fomit-frmae-pointer -O3 foo.c

Probing function("foo").call vs. statement("foo") exposes the various problems
on i686.  function("foo").call will be called five times since the prologue
heuristics will fire and place the probe at the head of the loop.

On the other hand, statement("foo") will be called once, but print_regs() 
confirms that some incoming register values are wrong (compare to a gdb
breakpoint & info regs at the same address).


-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
  BugsThisDependsOn|                            |10601
         AssignedTo|fche at redhat dot com      |systemtap at sources dot
                   |                            |redhat dot com


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

------- 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]