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 well cut out the whole environment read entirely. Put it somewhere else - main perhaps.

If you don't want to do that, you still have the option of injecting the call via the debugger:

(gdb) break main
(gdb) continue
....
(gdb) call putenv("MUDFLAP_OPTIONS=<..>")
(gdb) continue

Of course, you have to have putenv linked into the program, but that can be arranged easily enough.

Andrew

Reply via email to