summaryrefslogtreecommitdiffstats
path: root/txr.c
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2009-11-25 15:46:54 -0800
committerKaz Kylheku <kaz@kylheku.com>2009-11-25 15:46:54 -0800
commit3c784ae4f4b25ebcc4019b77c77a7e365fdac261 (patch)
tree6f6dd9edeb85051baa617f72268c6704c4d64d97 /txr.c
parent1dc59ff8a80f2635785bef5c50fb3f7e815f060d (diff)
downloadtxr-3c784ae4f4b25ebcc4019b77c77a7e365fdac261.tar.gz
txr-3c784ae4f4b25ebcc4019b77c77a7e365fdac261.tar.bz2
txr-3c784ae4f4b25ebcc4019b77c77a7e365fdac261.zip
More Valgrind support. New option --vg-debug which turns on
Valgrind protection of free blocks. This works independently of --gc-debug.
Diffstat (limited to 'txr.c')
-rw-r--r--txr.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/txr.c b/txr.c
index f73ed961..8f87571e 100644
--- a/txr.c
+++ b/txr.c
@@ -270,6 +270,17 @@ static int txr_main(int argc, char **argv)
opt_gc_debug = 1;
argv++, argc--;
continue;
+ } else if (!strcmp(*argv, "--vg-debug")) {
+#ifdef HAVE_VALGRIND
+ opt_vg_debug = 1;
+ argv++, argc--;
+ continue;
+#else
+ format(std_error,
+ lit("~a: option ~a requires Valgrind support compiled in\n"),
+ prog_string, string_utf8(*argv), nao);
+ return EXIT_FAILURE;
+#endif
}
{