Broken strace argument handling in regards to "-p" option
    Max Kirillov 
    max at max630.net
       
    Thu Apr  7 04:19:32 UTC 2011
    
    
  
On Thu, Apr 07, 2011 at 01:14:33AM +0400, Dmitry V. Levin wrote:
> On Wed, Apr 06, 2011 at 01:08:06PM -0700, max at max630.net wrote:
>> There is an old bug in strace - it does not allow specifying both -p and
>> commandline arguments.
> 
> Why do you consider this behavior as a bug?
At least, by the definition of "bug": man strace specifies
this:
| Multiple -p options can be used to  attach to  up to 32
| processes in addition to command (which is optional if at
| least one -p option is given).
> Could you show an example of useful tracing of existing processes
> along with executing new traced processes, please?
I do not have that example which revealed the problem to me
anymore, but in general any client-server architecture
(which are common to modern Linux) can be traced with it:
$strace -p 2494 -p 13284 qdbus \
 org.freedesktop.Notifications \
 /org/freedesktop/Notifications \
 org.freedesktop.Notifications.GetCapabilities
Here 2494 is dbus-daemon and 13284 is the Notification
service
-- 
Max
    
    
More information about the Strace-devel
mailing list