Hi all, I had cleaned my patch and here I send them here for a discussion. Patch list: 0001-JSON-Import-the-basic-JSON-output-framework.patch 0002-JSON-Add-j-option-to-support-JSON-output.patch 0003-JSON-Add-support-for-syscalls-in-io.c.patch 0004-JSON-Add-support-to-entering-exiting-of-syscall.patch 0005-JSON-Add-basic-test-support-for-JSON-framework.patch 0006-JSON-Add-test-case-for-syscalls-in-io.c.patch 0007-JSON-Add-support-for-signals.patch
Patch 0001 show the internal implementation of the JSON framework, you can ignore it if you don't care the internal detail of the framework. Patch 0002 modify strace to add a new option '-j' to enable the JSON output format. Patch 0003/0004/0007 shows how to use the JSON framework, you can take them as a example to understand how to modify the current existing strace code to support JSON output format. These 3 patches shows in 3 different ways of modifying strace: 1) The most common sys_* functions for printing the arguments of a syscall; 2) The entering/exiting of a syscall which will print the name/retcode/description of a syscall; 3) The special signals in strace such as the '+++' signals; Patch 0005/0006 give a test suit for the JSON framework. It's also a good example for you to understand how to parse the JSON output of strace. I wrote a simple parser in python, It's easy and quick. If you want to use the test suit, just cd to test directory and run json_test.sh, I suggest you first install wdiff and corlordiff to make the output look better. Before the deadline of GSOC 2014(August 18), I will probably not modify the base framework any more(or just some small refactor), And I will put my energy to modify the existing strace code to add JSON support for those sys_* functions in strace. you can also get my code from my github and have a test: 1) git clone https://github.com/zym0017d/strace_GSOC/ 2) cd strace_GSOC && make 3) cd test && make && ./json_test.sh If you have any suggestions please let me know. Thank you! --- YangMin ------------------------------------------------------------------------------ Want fast and easy access to all the code in your enterprise? Index and search up to 200,000 lines of code with a free copy of Black Duck Code Sight - the same software that powers the world's largest code search on Ohloh, the Black Duck Open Hub! Try it now. http://p.sf.net/sfu/bds _______________________________________________ Strace-devel mailing list Strace-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/strace-devel