GDB integration problem

Shane R crazguy22 at hotmail.com
Sat Mar 10 13:54:03 UTC 2007


I am setting a breakpoint via KDevelop but GDB won't pick it up no matter 
what I do.

It gives the following output:

gdb /home/shane/workspace/neatl/BIN/neatl -fullname -quiet
(gdb) set edit off
(gdb) set confirm off
Using host libthread_db library "/lib/tls/i686/cmov/libthread_db.so.1".
(gdb) (gdb)
(gdb) set print static-members off
(gdb) tty /dev/pts/0
(gdb) set width 0
(gdb) set height 0
(gdb) set stop-on 1
(gdb) handle SIG32 pass nostop noprint
(gdb) handle SIG41 pass nostop noprint
(gdb) handle SIG42 pass nostop noprint
(gdb) handle SIG43 pass nostop noprint
(gdb) set print asm-demangle on
(gdb) set output-radix 10
(gdb) cd /home/shane/workspace/neatl/BIN
(gdb) break /home/shane/workspace/neatl/neatl.cpp:16
No source file named /home/shane/workspace/neatl/neatl.cpp.
(gdb) run
Stopped due to shared library event
(gdb) break /home/shane/workspace/neatl/neatl.cpp:16
No source file named /home/shane/workspace/neatl/neatl.cpp.
(gdb) continue
Stopped due to shared library event
(gdb) break /home/shane/workspace/neatl/neatl.cpp:16
No source file named /home/shane/workspace/neatl/neatl.cpp.
(gdb) continue

The important part is that it can't find the source file but the file is 
definitely there.

If I run GDB from the command line it can find the file. If I run a simpler 
test project the breakpoint works. What the &^*^&*^ is going on? I am quite 
new to Linux development so I am sure it is something very stupid that I am 
doing.

Below is my makefile. Don't laugh if I am doing anything really stupid. I 
have gone over every line of it and verifed that all the files are where the 
makefile believes they are. Also the program compiles and runs. Just GDB 
when run via KDevelop can't find them!! I am using KDevelop 3.3.4 in Gnome 
Ubuntu.

Thanks,

Shane

#!/bin/bash
PROJECT = neatl
BIN_DIR=BIN
#OBJ_DIR=OBJ
CC = g++
LIBS = #-L/usr/lib

INCLUDES = #-I/usr/include/g++-2

#DEBUG
#CFLAGS = -g -Wall -Wno-return-type $(INCLUDES)

#RELEASE
CFLAGS = -o3 -O3 -march=pentium4 -ffast-math  -funroll-loops $(INCLUDES)


CPPFLAGS = #-DNO_SCREEN_OUT

_OBJ = neatl.o Cga.o CController.o CInnovation.o CommonConstants.o CParams.o 
CSpecies.o genotype.o Pattern.o PatternManager.o phenotype.o Predictor.o 
ranrotb.o RandSing.o utils.o
#OBJ = $(patsubst %,$(OBJ_DIR)/%,$(_OBJ))
#OBJ = $(patsubst %.cpp,$(OBJ_DIR)/%.o, $(wildcard *.cpp))

$(BIN_DIR)/$(PROJECT): $(_OBJ)
	$(CC) $(CFLAGS) $(LIBS) $(_OBJ) -o $@
	#rm *.o
	#ar rcs testlib.a $(OBJ)

neatl.o: neatl.cpp ./common/utils.h ./predictor/CController.h 
./predictor/CParams.h
	$(CC) $(CFLAGS) -c $< -o $@

CController.o: ./predictor/CController.cpp ./predictor/CController.h 
./predictor/Cga.h ./predictor/Predictor.h ./common/utils.h 
./predictor/CParams.h ./predictor/Pattern.h ./predictor/PatternManager.h
	$(CC) $(CFLAGS) -c $< -o $@

Cga.o: ./predictor/Cga.cpp ./predictor/Cga.h ./core/phenotype.h 
./core/genotype.h ./predictor/CSpecies.h ./predictor/CParams.h 
./common/utils.h
	$(CC) $(CFLAGS) -c $< -o $@

CParams.o: ./predictor/CParams.cpp ./predictor/CParams.h ./common/utils.h
	$(CC) $(CFLAGS) -c $< -o $@

CSpecies.o: ./predictor/CSpecies.cpp ./predictor/CSpecies.h 
./core/genotype.h ./predictor/CParams.h
	$(CC) $(CFLAGS) -c $< -o $@

Pattern.o: ./predictor/Pattern.cpp ./predictor/Pattern.h ./common/utils.h
	$(CC) $(CFLAGS) -c $< -o $@

PatternManager.o: ./predictor/PatternManager.cpp 
./predictor/PatternManager.h ./predictor/Pattern.h ./common/utils.h
	$(CC) $(CFLAGS) -c $< -o $@

Predictor.o: ./predictor/Predictor.cpp ./predictor/Predictor.h 
./core/phenotype.h ./common/utils.h ./predictor/CParams.h 
./predictor/Pattern.h
	$(CC) $(CFLAGS) -c $< -o $@




CInnovation.o: ./core/CInnovation.cpp ./core/CInnovation.h  ./common/utils.h 
./core/genotype.h ./core/phenotype.h
	$(CC) $(CFLAGS) -c $< -o $@

genotype.o: ./core/genotype.cpp ./core/genotype.h ./core/phenotype.h 
./common/utils.h ./core/CInnovation.h ./core/genes.h
	$(CC) $(CFLAGS) -c $< -o $@


phenotype.o: ./core/phenotype.cpp ./core/phenotype.h ./common/utils.h 
./core/genes.h
	$(CC) $(CFLAGS) -c $< -o $@





CommonConstants.o: ./common/CommonConstants.cpp ./common/CommonConstants.h
	$(CC) $(CFLAGS) -c $< -o $@

utils.o: ./common/utils.cpp ./common/utils.h ./common/CommonConstants.h 
./common/RandSing.h
	$(CC) $(CFLAGS) -c $< -o $@

ranrotb.o: ./common/ranrotb.cpp ./common/randomc.h
	$(CC) $(CFLAGS) -c $< -o $@

RandSing.o: ./common/RandSing.cpp ./common/RandSing.h ./common/randomc.h
	$(CC) $(CFLAGS) -c $< -o $@

clean:
	rm -f *.o$(BIN_DIR)/$(PROJECT)

_________________________________________________________________
Solve the Conspiracy and win fantastic prizes.  
http://www.theconspiracygame.co.uk/





More information about the KDevelop-devel mailing list