Libmudflap for sh-elf toolchain cannot access environment variable MUDFLAP_OPTIONS

Andrew STUBBS andrew.stubbs@st.com
Fri Jun 15 11:01:00 GMT 2007


Deepen Mantri wrote:
> How to make x86/linux shell's environment variable 
> (MUDFLAP_OPTIONS) accessible to test.out while executing
> it through the sh-elf simulator? 

I don't know about other targets, but the SH newlib/crt/simulator 
doesn't do anything with the environment.

You could spend ages modifying the simulator and C runtime library to 
have the environment copied to the target.

It's probably easier to place a putenv("MUDFLAP_OPTIONS=blah") in your 
code, or inject it from the debugger.

Andrew



More information about the Gcc mailing list