This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: Using the -g flag but gdb still sais: no debugging symbols found
- From: Brian Dessent <brian at dessent dot net>
- To: Gary <plap1234 at yahoo dot com>
- Cc: gcc-help at gcc dot gnu dot org
- Date: Thu, 06 Dec 2007 17:05:17 -0800
- Subject: Re: Using the -g flag but gdb still sais: no debugging symbols found
- References: <957397.74667.qm@web60512.mail.yahoo.com>
- Reply-to: gcc-help at gcc dot gnu dot org
Gary wrote:
> DEFINES = -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE
> -DLITTLE_ENDIAN
Cygwin does recognise these defines so this is not necessary, although
it probably does not hurt. 64 bit LFS is the default on Cygwin, you
don't have to define anything.
> unrar: $(OBJECTS) $(UNRAR_OBJ)
> @rm -f makeunrar
> $(LINK) -Wl,-s -g -o unrar $(LDFLAGS) $(OBJECTS)
> $(UNRAR_OBJ) $(LIBS)
-Wl,-s tells gcc to pass -s to the linker, and -s means strip the
executable. So all the debug information you just generated is
discarded. Also, -g when linking doesn't do anything, so you should
remove that too.
Brian