This is the mail archive of the
systemtap@sourceware.org
mailing list for the systemtap project.
Re: How to change a string type argument of a system call?
- From: fche at redhat dot com (Frank Ch. Eigler)
- To: Neo Liu <diabloneo at gmail dot com>
- Cc: SystemTap <systemtap at sourceware dot org>
- Date: Thu, 01 Apr 2010 09:26:09 -0400
- Subject: Re: How to change a string type argument of a system call?
- References: <o2k861674c01004010514k8e3d095ew7e11232f6fdf3dbb@mail.gmail.com>
Neo Liu <diabloneo@gmail.com> writes:
> How can I use systemtap to change a string type parameter in a
> syscall probe? For example, I use "probe syscall.open", I want to
> change the "filename" parameter to make the "open" syscall open a
> different file. How can I do that?
We don't currently have helper functions for this: kernel_string() and
user_string() just read. Someone could write embedded-c routines to
do kernel_set_string() etc., but if we put them into the standard
tapset we need to make such functions only available in guru mode.
(That would probably need the invention of a /* guru */ marker.)
- FChE