ANNOUNCEMENT: Live Wireshark University & Allegro Packets online APAC Wireshark Training Session
April 17th, 2024 | 14:30-16:00 SGT (UTC+8) | Online

Wireshark-dev: [Wireshark-dev] How to turn off optimization while compiling Wireshark on linux?

From: siri m <svu004@xxxxxxxxx>
Date: Tue, 7 Apr 2009 11:54:18 -0700
Hi all,

I want to turn off the optimization and enable the debugging symbols
while compiling wireshark;
I have tried the following, but with no luck. Can someone point me in
the right direction?

I obtained the wireshark tar file; untarred it and ran the following:
1. ./autogen.sh
2. Set the environment flags:
CXXFLAGS=-g -O0
./configure
3. make

I then, tried to start wireshark from the epan/dissectors location
using ddd with the compiled wireshark. However, whenever I try to open
the source file of say either existing dissectors or our custom
plugins, it always complains about Line 1 of "packet-xxx.c" is at
address 0x31f8d70 <check_mask> but contains no code.
Also, for some of the values, it says, "optimized out".

Can someone point me in the right direction to debug wireshark
dissectors/plugins?  I am assuming that the above is because of the
optimization flag. Are there any other flags that I need to set?

Thanks in advance,