LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (https://www.linuxquestions.org/questions/programming-9/)
-   -   i have used 'ggdb3' when i compile a software,why gdb didn't find debugging symbols (https://www.linuxquestions.org/questions/programming-9/i-have-used-ggdb3-when-i-compile-a-software-why-gdb-didnt-find-debugging-symbols-224390/)

icoming 08-30-2004 01:35 PM

i have used 'ggdb3' when i compile a software,why gdb didn't find debugging symbols
 
i have used 'ggdb3' when i compile a software,why gdb didn't find debugging symbols.
what i what to compile is the program of ftp,and it's original Makefile is as follow:

all: ftp

include ../MCONFIG
include ../MRULES

ifneq ($(USE_GLIBC),1)
CFLAGS += -D_GNU_SOURCE
endif

ifeq ($(USE_READLINE),1)
CFLAGS += -D__USE_READLINE__
LIBS += -lreadline $(LIBTERMCAP)
endif

ftp: cmds.o cmdtab.o domacro.o ftp.o glob.o main.o ruserpass.o
$(CC) $(LDFLAGS) $^ $(LIBS) -o $@

domacro.o ftp.o glob.o main.o ruserpass.o: ftp_var.h pathnames.h
cmds.o cmdtab.o: ftp_var.h pathnames.h cmds.h
cmds.o glob.o: glob.h

install: ftp
install -s -m$(BINMODE) ftp $(INSTALLROOT)$(BINDIR)
ln -sf ftp $(INSTALLROOT)$(BINDIR)/pftp
install -m$(MANMODE) ftp.1 $(INSTALLROOT)$(MANDIR)/man1
ln -sf ftp.1 $(INSTALLROOT)$(MANDIR)/man1/pftp.1

clean:
rm -f *.o ftp
~
i add ggdb3 to CFLAGS:CFLAGS+=ggdb3.
when i run 'make',gcc just run like this:
gcc -pipe -O2 -Wall -W -Wpointer-arith -Wbad-function-cast -Wcast-qual -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wnested-externs -Winline -Wcast-align -ggdb3 -D__USE_READLINE__ glob.c -c

why is there still no debugging symbols?


All times are GMT -5. The time now is 03:23 PM.