GSoC status report - #1 of 10

Masatake YAMATO yamato at redhat.com
Wed Jun 16 01:57:28 UTC 2021


On Tue, 15 Jun 2021 19:29:11 -0400, "Srikavin Ramkumar" <srikavinramkumar at gmail.com> wrote:
> Hi,
> 
> On Mon Jun 14, 2021 at 11:14 PM EDT, Masatake YAMATO wrote:
>> Hi,
>>
>> Interesting effort!
>>
>>
>> How about using a script language instead of C for writing `gen` ?
>>
>> If we use C, the process of cross-compiling becomes a bit complicated.
>> So I got the question.
>>
> 
> The plan is for the generated C code to be platform-independent; that is, the
> same code would be generated regardless of the host platform. The description
> language has support for preprocessor directives (#include, #define, #ifdef, 
> and #ifndef) that will be included directly in the generated C code to
> enable/modify certain syscalls at compile time (using the target compiler).
>
> The resulting decoders could be committed alongside changes to the underlying
> system call descriptions or could be generated when running ./bootstrap. This
> way, compiling the contents of maint/gen and generating decoders would happen 
> before the compilation of strace.

I see. I didn't understand when gen is compuiled.
The code generated by gen may be included in starce-*.tar.xz.
The user who will build a strace executable from tar.xz file doesn't have to build gen.

> 
> Then, the generated code would be compiled using the same toolchain as the rest
> of strace. I think this approach should avoid any cross-compilation issues, but 
> let me know if you spot any potential issues.

I agree with you. Sorry for making noise.

Masatake YAMATO

> -- Srikavin
> 



More information about the Strace-devel mailing list