This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Libmudflap for sh-elf toolchain cannot access environment variable MUDFLAP_OPTIONS
- From: Andrew STUBBS <andrew dot stubbs at st dot com>
- To: Deepen Mantri <Deepen dot Mantri at kpitcummins dot com>
- Cc: "Frank Ch. Eigler" <fche at redhat dot com>, gcc at gcc dot gnu dot org
- Date: Fri, 15 Jun 2007 12:00:23 +0100
- Subject: Re: Libmudflap for sh-elf toolchain cannot access environment variable MUDFLAP_OPTIONS
- References: <892C324111C95549A2C214BACAEA309844F9@drsohm.kpit.com>
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