Libmudflap for sh-elf toolchain cannot access environment variable MUDFLAP_OPTIONS
Frank Ch. Eigler
fche@redhat.com
Fri Jun 15 15:28:00 GMT 2007
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
More information about the Gcc
mailing list