Advanced and improved absolute paths decoding
Zubin Mithra
zubin.mithra at gmail.com
Mon Mar 3 05:18:40 UTC 2014
Hey Philippe and Dmitry,
On Sun, Mar 2, 2014 at 4:30 PM, Philippe Ombredanne
<pombredanne at nexb.com> wrote:
> On Tue, Feb 25, 2014 at 5:57 PM, Zubin Mithra <zubin.mithra at gmail.com> wrote:
>> Hey all,
>> I'm Zubin and I love low level systems programming! :)
> [...]
>> I had a look at the ideas list here[1] and found the idea on improved path
>> decoding quite interesting and was hoping we could discuss it further on the
>> mailing list.
>
> Hi Zubin:
> thanks for your interest in strace and your detailed message and
> initial investigations!
>
> I wonder if the advanced path decoding itself would be large enough to
> fill a whole 3 month GSOC project
> What do you think?
Yes, I do agree -- path decoding alone would not be large enough for
filling up a 3 month GSoC project. Reading the discussing below, the
improvements that could be made are the "-yy" feature and the quotes
around paths when using the -y flag.
>
> While looking at path decoding is there other areas or ideas you could
> consider too such as structured json output?
I just had a second look at the ideas list and the discussions on the
mailing list so far. Its quite interesting and I believe something
that can fit in with the existing idea.
Perhaps the following format makes sense? A call to :-
open("/usr/lib/locale/UTF-8/LC_CTYPE", O_RDONLY|O_CLOEXEC) = -1 ENOENT
could be represented in JSON as :-
{
"call_one" : {
"fnname" = "open",
"arg1" = "\"/usr/lib/locale/UTF-8/LC_CTYPE\"",
"arg2" = "O_RDONLY|O_CLOEXEC",
"ret" = "-1"
}
}
Of course, this above example is oversimplified(And I'm not sure thats
the best way to manage quoting to be honest, I'll put in some more
thought).
In cases where a struct is passed as an argument, as in the case of a
bind call we have,
bind(3, {sa_family=AF_INET, sin_port=htons(7171),
sin_addr=inet_addr("0.0.0.0")}, 16) = 0
We could have "arg2" set to "{sa_family=AF_INET, sin_port=htons(7171),
sin_addr=inet_addr("0.0.0.0")}" but I feel it defeats the purpose as
parsing output itself would be more painful. Perhaps something like
the following would be nice.
{
"call_thirteen" : {
"fnname" = "bind",
"arg1" = "3",
"arg2" : {
"sa_family" : "AF_INET",
"sin_port" : "htons(7171)",
"sin_addr" : "inet_addr("0.0.0.0")"
},
"ret" = "-1"
}
}
Is that what you had in mind?
Thanks
zm
More information about the Strace-devel
mailing list