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