<div dir="ltr"><div><div><div>Thanks,<br></div>It helped me to where to look for answers i got a better idea now how a -e trace=option works,And i see many *.c files which have these SYS_FUNC() in them what are these files for?<br></div><br>Thanks,<br></div>Rishi<br></div><div class="gmail_extra"><br><div class="gmail_quote">On Sat, Mar 4, 2017 at 10:58 PM, Eugene Syromyatnikov <span dir="ltr"><<a href="mailto:evgsyr@gmail.com" target="_blank">evgsyr@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">On Sat, Mar 4, 2017 at 5:15 PM, Rishi Bhatt <<a href="mailto:bhatt.rishi062@gmail.com">bhatt.rishi062@gmail.com</a>> wrote:<br>
> Thanks ldv,<br>
> I have read the man pages and got basic idea about strace.Now where should i<br>
> start understanding the code?The codebase is so big i dont know where to<br>
> start.<br>
</span>The core is strace.c and syscall.c (mostly). Take a look at some<br>
simple (umask.c, readahead.c, mount.c) and not so simple (time.c,<br>
ioctl.c, net.c, signal.c, ipc.c) decoders. You can look at some tests<br>
then, like umask, or aio, or sendmmsg, or btrfs. util.c contains<br>
various utility functions, defs.h contains various utility macros and<br>
inlines. linux directory contains various (mostly<br>
architecture-specific) system definitions which are preferred to be<br>
part of strace codebase. linux/*/syscallent.h contains wirings for<br>
syscalls. xlat directory contains sources for generation of symbolic<br>
constant headers.<br>
<div class="HOEnZb"><div class="h5"><br>
> On Sat, Mar 4, 2017 at 4:25 AM, Dmitry V. Levin <<a href="mailto:ldv@altlinux.org">ldv@altlinux.org</a>> wrote:<br>
>><br>
>> Hi,<br>
>><br>
>> On Fri, Mar 03, 2017 at 11:55:33PM +0530, Rishi Bhatt wrote:<br>
>> > Hi ldv,<br>
>> > thanks for the reply i have build the strace source-code and when i<br>
>> > was building it it skipped 50 test cases. So do you know why that<br>
>> > happened? or is it the matter that i should look into?<br>
>><br>
>> Why skipped or why 50?<br>
>><br>
>> A test can be skipped if<br>
>> - it is not applicable for the architecture being tested, for example,<br>
>> the test is for a syscall that is not inplemented for this architecture;<br>
>> - the test framework doesn't support the test, for example, a kernel<br>
>> module is not loaded, or the filesystem is not capable, etc.<br>
>><br>
>> Currently there are two architectures where exactly 50 tests are skipped:<br>
>> - native x86_64;<br>
>> - native sparc64.<br>
>><br>
>> I bet sparc64 is not your case, so you must be running the test suite<br>
>> natively on x86_64.<br>
>><br>
>> > And can you guide me where should i start to know about -e trace=class?<br>
>><br>
>> I think the best is to start with reading the manual page, then look<br>
>> at the code to understand how it's implemented. As soon as you've<br>
>> understood the implementation, it's easy to extend.<br>
>><br>
><br>
>><br>
>> --<br>
>> ldv<br>
>><br>
>><br>
>> ------------------------------<wbr>------------------------------<wbr>------------------<br>
>> Check out the vibrant tech community on one of the world's most<br>
>> engaging tech sites, SlashDot.org! <a href="http://sdm.link/slashdot" rel="noreferrer" target="_blank">http://sdm.link/slashdot</a><br>
>> ______________________________<wbr>_________________<br>
>> Strace-devel mailing list<br>
>> <a href="mailto:Strace-devel@lists.sourceforge.net">Strace-devel@lists.<wbr>sourceforge.net</a><br>
>> <a href="https://lists.sourceforge.net/lists/listinfo/strace-devel" rel="noreferrer" target="_blank">https://lists.sourceforge.net/<wbr>lists/listinfo/strace-devel</a><br>
>><br>
><br>
><br>
> ------------------------------<wbr>------------------------------<wbr>------------------<br>
> Check out the vibrant tech community on one of the world's most<br>
> engaging tech sites, SlashDot.org! <a href="http://sdm.link/slashdot" rel="noreferrer" target="_blank">http://sdm.link/slashdot</a><br>
> ______________________________<wbr>_________________<br>
> Strace-devel mailing list<br>
> <a href="mailto:Strace-devel@lists.sourceforge.net">Strace-devel@lists.<wbr>sourceforge.net</a><br>
> <a href="https://lists.sourceforge.net/lists/listinfo/strace-devel" rel="noreferrer" target="_blank">https://lists.sourceforge.net/<wbr>lists/listinfo/strace-devel</a><br>
><br>
<br>
<br>
<br>
</div></div><span class="HOEnZb"><font color="#888888">--<br>
Eugene Syromyatnikov<br>
mailto:<a href="mailto:evgsyr@gmail.com">evgsyr@gmail.com</a><br>
xmpp:esyr@jabber.{ru|org}<br>
</font></span><div class="HOEnZb"><div class="h5"><br>
------------------------------<wbr>------------------------------<wbr>------------------<br>
Check out the vibrant tech community on one of the world's most<br>
engaging tech sites, SlashDot.org! <a href="http://sdm.link/slashdot" rel="noreferrer" target="_blank">http://sdm.link/slashdot</a><br>
______________________________<wbr>_________________<br>
Strace-devel mailing list<br>
<a href="mailto:Strace-devel@lists.sourceforge.net">Strace-devel@lists.<wbr>sourceforge.net</a><br>
<a href="https://lists.sourceforge.net/lists/listinfo/strace-devel" rel="noreferrer" target="_blank">https://lists.sourceforge.net/<wbr>lists/listinfo/strace-devel</a><br>
</div></div></blockquote></div><br></div>