This is the mail archive of the
systemtap@sourceware.org
mailing list for the systemtap project.
[Bug translator/12498] systemtap.examples/process/noptrace hangs on RHEL4 because arguments are wrong
- From: "wcohen at redhat dot com" <sourceware-bugzilla at sourceware dot org>
- To: systemtap at sources dot redhat dot com
- Date: Fri, 18 Feb 2011 20:59:22 +0000
- Subject: [Bug translator/12498] systemtap.examples/process/noptrace hangs on RHEL4 because arguments are wrong
- Auto-submitted: auto-generated
- References: <bug-12498-1110@http.sourceware.org/bugzilla/>
http://sourceware.org/bugzilla/show_bug.cgi?id=12498
--- Comment #2 from William Cohen <wcohen at redhat dot com> 2011-02-18 20:59:17 UTC ---
On RHEL5 puts the probe at the first instruction of sys_ptrace function. On the
i686 RHEL4 system the probe in put farther into the function. RHEL4:
[wcohen@slingshot obj]$ stap -p2 -e 'probe syscall.ptrace{printf("%s\n",
$$parms)}' -c 'strace ls'
# functions
_dwarf_tvar_get_addr_6:long ()
_dwarf_tvar_get_data_7:long ()
_dwarf_tvar_get_pid_5:long ()
_dwarf_tvar_get_request_4:long ()
# probes
kernel.function("sys_ptrace@arch/i386/kernel/ptrace.c:235").call? /*
pc=_stext+0x985c */ /* <- syscall.ptrace = kernel.function("sys_ptrace").call?
<- syscall.ptrace */
using the _stext from System.Map-`uname -r`
pc=_stext+0x985c = c0100298 + 0x985c = C0109AF4
c0109af2 <sys_ptrace>:
c0109af2: 55 push %ebp
c0109af3: 57 push %edi
c0109af4: bf 00 f0 ff ff mov $0xfffff000,%edi #<-probe here
c0109af9: 56 push %esi
c0109afa: 53 push %ebx
c0109afb: 53 push %ebx
c0109afc: 53 push %ebx
c0109afd: 8b 5c 24 24 mov 0x24(%esp),%ebx
c0109b01: 21 e7 and %esp,%edi
Due to the eu-readelf being really old on RHEL-4, I copied the vmlinux over to
RHEL-5 and did the following:
eu-readelf --debug-dump=info vmlinux > /tmp/debug
section of interest:
[ 862dd] subprogram
sibling [ 86b9f]
external
name "sys_ptrace"
decl_file 1
decl_line 235
prototyped
type [ 7d202]
low_pc 0xc0109af2 <sys_ptrace>
high_pc 0xc010a0ea <do_syscall_trace>
frame_base location list [ 13a48]
[ 862fa] formal_parameter
name "request"
decl_file 1
decl_line 234
type [ 7d231]
location 2 byte block
[ 0] breg4 28
[ 86308] formal_parameter
name "pid"
decl_file 1
decl_line 234
type [ 7d231]
location 2 byte block
[ 0] breg4 32
[ 86316] formal_parameter
name "addr"
decl_file 1
decl_line 234
type [ 7d231]
location location list [ 13b40]
[ 86325] formal_parameter
name "data"
decl_file 1
decl_line 234
type [ 7d231]
location location list [ 13bc7]
Are the "location" fields for request and pid parameters reasonable?
--
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.