This is the mail archive of the
systemtap@sourceware.org
mailing list for the systemtap project.
Re: [Patch]Fix the args' output of syscall execve
- From: fche at redhat dot com (Frank Ch. Eigler)
- To: Martin Hunt <hunt at redhat dot com>
- Cc: Cai Fei <caifei at cn dot fujitsu dot com>, systemtap at sourceware dot org
- Date: Thu, 16 Aug 2007 10:00:04 -0400
- Subject: Re: [Patch]Fix the args' output of syscall execve
- References: <46C3ADEA.2060209@cn.fujitsu.com> <1187269307.3791.7.camel@dragon>
Martin Hunt <hunt@redhat.com> writes:
> [...] argv[0] was being skipped because it is typically just the
> filename again. But you are correct that it should be in args.
Indeed.
> However for argstr, I think it makes things less readable to include
> it. So I changed __get_argv and __compat_get_argv to optionally
> skip argv[0].
Let's not improvise unnecessarily. strace shows execve* this way:
strace -f sh -c ls |& grep exec
execve("/bin/sh", ["sh", "-c", "ls"], [/* 53 vars */]) = 0
execve("/bin/ls", ["ls"...], [/* 52 vars */]) = 0
- FChE