Hi,

On Wed, Apr 15, 2015 at 12:46:32AM +0530, Amish Mittal wrote:
>     i grep the code of strace 4.10 in and out for this project. This is
> what all i got for this project:
> we don't need to change the tprintf and tprints calls, we only need to
> slightly change their definition.
> My idea for this project:
> 1) crate one global char buffer in strace.c
> 2) if json flag is set then tprintf and tprints will not print write
> anything in current_tcp->outf , they will just write the whole string in
> our char buffer
> 3) one JsonFormatter which converts and writes our string in json format
> 
> example :
> JsonFormatter(execve( current_tcp->outf   ,"\"./a.out", ["./a.out"], [/* 80
> vars */]) = 0" , sizeOfBuffer)
> 
> will write
> {
>   "Function" : execve
>   "Arguments" : ("./a.out", ["./a.out"], [/* 80 vars */])
>   "Return" : 0
> }

What you are essentially proposing is to parse strace output for the
second time in hope that this traditional C-style human readable output
would be regular enough to produce a reliable structured output.
If this hypothesis was true, there would be no need to add this converter
into strace itself.

The problem is that traditional strace output is not 100% regular, and
the idea as I understand it is to change strace to parse all syscalls,
signals, etc. into a structured internal representation that would then
be printed either in traditional C-style format or in a structured format.


-- 
ldv

Attachment: pgp69qgsK7vOK.pgp
Description: PGP signature

------------------------------------------------------------------------------
BPM Camp - Free Virtual Workshop May 6th at 10am PDT/1PM EDT
Develop your own process in accordance with the BPMN 2 standard
Learn Process modeling best practices with Bonita BPM through live exercises
http://www.bonitasoft.com/be-part-of-it/events/bpm-camp-virtual- event?utm_
source=Sourceforge_BPM_Camp_5_6_15&utm_medium=email&utm_campaign=VA_SF
_______________________________________________
Strace-devel mailing list
Strace-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/strace-devel

Reply via email to