How to turn off -O2 build flags ?

Hi,
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.

  .Seth

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

[1] https://github.com/bro/bro/commit/302c063874f03c94eb0f96c974a2d0e2f137e51f

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

  .Seth