我有一个正在处理的项目,它有多个文件,我使用 make 来编译项目。这是生成文件
CC = /opt/gcc-4.7-cilkplus/bin/gcc
CFLAGS = -ggdb3 -Wall
COMPLILEFLAGS = `mysql_config --include` -I/opt/gcc-4.7-cilkplus/include/
LINKERINFO = `mysql_config --cflags --libs` -lrt -lm -lz
CILKFLAGS = -lcilkrts
# To be provided at the commandline
DIR = './bloom'
MODE = '2'
FILENAME = 'database.info'
exec: main.o mysql-client.o databaseConnection-common.o murmurhash3.o bloom-filter.o md5.o auxilary-functions.o
$(CC) $(CFLAGS) -o exec main.o mysql-client.o databaseConnection-common.o murmurhash3.o bloom-filter.o \
md5.o auxilary-functions.c $(LINKERINFO) $(CILKFLAGS)
main.o: main.c mysql-client.h databaseConnection-common.h bloom-filter.h
$(CC) $(CFLAGS) $(COMPLILEFLAGS) -c main.c $(CILKFLAGS)
bloom-filter.o: bloom-filter.c bloom-filter.h murmurhash3.h auxilary-functions.h
$(CC) $(FLAGS) $(COMPLILEFLAGS) -c bloom-filter.c
murmurhash3.o: murmurhash3.c murmurhash3.h
$(CC) $(CFLAGS) -c murmurhash3.c
md5.o: md5.c md5.h
$(CC) $(CFLAGS) -c md5.c
mysql-client.o: mysql-client.c mysql-client.h databaseConnection-common.h
$(CC) $(CFLAGS) $(COMPLILEFLAGS) -c mysql-client.c
databaseConnection-common.o: databaseConnection-common.c databaseConnection-common.h
$(CC) $(CFLAGS) $(COMPLILEFLAGS) -c databaseConnection-common.c
auxilary-functions.o: auxilary-functions.h auxilary-functions.c
$(CC) $(CFLAGS) -c auxilary-functions.c
run:
./exec $(MODE) $(FILENAME) $(DIR)
现在要调试程序,我通过按时间顺序运行以下命令来使用 gdb:
gdb ./exec
run 2 database.info ./bloom
现在,如果我尝试在文件 main.c 中添加断点,它可以正常工作。但是当我尝试时,break bloom-filter.c:340
我得到了错误No source file named bloom-filter.c
。如何在源文件中添加断点而不是main.c