From 09413faa188070e9f484099f30f69eed31ab82e2 Mon Sep 17 00:00:00 2001 From: Kaz Kylheku Date: Fri, 17 Jun 2016 20:22:24 -0700 Subject: Rename EXTRA_DEBUGGING to CONFIG_EXTRA_DEBUGGING. * configure: Generate #define CONFIG_EXTRA_DEBUGGING 1 in config.h header, rather than EXTRA_DEBUGGING. * gc.c, gc.h, hash.c: Change references to EXTRA_DEBUGGING preprocessor symbol to CONFIG_EXTRA_DEBUGGING. --- configure | 2 +- gc.c | 10 +++++----- gc.h | 2 +- hash.c | 6 +++--- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/configure b/configure index 9e6e0ac1..2580ff4c 100755 --- a/configure +++ b/configure @@ -2655,7 +2655,7 @@ fi if [ -n "$extra_debugging" ] ; then printf "Configuring extra debugging, as requested ...\n" - printf "#define EXTRA_DEBUGGING 1\n" >> $config_h + printf "#define CONFIG_EXTRA_DEBUGGING 1\n" >> $config_h fi # diff --git a/gc.c b/gc.c index cc5c0f37..9418aa43 100644 --- a/gc.c +++ b/gc.c @@ -99,7 +99,7 @@ static int freshobj_idx; int full_gc; #endif -#if EXTRA_DEBUGGING +#if CONFIG_EXTRA_DEBUGGING val break_obj; #endif @@ -142,7 +142,7 @@ static void more(void) while (block < end) { block->t.next = free_list; block->t.type = convert(type_t, FREE); -#if EXTRA_DEBUGGING +#if CONFIG_EXTRA_DEBUGGING if (block == break_obj) { #if HAVE_VALGRIND VALGRIND_PRINTF_BACKTRACE("object %p newly added to free list\n", convert(void *, block)); @@ -206,7 +206,7 @@ val make_obj(void) freshobj[freshobj_idx++] = ret; #endif gc_bytes += sizeof (obj_t); -#if EXTRA_DEBUGGING +#if CONFIG_EXTRA_DEBUGGING if (ret == break_obj) { #if HAVE_VALGRIND VALGRIND_PRINTF_BACKTRACE("object %p allocated\n", convert(void *, ret)); @@ -326,7 +326,7 @@ tail_call: obj->t.type = convert(type_t, t | REACHABLE); -#if EXTRA_DEBUGGING +#if CONFIG_EXTRA_DEBUGGING if (obj == break_obj) { #if HAVE_VALGRIND VALGRIND_PRINTF_BACKTRACE("object %p marked\n", convert(void *, obj)); @@ -497,7 +497,7 @@ static int sweep_one(obj_t *block) const int vg_dbg = 0; #endif -#if EXTRA_DEBUGGING +#if CONFIG_EXTRA_DEBUGGING if (block == break_obj) { #if HAVE_VALGRIND VALGRIND_PRINTF_BACKTRACE("object %p swept (type = %x)\n", diff --git a/gc.h b/gc.h index 27c534f9..2bc51fe6 100644 --- a/gc.h +++ b/gc.h @@ -53,7 +53,7 @@ void gc_free_all(void); extern int gc_enabled; extern val **gc_prot_top; -#if EXTRA_DEBUGGING +#if CONFIG_EXTRA_DEBUGGING extern val break_obj; #endif diff --git a/hash.c b/hash.c index 4a2d923f..9b6f07ff 100644 --- a/hash.c +++ b/hash.c @@ -871,7 +871,7 @@ static void do_weak_tables(void) val entry = car(*iter); if (!gc_is_reachable(entry) && !gc_is_reachable(car(entry))) { *iter = cdr(*iter); -#if EXTRA_DEBUGGING +#if CONFIG_EXTRA_DEBUGGING if (car(entry) == break_obj) breakpt(); #endif @@ -895,7 +895,7 @@ static void do_weak_tables(void) val entry = car(*iter); if (!gc_is_reachable(entry) && !gc_is_reachable(cdr(entry))) { *iter = cdr(*iter); -#if EXTRA_DEBUGGING +#if CONFIG_EXTRA_DEBUGGING if (cdr(entry) == break_obj) breakpt(); #endif @@ -921,7 +921,7 @@ static void do_weak_tables(void) (!gc_is_reachable(car(entry)) || !gc_is_reachable(cdr(entry)))) { *iter = cdr(*iter); -#if EXTRA_DEBUGGING +#if CONFIG_EXTRA_DEBUGGING if (!gc_is_reachable(car(entry)) && car(entry) == break_obj) breakpt(); if (!gc_is_reachable(cdr(entry)) && cdr(entry) == break_obj) -- cgit v1.2.3