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]

Re: [Patch]Fix the args' output of syscall execve


Hi,

Martin Hunt wrote:
On Thu, 2007-08-16 at 10:00 -0400, Frank Ch. Eigler wrote:
Martin Hunt <hunt@redhat.com> writes:

strace -f sh -c ls |& grep exec
execve("/bin/sh", ["sh", "-c", "ls"], [/* 53 vars */]) = 0
execve("/bin/ls", ["ls"...], [/* 52 vars */]) = 0

Looks OK for trivial cases, but compare


strace way:

[pid 11943] execve("/usr/bin/g++", ["g++"..., "-DHAVE_CONFIG_H"...,
"-I."..., "-I."..., "-I."..., "-DBINDIR=\"/usr/local/bin\""...,
"-DPKGDATADIR=\"/usr/local/share/s"..., "-DPKGLIBDIR=
\"/usr/local/libexec/"..., "-Wall"..., "-Wextra"..., "-Werror"...,
"-g"..., "-O2"..., "-MT"..., "stap-staptree.o"..., "-MD"..., ...], [/*
43 vars */]) = 0

[pid 11944] execve("/usr/libexec/gcc/i386-redhat-linux/4.1.2/cc1plus",
["/usr/libexec/gcc/i386-redhat-lin"..., "-quiet"..., "-I."..., "-I."...,
"-I."..., "-MD"..., "stap-staptree.d"..., "-MF"...,
".deps/stap-staptree.Tpo"..., "-MP"..., "-MT"..., "stap-staptree.o"...,
"-MQ"..., "stap-staptree.o"..., "-D_GNU_SOURCE"...,
"-DHAVE_CONFIG_H"..., ...], [/* 45 vars */]) = 0


systemtap script:


[pid 12965] /usr/bin/g++ -DHAVE_CONFIG_H -I. -I. -I.
-DBINDIR="/usr/local/bin" -DPKGDATADIR="/usr/local/share/systemtap"
-DPKGLIBDIR="/usr/local/libexec/systemtap" -Wall -Wextra -Werror -g -O2
-MT stap-parse.o -MD -MP -MF .deps/stap-parse.Tpo -c -o stap-parse.o
parse.cxx

[pid 12966] /usr/libexec/gcc/i386-redhat-linux/4.1.2/cc1plus -quiet -I.
-I. -I. -MD stap-parse.d -MF .deps/stap-parse.Tpo -MP -MT stap-parse.o
-MQ stap-parse.o -D_GNU_SOURCE -DHAVE_CONFIG_H -DBINDIR="/usr/local/bin"
-DPKGDATADIR="/usr/local/share/systemtap"
-DPKGLIBDIR="/usr/local/libexec/systemtap" parse.cxx -quiet -dumpbase
parse.cxx -mtune=generic -auxbase-strip stap-parse.o -g -O2 -Wall
-Wextra -Werror -o /tmp/ccUmZrhr.s
I read the new syscalls.stp and aux_syscalls.stp.
The argv[0]'th entry is usually the path name, but for various reasons the invoker may want to override that.
In this kind of situation, if the invoker uses args but not argstr for tracing that, he will not get the message.





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