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