Having difficulty using gdb with a "speller" with an Makefile:
Code:
#
# Makefile
#
# Computer Science 50
# Problem Set 5
#
# compiler to use
CC = clang
# flags to pass compiler
CFLAGS = -ggdb -O0 -Qunused-arguments -std=c99 -Wall -Werror
CFLAGS+ = -g
# name for executable
EXE = speller
# space-separated list of header files
HDRS = dictionary.h
# space-separated list of libraries, if any,
# each of which should be prefixed with -l
LIBS =
# space-separated list of source files
SRCS = speller.c dictionary.c
# automatically generated list of object files
OBJS = $(SRCS:.c=.o)
# default target
$(EXE): $(OBJS) $(HDRS) Makefile
$(CC) $(CFLAGS) -o $@ $(OBJS) $(LIBS)
# dependencies
$(OBJS): $(HDRS) Makefile
# housekeeping
clean:
rm -f core $(EXE) *.o
The command line for running this program would be:
Quote:
./speller textfile_to_be_spell-checked
|
Can anyone explain what command line can be used with gdb in order to make use of this app, which would include argv[1]. Can't find any applicable instructions after much searching.
Thanks for your attention.
Thank