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]

Re: Libmudflap for sh-elf toolchain cannot access environment variable MUDFLAP_OPTIONS


Hi -

> >It's probably easier to place a putenv("MUDFLAP_OPTIONS=blah")
> >in your code, or inject it from the debugger.
> 
> [...]
> We cannot place putenv("MUDFLAP_OPTIONS=<..>") in
> libmudflap's __mf_init() function existing in mf-runtime.c.
> Placing putenv(..) will limit the instrumented code's 
> runtime behaviour only to option being set in the code by me.

What you are asking about is outside the scope of gcc.  You need to
teach your simulator to pass environment variables on, or need to find
another way.

Since command line arguments are (sometimes) passed on, perhaps you
could write a short routine that parses MUDFLAP_OPTIONS from there and
calls __mf_set_options.

- FChE


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