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

2007-06-15 Thread Deepen Mantri
Frank Eigler wrote: >You need to teach your simulator to pass environment variables on ... Thanks for the reply. To pass on the environment variables from simulator to a.out which is targeted for machine different than host would require simulator to pass the data to a.out (other than command

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

2007-06-15 Thread Andrew STUBBS
Deepen Mantri wrote: 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. Well no, that would be silly - you might as wel

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

2007-06-15 Thread Frank Ch. Eigler
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

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

2007-06-15 Thread Deepen Mantri
Andrew STUBBS wrote: >It's probably easier to place a putenv("MUDFLAP_OPTIONS=blah") >in your code, or inject it from the debugger. Thanks for the reply. MUDFLAP_OPTIONS environment variable is used to control the run time behaviour of instrumented code generated with the help of libmudflap li

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

2007-06-15 Thread Andrew STUBBS
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