How to turn off -O2 build flags ?

How can I turn off the optimization settings when I build bro ?

I would like to run gdb against a running proc but it gets confused due to optimizations .

looks like ./configure --enable-debug

will do it :wink:

You could build with --enable-debug, but that turns on a lot of extra debugging and make Bro run quite a bit slower.

It seems that if you give -O0 as a CXXFLAG when you run configure we're currently appending those values in the wrong order when the compiler runs so you can't override it that way at the moment.


Just wondering if you’ve done any recent measurements? I can’t remember if [1] completely eliminated the overhead of —enable-debug without any `bro -B` flags versus just -O0, but it did help a lot.

- Jon


Oh, I haven't. That would be great if the debug overhead was gone or nearly gone.