Huge thanks to our Platinum Members Endace and LiveAction,
and our Silver Member Veeam, for supporting the Wireshark Foundation and project.

Wireshark-dev: Re: [Wireshark-dev] O2 compile option makes it difficult to debug.

From: Bill Meier <wmeier@xxxxxxxxxxx>
Date: Mon, 28 Jul 2014 09:23:31 -0400
Hi,
It seems like the O2 option interferes with running the debugger. Would
it be better to only use O2 on release builds?
I'm not sure how to do that, add nmake -f makefile.nmake release option?

What I've done is to alter config.nmake slightly to allow the specification of WIRESHARK_ENVIRONMENT_CFLAGS as an environment variable the value of which is then added to the end of the CFLAGS (after all the other stuff) in config.nmake.

So: I then set WIRESHARK_ENVIRONMENT_CFLAGS to /Od

My experience has been that the "last seen" value for an option specified multiple times is the one that is used by the 'cl' command (at least for the options I've wanted to override).

If this is considered useful (and not harmful), I can commit the config.nmake change.

Bill