Ethereal-dev: Re: [ethereal-dev] compiling with debug info (Linux)

Note: This archive is from the project's previous web site, ethereal.com. This list is no longer active.

From: Ben Fowler <wapdev@xxxxxxxxxxxx>
Date: Sat, 10 Jun 2000 21:55:38 +0100
At 10:15 PM 6/8/00, Mark Clayton wrote:

I'm trying to build ethereal with debug info for use with gdb
on linux.  I didn't see the usual debug option to configure
so I edited all the makefiles by removing the -O3 and replacing
it with a -g.  I can see gcc use the -g on all the compiles
and the -g is there for the link stage.

Editing all the makefiles sounds like too much work.

I have had success in configuring custom CFLAGS using
something like:

$ CFLAGS=-g . ./configure ...

another possibility is to use

./configure --enable-debug=yes

but this does not seem to work for ethereal. The relevant lines from my makefile are:

CFLAGS = -Wall -g -O2 -I$(top_srcdir) -I$(top_srcdir)/wiretap -I/usr/local/include -I/usr/local/lib/glib/include -I/usr/local/include -I/usr/X11R6/include

COMPILE = $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)

LINK = $(LIBTOOL) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(LDFLAGS) -o $@

You might want to check the documentation for your shell. If you still have problems, post again. It might be desirable to make a patch to configure.in as it is obviously a good idea to have a
documented way of getting a debug version of ethereal.

Ben.





--
Leedsnet - The information resource for Leeds and the West Riding
< URL:http://www.leedsnet.com/mobile/ >