Understanding a parser.

Rishi Bhatt bhatt.rishi062 at gmail.com
Tue Mar 21 17:18:47 UTC 2017


please reply!

On Sun, Mar 19, 2017 at 1:47 AM, Rishi Bhatt <bhatt.rishi062 at gmail.com>
wrote:

> Hi,
> Well i am currently understanding how to implement a parser,so i am
> starting with the simple ones first i.e umask.c,readahead.c,mount.c.
>
> What i know about the implementation of parser:
> What we do in these are use the tcb struct(u_arg[]) to get the values that
> are passed in as arguments,i am not going into that detail for now (or
> should i go?),i guess for now i should just accept it.
>
> Now taking an example of a parser lets say mount.c:
> arguments of mount:source,target,filesystem,mountflags and data.
>
> So if i am implementing a mount parser i have to get the values that is
> being passed in this syscall that i can get from registers(somehow),also
> the return value and error values.Also we have to consider printing the
> appropriate things with appropriate wrappers like if we are printing source
> and target in mount.c we are using printpath and if address ,it is prinnted
> by printaddr and etc.
>
> And we have to first know what can be value of a specific parameter in
> different condition,like in mount.c we are printing "mount_filesystem" as a
> address or as string.(ignore_type)
>
> So this should be the info to start implementing a parser?
>
> So please fill me up with more detail if i am missing something or i am
> interpreting something in a wrong way,and if possible can you give me some
> small parser related thing to implement so i can understand it better.So i
> can try to start implementing a parser.
>
> P.S: so that i can write something in my gsoc proposal. :)
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.strace.io/pipermail/strace-devel/attachments/20170321/6c336aae/attachment.html>


More information about the Strace-devel mailing list