Hi everyone, I learned a lot about git from the great book [1] and I had cleared my repository in github[2]. I splited my current work into 3 commits: 1. Add basic hook framework for JSON output and the support for '-j' option. [3] 2. Modify sys_read(),sys_write() in io.c to use this hook framework. [4] 3. Add a very simple test to show the result. [5]
The most important part is in [3], I modified tprints() and tprintf() in strace.c to support hook framework. And you can find 2 simple example in [4] to get familiar with how to modify the current code to use the hook framework. I will do more on test. I think I can write a small program(in Python or C) to parse the JSON output and translate the output to the original format. We can then compare the translated output to the raw output as a check. Currently I'm using the hook to implement the JSON output and It seems works good. But I'm not sure whether it has any potential big problem in the future or maybe conflict with something else in strace? [1] http://git-scm.com/book/ [2] https://github.com/zym0017d/strace_GSOC/ [3] https://github.com/zym0017d/strace_GSOC/commit/e52637b4ca7536bb1259f6850df774357e8102f2 [4] https://github.com/zym0017d/strace_GSOC/commit/759f3a3d145f72a82fa981187de4b3d5154fbec3 [5] https://github.com/zym0017d/strace_GSOC/commit/d84de67753cc228b619ec3e6d97bc1c59278918f --- YangMin ------------------------------------------------------------------------------ Time is money. Stop wasting it! Get your web API in 5 minutes. www.restlet.com/download http://p.sf.net/sfu/restlet _______________________________________________ Strace-devel mailing list Strace-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/strace-devel