This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[GSOC] how to give arguments to a simple checks plugin?


Hello,

the official starting date for the GSOC coding is today. My project
(http://pvittet.com/GSOC/GSOC.pdf) is to code a plugin which allows
the user to make some simple checks (such as monitoring that a call to
pthread_mutex_lock() is followed by a test on pthread_mutex_unlock() on
the same mutex in the same function) and to displays resulting
warnings.

It is important to think about how the user can transmit arguments to
the plugin, I see three possibilities:

    * Using pragma informations in the code:
          o pro:
                  It might help to solve name mangling problems
                  (http://en.wikipedia.org/wiki/Name_mangling) 
	  o cons:
                  You have to modify the source code to check
                  something, checks are not meant to be easily changed.
                 
    * Putting them as a list of arguments:
          o pro:
                  Easily editable by the user.
          o cons:
                  Possible mangle problem if his code is not C language
                  (we can't expect the user to know the mangle
                  name of the function he wants to check).
                  Arguments list might be long.

    * Putting them in a separate file:
          o pro:
                  Easily editable by the user. 
          o cons:
                  Possible mangle problem is it is not C language (we
                  can't expect the user to know the mangle name of
                  the function he wants to check). 


So I would like to know which possibility you think to be the best ? 
At first I thought to use a separate file, but the mangling problem has
to be taken in account. I guess it heavily depends of how we wants the
plugin to be use (list of arguments is good for a quick try without
much real use, pragma would be more serious but also requires more
willingness from the user).

Thanks!

Pierre Vittet



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]