diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2012-01-21 00:59:38 -0800 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2012-01-21 00:59:38 -0800 |
commit | b7bdc308cd6ce4dd4d3dd68c16eec792652f8c39 (patch) | |
tree | 07c7ebb1f183b60d2e838981fe2eaa6b307eebff /Makefile | |
parent | 3315a83172c4178176d1cf7634dfc69a8fd29edc (diff) | |
download | txr-b7bdc308cd6ce4dd4d3dd68c16eec792652f8c39.tar.gz txr-b7bdc308cd6ce4dd4d3dd68c16eec792652f8c39.tar.bz2 txr-b7bdc308cd6ce4dd4d3dd68c16eec792652f8c39.zip |
Improved debugging. Debug nesting depth counter maintained
and used for next/step/finish stepping.
* Makefile (OBJS): debug.o moved to OBJS-y or OBJS-.
(OBJS-y, OBJS-): New variables.
$(PROG): Depends on OBJS-y also.
clean: clean $(OBJS-y).
depend: include $(OBJS-y) in dependency generation.
* configure: Underscores and dashes are interchangeable in
configure variables.
(yaccname_given, yacc_given): Default value is y, not yes.
(debug_support): New config variable.
(CONFIG_DEBUG_SUPPORT): New config.h symbol.
* debug.c (debug_depth): New global variable.
(debug_block_s): New symbol variable.
(next_depth): New static variable.
(debug): Renamed some commands. Introduced separate next, step
and finish.
(debug_init): debug_block_s initialized.
* debug.h (debug_depth, debug_block_s): Declared.
(debug_enter, debug_leave, debug_return): New macros.
(debug_check, debug_init): Conditionally defined based on
if this is a debug build.
* dep.mk: Regenerated.
* eval.c (eval): Instrumented with debug_enter, debug_leave,
debug_return.
* match.c (match_line, v_fun, match_files): Likewise.
* txr.c (txr_main): Bail if -d or --debug used in build
that lacks debug support.
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 9 |
1 files changed, 5 insertions, 4 deletions
@@ -39,7 +39,8 @@ endif # TXR objects OBJS := txr.o lex.yy.o y.tab.o match.o lib.o regex.o gc.o unwind.o stream.o -OBJS += arith.o hash.o utf8.o filter.o debug.o eval.o rand.o +OBJS += arith.o hash.o utf8.o filter.o eval.o rand.o +OBJS-$(debug_support) := debug.o # MPI objects MPI_OBJ_BASE=mpi.o mplogic.o @@ -50,7 +51,7 @@ OBJS += $(MPI_OBJS) PROG := ./txr -$(PROG): $(OBJS) +$(PROG): $(OBJS) $(OBJS-y) $(CC) $(CFLAGS) -o $@ $^ $(LEXLIB) VPATH := $(top_srcdir) @@ -75,7 +76,7 @@ rebuild: clean repatch $(PROG) .PHONY: clean clean: - rm -f $(PROG) $(OBJS) \ + rm -f $(PROG) $(OBJS) $(OBJS-y) \ y.tab.c lex.yy.c y.tab.h y.output $(TESTS:.ok=.out) .PHONY: repatch @@ -90,7 +91,7 @@ distclean: clean .PHONY: depend depend: - txr $(top_srcdir)/depend.txr $(OBJS) > $(top_srcdir)/dep.mk + txr $(top_srcdir)/depend.txr $(OBJS) $(OBJS-y) > $(top_srcdir)/dep.mk TESTS := $(patsubst $(top_srcdir)/%.txr,./%.ok,\ $(shell find $(top_srcdir)/tests -name '*.txr' | sort)) |