This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
-g option no longer working
- To: gcc-help at gcc dot gnu dot org
- Subject: -g option no longer working
- From: Philip O'Toole <philip dot otoole at skystream dot com>
- Date: Sun, 22 Jul 2001 16:52:16 -0700
Hi,
I've been using the PPC version of gcc quite successfully for the last 4
months. Up until recently, when I compiled with the -g option, this allowed
me to view source code in-line with a dumped object file (using PPC objdump)
Suddenly, without any change on my part to my makefile, this option no
longer appears to operate. When I dump my output to objdump, I no longer see
the source code, only assembly. This also results in PPC gdb complaining
that it can't load the debugging symbols. I can fix this by using the -ggdb
option, but I still can't see any source code in my dumped file $(OBJNAME)
Here is an example extract of my makefile.
Anybody ever seen anything like this before, and if so, how do I fix it?
Thanks,
Philip.
$(OBJNAME).dump:$(OBJNAME)
$(CROSS)objdump --disassemble -all -S \
$(OBJNAME) > $(OBJNAME).dump
$(OBJNAME): $(OBJS) appcode.lds Makefile
$(CC) -Wall -Wl,-Map $(OBJNAME).map \
-Wl,--script=appcode.lds \
-static -nostdlib \
-g -o $(OBJNAME) $(OBJS) $(LIBS) -lgcc
rx.o: $(SOURCES_DIR)/rx.c $(INCLUDES)
$(CC) -Wall -g -c $(SOURCES_DIR)/rx.c \
-I include
dma.o: $(SOURCES_DIR)/dma.c $(INCLUDES)
$(CC) -Wall -g -c $(SOURCES_DIR)/dma.c \
-I include
uart_a.o: $(SOURCES_DIR)/uart_a.S $(INCLUDES)
$(CC) -Wall -g -c $(SOURCES_DIR)/uart_a.S \
-I include
isr_a.o: $(SOURCES_DIR)/isr_a.S $(INCLUDES)
$(CC) -Wall -g -c $(SOURCES_DIR)/isr_a.S \
-I include
evpr.o: $(SOURCES_DIR)/evpr.S $(INCLUDES)
$(CC) -Wall -g -c $(SOURCES_DIR)/evpr.S \
-I include
uart.o: $(SOURCES_DIR)/uart.c uart_a.o $(INCLUDES)
$(CC) -Wall -g -c $(SOURCES_DIR)/uart.c \
-I include