hi
Dmitry V. Levin
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
}
we will call JsonFormatter function ALTERNATE ,so that we have full
information(entering and exiting) one syscall in our buffer, in strace.c in
trace() function definition , exact location is given below
if (trace_syscall(tcp) < 0)
{
return true;
}
if(json flag set && alternate flag is set)
{
JsonFormatter(current_tcp->outf, char buffer,sizeof buffer);
clear buffer;
}
restart_tracee_with_sig_0:
sig = 0;
i guess , this will work
plz correct me if have mentioned anything wrong
thank you
Amish Mittal
waiting for your reply to start working on this idea
------------------------------------------------------------------------------
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